Timers in a Virtual Machine
Interval Timer
Virtual Interval Timer Assist
This section describes the results obtained in using timers in a virtual machine cre
ated byCPo Virtual location 80 (X'50'), the interval timer, contains different values than would
be expected when operating in a real machine.On a real machine, the interval tim
er is updated300 times per second when enabled and when the real machine is not
in manual state. The interval timer on a real machine thus reflects system time and
wait state time. In a virtual machine, the interval timer reflects only virtual
processor time, and not wait time. It is updatedQy CP whenever a virtual machine
passes control toCP, and this one updating the entire time the virtual
machine had control. Note that during the time a virtual machine has control, the
virtual interval timer does not change; the virtual processor time used is added to
the virtual interval timer whenCP regains control. For some privileged
instructions,CP may be able to simulate the instruction and still return control to
the virtual machine before the end of that virtual machine's time slice. In such
cases, the virtual interval timer is updated but only for those privileged instructions
that require normal or fast reflect entry into the dispatcher. For those privileged
instructions that do not require entry into the dispatcher, the virtual interval timer
is not updated untilCP gets control at the end of the time slice.
If the virtual machine assist feature or Extended Control -Program Support is ON, more time is charged to the virtual interval timer than if the feature is OFF. When
the virtual machine assist feature isOFF, the time spent by CP to simulate privi
leged instructions is not charged to the virtual interval timer; whereas, with the fea
tureON, the time spent is charged to the virtual interval timer.
The virtual interval timer assist feature is the updating of the virtual interval timer
and presentation of timer interrupts to the virtual machine by the hardware. When
the software simulates the interval timer, updating occurs only whenCP takes over
control. This usually results in an update frequency of once per time slice and
repeatability of timed intervals suffers greatly under these conditions. When the
virtual interval timer assist feature is active, the update frequency is the same for
both virtual and real interval timers,300 times a second.
In order for the virtual interval timer assist feature to be active, the following
conditions must be met:VM/SP must be running on a Model 135-3, 138, 145-3, 148,3031, 3031AP, 4331, or 4341.
The virtual machine must have enabled the virtual machine assist and the virtu
al interval timer(SET TIMER {ON I REAL}).
The virtual machine must have enabled both the virtual machine assist and the
virtual interval timer assist(SET ASSIST ON TMR). VM/SP provides an option, called the REALTIMER option, which causes the vir
tual interval timer to be updated during virtual wait state as well. With the
REAL TIMER option in effect, a virtual interval timer reflects virtual processor
time and virtual wait time, but notCP time used for services for that virtual
Timers in a Virtual Machine205
Interval Timer
Virtual Interval Timer Assist
This section describes the results obtained in using timers in a virtual machine cre
ated by
be expected when operating in a real machine.
er is updated
in manual state. The interval timer on a real machine thus reflects system time and
wait state time. In a virtual machine, the interval timer reflects only virtual
processor time, and not wait time. It is updated
passes control to
machine had control. Note that during the time a virtual machine has control, the
virtual interval timer does not change; the virtual processor time used is added to
the virtual interval timer when
instructions,
the virtual machine before the end of that virtual machine's time slice. In such
cases, the virtual interval timer is updated but only for those privileged instructions
that require normal or fast reflect entry into the dispatcher. For those privileged
instructions that do not require entry into the dispatcher, the virtual interval timer
is not updated until
If the virtual machine assist feature or Extended Control -
the virtual machine assist feature is
leged instructions is not charged to the virtual interval timer; whereas, with the fea
ture
The virtual interval timer assist feature is the updating of the virtual interval timer
and presentation of timer interrupts to the virtual machine by the hardware. When
the software simulates the interval timer, updating occurs only when
control. This usually results in an update frequency of once per time slice and
repeatability of timed intervals suffers greatly under these conditions. When the
virtual interval timer assist feature is active, the update frequency is the same for
both virtual and real interval timers,
In order for the virtual interval timer assist feature to be active, the following
conditions must be met:
The virtual machine must have enabled the virtual machine assist and the virtu
al interval timer
The virtual machine must have enabled both the virtual machine assist and the
virtual interval timer assist
tual interval timer to be updated during virtual wait state as well. With the
REAL TIMER option in effect, a virtual interval timer reflects virtual processor
time and virtual wait time, but not
Timers in a Virtual Machine