Entries on the dispatch list are the VKBLOKs for those virtual
machines in states 1, 2, 5, and 6, and represent the virtual machines
that can be run at any given time. (States 2 and 6 remain in the
dispatch list even though they are not dispatchable.) The dispatch list
is sorted by dispatching priority, which is the ratio of processor tille
to wait tille over the length of the current virtual machine task. A task is defined as that execution that takes place between terminal
reads or entry to enabled wait (that is, lIovement from state 4 or 8 to
state 1) and is re-projected for a virtual machine each time it is
dropped froll a queue. Virtual machines entering state 1 always have a priority- o-f9-. The eligible list contains virtual machines in states 3 and 7: these
virtual lIachines are potentially executable, but due to the current load
on the system they are not allowed to compete for the processor. Is soon as a virtual machine in the dispatch list is dropped froll queue,
the highest-priority virtual machine(s) in the eligible list is added to
the dispatch list. Conditions can arise where the virtual machine that
is added to the dispatch list has a prOjected working set size that far
exceeds the remaining system capacity. The eligible list has two cOllponents; a section composed of those virtual machines waiting for Q1
(interactive) and a section composed of those virtual machines waiting
for 02 (non-interactive). Each section of the list is sorted by
scheduling priority, which is determined at the time the virtual machine is added to the eligible list, as follows:
1. The virtual machine's prOjected working set size, calculated the
last time it was dropped from a queue, is expressed as a percentage
of the amount of main storage'- available for paging. This
percentage, usually between 0 and 100, is multiplied by the paging
bias factor (stored at DKKSCHPB). 2. The virtual machine's priority (the priority set by the directory
or the class A SET PRIORITY command) is multiplied by the user bias
factor (stored at DftKSCHUB). and is added to the paging bias
calculated in step 1.
3. The sum of paging and user bias is divided by the sum of the bias
factors to obtain a weighted average. 4. 1 base priority is obtained by storing the TOO clock and using the leftmost word, which increases by 1 approximately once per second.
This word is then modified by shifting it left or right based on
the priority delay factor (stored at DBKSCHPDj. If DBKSCHPD is positive, it indicates a right shift, thereby increasing the delay
interval of the base priority. A negative value indicates a left
shift.
5. The weighted average obtained in step 3 is then logically added to
the adjusted base obtained in step 4. 6. If the virtual machine is entering 02 for the first time after
being dropped from Q1, the interactive bias factor (stored at DKKSCHIB) is subtracted froll the priority obtained in step 5. If
the virtual machine is entering Q1, or if it was last dropped from 02, the interactive bias is not applied.
7. The result of steps 1 through 6 is the scheduling or eligible list
priority, and is stored in the VKEPRIOR field of the VKBLOK. The V!BLOK is then sorted into the appropriate section of the
eligible list in ascending value of VKEPRIOR. The effects of the
various biases and the delay factor are illustrated by the following examples. CP Introduction 1-129
1 Assume that two virtual .achines are to be added to the eligible
list for Q2. The paging bias factor is 1, the user bias factor is
1, and the priority delay factor is o. Virtual .achine A has a
projected working set size of 80 percent of available storage and a
user priority of 50. Virtual .achine B has a projected working set
size of 20 percent of available storage and also has a user
priority of 50. The biases are obtained as follows: Paging Bias 80 1-'1 20 1 1 User Bias
+ 501'1 .. 50 1 1 Weighted Bias
= 130/2 = 65
= 70/2 = 35
If 1 is added to the eligible list at base time 0, its eligible
list priority is 65. If the priority delay factor is 0, B is added of A provided that B is eligible for entry to the list within
the next (65-35) 30 seconds. If the priority delay factor is set
to +1, the base is incremented once every two seconds. Therefore,
although the bias difference is still 30, the delay time is now 60 seconds. To force A to be given a weighted bias equal to B, a priority
differential is calculated as follows: 80 + A 20 + B
------ = ------
2 2 A = B - 60 Therefore, for the biases to be equal, A .ust have a priority of 60 less than B. For exa.ple, if 1 is given a priority of 10 and B is
given a priority of 70, the biases would coapute as follows: J Paging _Bias_ 80 1 1 f- 20 1 1 + User -1!i§L 10 1 1 70 1 1 Weighted Bias
= 90/2 ;;-45-- = 90/2 = 45 The large difference in priorities could be lessened by increasing
the user bias If the user bias factor is set to 3 instead
of 1, the calculated priority differential is as follows: 80 + 3A 20 + 3B -------= 4 4 3 (B -A) = 60 1 = B - 20 lOw, 1 requires a priority of only 20 less than B to achieve
parity. For exaaple: 1-130 IBM VM/370 Systea Logic and Problem Deteraination--Voluae 1
Previous Page Next Page