1. Problems

Problems of Real-time Scheduling in Virtual Machine

At first, real-time support requires two important perspectives:

1. Determinism: All the real-time task should be able to finish its execution within deadline

it has to be analyzed before execution, can be deterministically prove to be preserved.

2. Predictability: For unpredictable I/O task should also be time-bounded so that the responsiveness of a system can be kept as well.

In order to deal with the determinism and predictability, a real-time operating implements schedulability test methodology,

and have well-defined I/O processing structure.

However, in a virtual machine system, both are difficult problems.

At first, virtual machine is not aware of physical time.

Physical time is only available to the hypervisor, and the guest OS usually uses virtual time for its process scheduling.

This is a serious problem in real-time scheduling because most real-time operating system has to deal with global timing requirements

which is based on the physical time.

Even though the hypervisor is aware of physical time, it cannot schedule actual tasks because it lacks in process information inside the guest OS.

Therefore, in general, it is difficult to support real-time scheduling in a virtual machine system.

Secondly, I/O processing is not time-bounded in a virtual machine.

Physical interrupt is completely asynchronous to the guest OS, the target guest OS may not handle the interrupt immediately when it is not in execution.

Namely, physical interrupt is delivered to the designated virtual machine only after the virtual machine is scheduled by the hypervisor.

Thus, I/O event delivery can include several times of virtual machine switching and several quantum of guest OS scheduling.

Consequently, I/O processing in a virtual machine becomes very unpredictable when we compared it with the native one.