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
system to be exceeded. Selection within scheduling priority siaply aeans that a executable virtual machine of high priority is always added
to the active subset (to a queue) before a executable virtual aachine of
lower priority. If the paging bias mechanisa is activated by setting
the paging bias factor to a nonzero value, scheduler selection is in
favor of smaller virtual machines; otherwise, selection is within
priority. Once the active subset (the set of in-queue virtual aachines)
has been selected, the dispatcher allocates resources of the processor aaong them. The list of executable virtual machines in a queue is sorted by dispatching (as opposed to scheduling) priority. The dispatching
priority is a running average of a given virtual aachine's processor time/wait-time ratio. Thus, virtual aachines who are most likely to go
into wait state, based on past performance, are dispatched ahead of
those whose demands on the processor are more extensive. This siaple
ratio priority is normally altered if a virtual machine is identified as
compute-bound by means of the fact that it has executed for at least 50 ms. without entering the wait state. In this case, it is placed at the bottom of the dispatchable list. On the other hand, virtual machines
identified as interactive by virtue of the frequency their requests for
terminal I/O are placed at the top of the dispatchable list. DHKDSP also provides a fast dispatch path for virtual machines that have
issued specific privileged instructions that are not handled by the
Virtual Machine Assist feature.
These virtual machines can be dispatched very rapidly because the
virtual aachine's program old PSi needs very little reconstruction to
redispatch the virtual machine, hence use of full PSi reconstruction
path is not required. The decision for using the fast dispatch path (DHKDSP1) is accoaplished by the module that handles privileged
operation, DMKPRV or DMKVIO. A fast redispatch path is also available
after I/O interrupts. If DMKDSP can determine that the I/O interrupt
processing had no effect on the running virtual machine's status and it
caused no higher-priority virtual machine to become runnable, then the
virtual PSi stored at the I/O old PSi location will be used to
redispatch the virtual machine. The CP supervisor runs disabled for all I/O and external interrupts.
The dispatcher, in order to alleviate part of this problea, will temporarily enable for interrupts and then disable. There are three
occasions when the dispatcher enables for interruptions (enable
windows):
1. ihen an enabled wait state is entered.
2. ihen an enabled problem state is entered to run a virtual machine. 3. ihen another part of the supervisor is entered via the unstacking
of a CP request block. On occasions 1 and 2, the dispatcher ignores the enable since the systea will soon be enabled for interruptions. On occasion 3, if the
dispatcher finds a CP request block to unstack, it first enables then
disables for interruptions before unstacking the request.
1-134 IBM VM/370 System Logic and Problem Deter.ination--Voluae 1
Previous Page Next Page