a service for a virtual aachine, GR 11 is loaded with the address
of the VMBLOK and the current value in V!TTI!E is placed in the
processor timer. When CP is finished with the service for that
virtual machine the processor timer, which has been decreaented by the amount of processor time used, is stored back into V!TTlftE. GB
11 is then loaded with a new VMBLOK pointer and the processor tiaer is set from the new VftTTlft! field. The amount of CP overhead for a
given virtual aachine at any point in tiae is the difference
between the maximum integer and the current value in the VftTTI!E field. Since VKTTIKE only accounts for supervisor state overhead,
detection of in-queue time slice end is perforaed by the processor
timer when the virtual machine is dispatched in the problea state. The VMTKOUTQ field in the VKBLOK is initialized to the amount of problem state time that the virtual machine is allowed to
accumulate before being dropped from a queue. This initial value
is set by the scheduler (DMKSCB) when the virtual machine is added
to a queue and its value depends on the queue entered (interactive
or noninteractive) and on the processor model. For exaaple, the
initial value of iHIMOUrQ a ente=ing 01 on a
Model 145 is 300 milliseconds, while for the same user entering Q2 (noninteractive) it is 2 seconds. Each tiae the user is
dispatched, the value in VMTMOUTQ is entered into the processor
timer; whenever the user is interrupted, the decremented processor timer is stored into VKTKOUTQ prior to being set froa the new VKTTIKE. When the problem state time slice has been exhausted; a
processor timer interrupt occurs, the VftQSEJD flag bit is set in
the VKBLOK, and the scheduler drops the user from the queue. It each queue drop, the problem time used in-queue (the difference
between VftTftOUTQ and the initial value) is added to the total problem tiae field (VMVTIKE) in the VRBLOK. Virtual processor timer simulation is handled for Ee aode virtual
machines if the value in the virtual processor timer is less than
that in VMTKOUTQ. In this case, the VftBLOK is flagged as "tracking
processor timer" and a processor tiaer interrupt is interpreted as
a virtual timer interrupt rather than as an in-queue tiae slice
end. Virtual Timing Facilities Virtual location 1'50' tiaers are updated by the elapsed processor time each time the dispatcher has been entered after a running user has been
interrupted. The size of the update is the difference between the value
of the timer at dispatch (saved in QUARTUft at location X'54') and the
value of the timer at the time of the interruption (saved in QUIBTUftR at
location 1'4C'). Virtual clock coaparator requests are
maintenance routine, DftKTKR. They are
comparator request stack and the virtual
interruption occurs.
handled by the virtual tiaer inserted into the general
machine is posted when the
virtual clock comparator requests to set the virtual processor tiaer place the new value into the ECBLOK. Requests to store the new value
update the ECBLOK field with the virtual processor tiae used since the
last entry to dispatch and pass the value to the user. Requests to set
the time-of-day clock are ignored.
A real interval timer or processor tiaer is one that runs when the
virtual machine is executing or is in a self-imposed wait state (that
1-82 IBM VM/370 System Logic and Problem Deteraination--Volume 1
is, the wait bit is on in the virtual PSi}. 1 real timer does not run
if the virtual machine is in a CP pseudo wait state (for example, page
wait or I/O wait) or if the virtual machine can be run but is not being
dispatched because of other user interaction. Real timers provide
accurate interrupts to programs that depend on measurement of elapsed
processor and/or wait time. They do not accurately measure wall time -­
the TOD clock must be used for this function. In BC mode virtual machine with the real timer option has both a real
interval timer and a real processor timer. Real timer requests for
waiting machines are maintained in the clock comparator stack.
processor timer requests are added to TOD clock value at the time that
they are issued. Interval timer requests must have their units
converted. In addition, if the virtual processor timer contains a large
negative value, then a real timer request is scheduled to occur when the
virtual machine becomes positive, so that the pending timer interruption
can be unflaaaed. Comparator reauests for real timer interruPtions are
inserted into-the stack whenever-a virtual machine enters a self-imposed
wait. They are removed either when the virtual machine resumes execution or when it is forced (or places itself) into a pseudo wait. I/O Management I/O SUPERVISOR The module, DMKIOS, handles the I/O requirements of all system devices
except the following terminals: 1052, 3210, 3215, 2150, 2741, 3270 remote equipment, and compatible teletypewriter devices. Scheduling and
interruption handling for these devices is essentially a synchronous
process and does not require the queuing and restart services of D!KIOS. This is handled by the module DMKCNS. For handling the I/O requirements
of 3270 remote equipment, refer to "Programming for 3270 Remote Terminals -an Introduction" in this section.
REAL I/O CONTROL BLOCKS To schedule I/O requests and control the activity of the I/O devices of
the system, I/O control uses several types of control blocks. These
blocks are separated into two basic types. • Static blocks that describe the components of the I/O system. • The dynamic blocks that represent active and pending requests for I/O operations.
The I/O devices of the real system are described by one control block
for each channel, control unit, and device available to the control
program. Units present but not represented by control blocks are not
available for either user-initiated or CP-initiated operations.
Because all virtual machines are run in the problem state, any attempt to issue a SID instruction results in a program interruption
that indicates a privileged operation exception. This interruption is
handled by CP's first level program interrupt handler, DMKPRGII. It
determines if the virtual machine was in virtual supervisor state
(problem state bit in the virtual PSi is zero). If so, the instruction
causing the interruption is saved in the VMBLOK for the virtual machine and control is transferred to the privileged instruction simulator, DMKPRVLG, via a GOTO. CP Introduction 1-83
Previous Page Next Page