Figure 20 shows the possible user-state changes and the reasons for thea; any changes not described are not possible.
r Status Change I I I I Froa To Reason for status Change I -------------------------------------------------------------------1
1
1
1
1
1
2
2
3 4 4 5
5
5
5
5
6
7
8
2 4 5
1
8
1
5,1
1
1
3
1 4 6
1
8
5
5
5,1
Pagewait, SIO-WAIT, or enabled wait for any busy channel
Enabled wait for interactive terminal read or write
Exceeds in-queue time slice Salle as 1 to 5 except that queue2 is full Wait without active I/O, disabled WAIT or hit ATTN Wait condition cOllplete Wait coapletes, but in-queue time slice exceeded
Another user drops froll queue1 and now there is room Ter.inal I/O completes While user is waiting
Terminal I/O completes, but queue1 is full
Terainal I/O completes while user is active in queue2 User puts up terainal read or write and enters wait Pagewait, SIO-WAIT, or enabled wait for busy channel
Dropped from queue2 due to in-queue tiae-slice end Wait without active I/O, disabled WAIT, or hit ATTW Wait condition coapletes
Rooa is found in queue2
Asynchronous I/O or external interruption or BEGIN
Figure 20. User Status Changes
To control the nuaber of virtual aachines allowed in queue, the
scheduler monitors the paging activity of all virtual aachines and of
the total systea. A decision as to whether or not to aove a potential
virtual aachine froa the eligible to the dispatch list is based upon
whether or not that its projected working set exceeds the systea's
reaaining capacity. Individual virtual machines' working sets are
calculated and projected at queue drop time according to one of the
following foraulas: P=(A+P)/2 If (LP-LA) * (P-A) < 0 -- or -- P=A If (LP-LA) * (P-l) 0 A Actual working set at queue drop tiae LA Last actual working set LP Last projected working set P Current projected working set
1-132 IBK VK/370 Syste. Logic and Proble. Deterlination--Voluae 1
The working set is added to the current system load, which consists of
the sum of the working sets for all virtual machines currently in a
queue. The SUII is compared to the system maximum, which is equal to the
number of dynamically assignable pages in the system. If the virtual
machine's projected working set will not push the system load over the
virtual machine maximum, it is placed in the queue and added to the
dispatchable list.
The actual working set, A, is the s.aller of the two values
determined at queue drop time by the following forllula: r N --, , > PRi
/ ----I ,
/ N '" Steals
A = i=1 N PR
Steals
-- or --
Pages referenced Number of page reads while in queue. Number of pages resident at the ith page read.
Humber of times page wait was entered because of a
stolen page.
The number of referenced pages is determined by scanning the virtual machine's page tables for software referenced bits. These bits are set by DMKPTRAB when tbe page is taken from the virtual machine by CP. Thus
the actual working set is generally the average number of pages resident
at each page read. However, this estimate is sensitive to the overall system paging activity for the following reasons:
1. If there is no paging load on the system, there is one page read
for each resident page, and no steals; the working set therefore
tends to be equal to about one half of the resident page total.
2. As paging activity increases, and the working set location shifts,
the working set tends to increase toward the average number of
resident pages.
3. If paging activity beco.es excessive, the number of page steals
increases to the extent that the working set expands to the maximum of the total number of pages referenced while in the queue.
In sum.ary, the scheduler selects the subset of logged-on virtual
.achines that are allowed to compete for the resources of the processor,
with the constraint that a new virtual .achine is not added to the
active subset if its projected .ain storage requirement, added to those
of the other active virtual machines, causes the current capacity of the
CP Introduction 1-133
Previous Page Next Page