In computer science, a virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system. Each VM may function as a self-contained platform, running its own operating system (OS) and software applications (processes). Typically, a virtual machine monitor (VMM) manages allocation and virtualization of computer resources and performs context switching, as may be necessary, to cycle between various VMs.
A host machine (e.g., computer or server) is typically enabled to simultaneously run multiple VMs, where each VM may be used by a remote client. The host machine allocates a certain amount of the host's resources to each of the VMs. Each VM is then able to use the allocated resources to execute applications, including operating systems known as guest operating systems. The VMM virtualizes the underlying hardware of the host machine or emulates hardware devices, making the use of the VM transparent to the guest operating system or the remote client that uses the VM.
Recently, solutions providing centralized hosting for VMs that run (virtual) desktops or that are virtual servers have been developed. Such solutions consist of centralized servers that are partitioned into multiple VMs that host the VMs, thereby providing a desktop for each user or providing a virtualized server. The centralized hosting provides the manageability of server-based computing, while the dedicated environment provides the flexibility and compatibility with applications that a desktop enables. In general, VMs therefore enable remote access to a host or server computer by a remote client computer, which mimics or reconstructs the events taking place on the host computer.
However, one problem that arises with such centralized hosting of VMs is the over-committal of CPU resources of the VM host machine. In virtualization, instead of a single desktop owning all of the hardware of the machine hosting it, many desktops now own and share the same hardware. Usually all desktops, whether or not they are virtualized, do not use the CPU at all times. In virtualization, each of the desktops (i.e., VM) are allocated a small amount of processing time with the CPU, resulting in an over-committal of CPU resources. While this small amount of processing time may support a Microsoft™ Office task without any problems, it is not enough for most resource-intensive tasks, such as a VM handling a multimedia file (e.g., performing playback of audio or video). When multiple VMs need the CPU, the VMs will notice a slow down in performance.
When a VM handles multimedia, such as audio, the multimedia is sensitive to CPU scheduling. For example, in order to play a fluent audio stream, the audio is typically played in frequent time intervals (e.g., every 10 ms). If a VM host machine over commits its CPU and there are many VMs running, then the other VMs may steal the physical CPU resources from the VM playing audio and it might not be able to play the audio in a consistent and smooth fashion. The result will be that an end user of the VM experiences an interruption in the audio stream.
Similarly, latency-sensitive tasks of an interactive user, such as those associated with the direct input of a user, including typing on a keyboard or using a mouse, would also benefit from fast availability processing resources for their VM. When an end user is directly interacting with the VM (such as typing, using a mouse, or providing some other type of input to the VM), they expect to see an immediate response to their input. Any lag or interruption in the direct interaction of the end user due to over-committed CPU resources of the VM host machine is quite noticeable to the end user. This is compared to latency-insensitive jobs, such as database jobs, where a lag or interruption is not highly noticeable to the end user.
As such, a solution for prioritizing scheduling of VMs to provide an end user of a VM smoother interaction and feedback with the VM would be beneficial.