Dispatch Priority

The dispatch priority is calculated for a virtual machine each time it enters the dispatch list and whenever the dispatch time slice assigned to a virtual machine expires during its execution. The dispatch priority is calculated based on:
  • The current adjusted time-of-day. For the purpose of calculating dispatch priority, CP calculates an adjusted time-of-day by subtracting accumulated system overhead from the real time-of-day. (System overhead is CP work that is not associated with a particular virtual machine and consists of such tasks as paging, interrupt handling, scheduling, and dispatching.) The adjusted TOD clock runs at the same rate as the real TOD clock, but it stops when CP is doing overhead work.

    The adjusted time-of-day is used so that the installation can allocate system resources to virtual machines without having to reserve resources for system overhead, which tends to vary widely. When an installation allocates an absolute share of 50% to a virtual machine, the virtual machine receives half of the system resources available after the resources used for system work have been taken out. The adjusted time-of-day, used to calculate the dispatch priority of the virtual machine, reflects this net approach.

  • An offset that represents the amount of time it should take the virtual machine to complete its next dispatch time slice. This offset is calculated based on the size of the dispatch time slice, the virtual machine's normalized share of the system, any delay the virtual machine has already experienced in the eligible list, and the number of real processors available to deliver service.

    For more information on virtual machine shares see Scheduling Share Option.

    A feedback mechanism is also used to adjust the dispatch priority given to a virtual machine during its second and subsequent dispatch time slices. The mechanism increases the offset for a virtual machine that finishes its dispatch time slice earlier than expected and decreases the offset for a virtual machine that finishes its dispatch time slice later than expected.

  • Any biases (interactive or hot-shot) that apply to the virtual machine. These biases are discussed further in Biased Scheduling.

Lastly, in making scheduling decisions, z/VM® uses only a VMDBK's recent dispatch history. What happened long ago is routinely forgotten. In this way the scheduler reacts to what is happening right now in the system, not what happened ages ago. This strategy helps the scheduler to make decisions that are correct for the users' current demands for CPU.