VM/370 provides an option, called the REALTIMER option, which causes
the virtual interval timer to be updated during virtual wait state as
well. With the REALTIMER option in effect, a virtual interval ti.er
reflects virtual processor time and virtual wait time, but not cp time used for services for that virtual machine, such as privileged
instruction execution. The more services a virtual machine requires
from CP, the greater the difference between the time represented by the
interval timer and the actual time used by and for the virtual machine.
The larger the number of active virtual machines contending for syste. resources, the greater the difference between virtual machine time and
actual elapsed (wall clock) time. Processor Timer
A virtual machine must have the ECMODE directory option to use the System/370 processor timer.
The processor timer is supported in a virtual machine in much the
same way as is the interval timer. That is, the processor timer in a
virtual machine records only virtual processor time, and it is updated
when the virtual machine passes control back to CP. If the real timer option is specified, the processor timer reflects
all actual elapsed time except CP time used for services, such as
privileged instruction execution, for that virtual machine.
The method of sampling the value in the processor timer causes it to
appear to a virtual machine to be updated more often than an interval
timer. The privileged instructions Set processor Timer (SPT) and Store processor Timer (STPT) are used to set a doubleword value in the
processor timer and to store it in a doubleword location of virtual
storage. When a virtual machine samples the value in the processor
timer by issuing a STPT instruction, CP regains control to execute the
rrivileged instruction, and updates the time. The act of sampling the
processor timer from a virtual machine causes it to be brought up to
date. TOO Clock The System/370 time-of-day (TaD) clock does not require simulation in a
virtual machine. The System/370 in which CP is operating may have one
real TaD clock for each processor, and all virtual machines can
interrogate the real TaD clock. The Store Clock (STCK) instruction is
nonprivileged; any virtual machine can execute it to store the current
value of the TOD clock in its virtual storage. The Set Clock (SCK) instruction, which is used to set the TOD Clock value, can be issued
from a virtual machine, but CP always returns a condition code of zero
and does not actually set the clock. Note that the TaD clock is the
only true source of actual elapsed time information for a virtual
machine. The base value for the TaD clock in VM/370 is 00:00:00 GMT, January 1,1900. In an attached processor environment, the TOO clocks are synchronized
using the procedure described in the GA22-7000. 176 System
Clock Comparator
The clock comparator associated with the TOD clock is used in virtual
machines for generating interrupts based on actual elapsed time. The ECMODE option must be specified for a virtual machine to use the clock
comparator feature. The Set Clock Comparator (SCKC) instruction
specifies a doubleword value that is placed in the clock comparator. When the TOD clock passes that value, an interrupt is generated.
Pseudo Timer
The pseudo timer is a special VM/370 timing facility. It provides 24 or
32 bytes of time and date information in the format shown in Figure 22.
Figure 22. Formats of Pseudo Timer Information
The first eight-byte field is the date, in EBCDIC, in the form Month/Day-of-Month/Year. The next eight-byte field is the Time of Day
in Hours:Minutes:Seconds. The VIRTCPU and TOTCPU fields contain virtual
processor and total processor time used. The units in which the
processor times are expressed and the length of the fields depend upon
which of two methods is used for interrogating the pseudo timer. PSEUDO TIMER START I/O The pseudo timer can be interrogated by issuing a START I/O to the
pseudo timer device, which is device type TIMER, and is usually at
device address OFF. No I/O interrupt is returned from the SIO. The
address in virtual storage where the timer information is to be placed
is specified in the data address portion of the CCi associated with the SID. This address must not cross a page boundary in the user's address space. If this method is used
the virtual Frocessor and the total
processor times are expressed as fullwords in high resolution interval
timer units. One unit is 13 microseconds. Part 2. Control program (CP) 177
Previous Page Next Page