Using Processor Resources
Queue 1
Queue 2 CP allocates the processor resource to virtual machines according to their operating
characteristics, priority, and the system resources available.
Virtual machines are dynamically categorized at the end of each time slice as inter­
active or noninteractive, depending upon the frequency of operations to or from
either the virtual system console or a terminal controlled by the virtual machine.
Virtual machines are dispatched from one of three queues, called Queue 1, Queue
2, and Queue 3. In order to be dispatched from a queue, a virtual machine must be
considered executable (that is, not waiting for some activity or for some other sys­
tem resource). Virtual machines are not considered dispatchable if the virtual
machine:
Enters a virtual wait state after an I/O operation has begun.
Is waiting for a page frame of real storage. Is waiting for an I/O operation to be translated by CP and started.
Is waiting for CP to simulate its privileged instructions.
Is waiting for a CP console function to be performed.
Virtual machines in Queue 1 (Q 1) are considered conversational or interactive
users, and enter this queue when an interrupt from a terminal is reflected to the vir­
tual machine. The Q 1 virtual machines are ordered by their deadline priorities in
the dispatch list. A deadline priority is a value calculated by the fair share schedul­
er every time a user is dropped from a queue (queue drop time). This value is
based on paging activity, processor usage, the load on the system, and user priority.
Deadline priority is used to determine when the user receives his next time slice.
A particular virtual machine's deadline priority for Q1 is better (earlier) than its
corresponding priority for Q2. The deadline priorities for all Q1 virtual machines
are not necessarily better than the deadline priorities for all Q2 virtual machines.
Virtual machines are dropped from Q 1 when they complete their time slice of
processor usage, and are placed in an "eligible list". Virtual machines entering CP command mode are also dropped from Q 1.
Virtual machines are selected to enter Q2 from a list of eligible virtual machines
(the eligible list). The ordering of virtual machines on the eligible list and the dis­
patch list is determined on the basis of each virtual machine's deadline priority.
There are two lists of virtual machines in Q2; those in the eligible list and those in
the dispatch list. Both lists are sorted by deadline priority. A particular deadline
priority depends on many factors:
The time-of-day the virtual machine last dropped from the dispatch list
The virtual machine's user priority
Using Processor Resources 15
Deadline Priority The current load and number of virtual machines on the system The current resource utilization of the virtual machine
A virtual machine enters Q2 only if its working set size is not greater than the
number of real page frames available for allocation at the time. The working set of
a virtual machine is calculated and saved each time a user is dropped from Q2. The
working set size is a function of the number of virtual pages referred to by the vir­
tual machine during its stay in Q2, and the number of its virtual pages that are resi­
dent in real storage at the time it is dropped from the queue.
If the calculated working set of the highest priority virtual machine in the eligible
list is greater than the number of page frames available for allocation, CP continues
to search the eligible list, in deadline priority order, for a virtual machine whose
working set does not exceed the number of available page frames.
When a virtual machine completes its time slice of processor usage, it is dropped
from Q2 and placed in the eligible list according to its deadline priority. When a
virtual machine in Q2 enters CP command mode, it is removed from Q2.
To leave CP mode and return his virtual machine to the eligible list for Q2, a user
can issue a CP command that transfers control to the virtual machine operating sys­
tem for execution (for example, BEGIN, IPL, EXTERNAL, and RESTART).
Virtual machines in Q2 are considered to be noninteractive. In CP, interactive vir­
tual machines (those in Q1), if any, are normally considered for dispatching before
noninteractive virtual machines (Q2). This means that CMS users entering com­
mands that do not involve disk or tape I/O operations should get fast responses
from the VM/SP system even with a large number of active virtual machines. All
virtual machines (01 and Q2) on the dispatch list are ordered by their deadline pri­
ority. There can be many instances where some virtual machines in Q2 are consid­
ered for dispatching before virtual machines in Q1 because of their user priority,
current resource utilization level, or for other reasons.
The deadline priority is calculated at queue drop time by:
deadline priority = TOD + user bias factor
where: TOD is the current time of day. User bias factor
is the user bias ratio * Q2 delay factor User bias ratio
is less than 1, equal to 1, or greater than 1, depending on the whether the par­
ticular virtual machine is currently receiving less than, equal to, or more than its
specified amount of resources.
16 VM/SP System Programmer's Guide
Previous Page Next Page