Periodic Timers
The hypervisor attempts to signal periodic timers on a regular basis.
For example, if a timer has a requested period of 1 millisecond, the following figure is the idealized schedule for timer expiration notifications:
However, if the virtual processor that is used to signal the expiration is not available, some of the timer expirations might be delayed. A virtual processor might be unavailable because the virtual processor is suspended (for example, during intercept handling) or because the hypervisor's scheduler determined that the virtual processor should not be scheduled on a logical processor (for example, because another virtual processor is using the logical processor or the virtual processor has exceeded its quota).
The shaded portions of the following figure show periods of inactivity during which a periodic timer expiration signal could not be delivered. Consequently, the signal is deferred until the virtual processor becomes available.
If a virtual processor is unavailable for a sufficiently long period of time, a full timer period might be missed. In this situation, the hypervisor uses one of two techniques. The first technique involves timer period modulation, in effect shortening the period until the timer "catches up."
The following figure shows the period modulation technique.
If a significant number of timer signals have been missed, the hypervisor might be unable to compensate by using period modulation. In this situation, some timer expiration signals might be skipped completely.
For timers that are marked as lazy, the hypervisor uses a second technique for dealing with the situation in which a virtual processor is unavailable for a long period of time. In this situation, the timer signal is deferred until this virtual processor is available. If the virtual processor does not become available until shortly before the next timer is due to expire, the timer signal is skipped entirely.
The following figure shows the lazy timer technique.
Send comments about this topic to Microsoft
Build date: 11/16/2013