Using Processor Resources 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 interactive 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 two queues, called Queue
1 and Queue 2. In order to be dispatched from either queue, a virtual machine must be considered executable (that is, not waiting for some
activity or for some other system 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.
Queue 1 Virtual machines in Queue 1 (Q1) are considered conversational or
interactive users, and enter this queue when an interrupt from a
terminal is reflected to the virtual machine. Users are considered fer
dispatching from this queue on a first-in-first-out (FIFO) basis. When a virtual machine uses more than a certain amount of processor time without entering a virtual wait state, that user is placed in Queue 2. Virtual machines are dropped from Q1 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 Q1. When the
virtual machine becomes executable again (returns to execution mode) it
is placed at the bottom of Q1.
Queue 2 Virtual machines in Queue 2 (Q2) are considered noninteractive users. Users are selected to enter Q2 from a list of eligible virtual machines
(the "eligible list"). The list of eligible virtual machines is sorted
on a FIFO basis within user priority (normally defined in the user
record in the VM/370 directory, but may be altered by the system
operator).
usually, a virtual machine is selected to enter Q2 only if its
"working set" 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 and
is based on the number of virtual pages referred to by the virtual
machine during its stay in Q2, and the number of its virtual pages that
are resident in real storage at the time it is dropped from the queue. 84 IBM VM/37C System ProgrammeL's Guide
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, then 75 percent of the working set for that virtual machine is calculated. If the pages required for 75 percent of the
working set are available, the virtual machine is placed on Q2.
Otherwise, the virtual machine remains on the eligible list until there
are no other users on Q1 or Q2.
Executable virtual machines are sorted by "dispatching priority".
This priority is calculated each time a user is dropped from a queue and
is the ratio of processor time used while in the queue to elapsed time
in the queue. Infrequent processor users are placed at the top of the
list and are followed by more frequent processor users. When a
nonexecutable user becomes executable, he is placed on the queue based
on his dispatching When a virtual machine completes its time slice of processor usage,
it is dropped from Q2 and placed in the eligible list by user priority. When a user request in Q2 enters CP command mode, it is removed from Q2. When the request becomes executable (returns to virtual machine
execution mode), it is placed in the eligible list based on user
priority.
If a user's virtual machine is not in Q1 or Q2, it is because: The virtual machine is on the "eligible list," waiting to be put on
Q2
-- or -- The virtual machine execution is suspended because the user is in CP mode executing CP coamands To leave CP mode and return his virtual machine to the "eligible list" for Q2, the user can issue one of the CP commands that transfer
control to the virtual machine operating system for execution (for
example, BEGIN, IPL, EXTERNAL, and RESTART). In CP, interactive users (Q1), if any, are considered for dispatching
before noninteractive users (Q2). This means that CMS users entering
commands that do not involve disk or tape I/O operations should get fast
responses from the VM/370 system even with a large number of active
users. An installation may choose to override the CP scheduling and
dispatching scheme and force allocation of the Frocessor resource to a
specified user, regardless of its priority or operating characteristics.
The favored execution facility allows an installation to:
1. Specify that one particular virtual machine is to receive up to a
specified percentage of processor time. 2. Specify that any number of virtual machines are to remain in the
queues at all times. Assignment of the favored execution option is
discussed in the "Preferred Virtual Machines" section. Part 2. Control Program (CP) 85
Previous Page Next Page