Page of GA22-7000-4 Revised September 1, 1975
By TNL:GN22-0498 In a multiprocessing system, each CPU has a sep
arate clock comparator.
The clock comparator has the same format as the
time-of-day clock. In the basic form, the clock com
parator consists of bits0-47, which are compared
with the corresponding bits of the time-of-day clock.
In some models, higher resolution is obtained by
comparing more than 48 bits. When the resolution of
the time-of -day clock is less than that of the clock
comparator, the contents of the clock comparator
are compared with the clock value as this value
would be stored bySTORE CLOCK. Thli! clock comparator causes an external inter
ruption with the interruption code1004 (hex). A re
quest for a clock comparator interruption exists when
ever either of the following conditions exists:• The time-of -day clock is running and the value
of the clock comparator is less than the value
in the compared portion of the time-of-day
dock, both comparands being considered bina
ry unsigned quantities• The clock comparator is installed and the time of -day clock is in the error state or not opera Honal A request for a clock-comparator interruption
does not remain pending when the value of the clock
comparator is made equal to or larger than that of
the time-of -day clock or when the value of the time
of-day clock is made less than the clock-comparator
value.. The latter may occur as a result of the time
of-day clock either being set or wrapping to zero.
The clock comparator can be inspected by means
ofthe: instruction STORE CLOCK COMP ARA TOR and can be set to a specific value by means of
the SETCLOCK COMPARATOR instruction.
The contents of the clock comparator are initial
ized to zero.
Programming Note
The instructionSTORE CLOCK may store a value
which is larger than that in the clock comparator,
even though theCPU is enabled for the clock com
parator interruption. This is because the time-of-day
clock: may be incremented one or more times be
tween the instants when instruction execution is
begun and when the clock value is accessed. Howev
er, in this situation the interruption occurs at the
completion of the execution of the instruction.
An interruption request for clock comparator
persists as long as the clock comparator value is less
than that of theTOO clock or as long as the TOO clock is not operational or in the error state. In view
of this, after an external interruption for clock com
parator has occurred, either the value of the clock
comparator has to be replaced or the clock-
48System/370 Principles of Operation comparator submask has to be set to zero before the CPU is again enabled for external interruptions. Otherwise, loops of external interruptions are
formed.CPU Timer
TheCPU timer provides a means for measuring
elapsedCPU time and for causing an interruption
when a prespecified amount of time has elapsed.
In a multiprocessing system, eachCPU has a sep
arateCPU timer.
TheCPU timer is a binary counter with a format
which is the same as that of the time-of -day clock,
except that bit0 is considered a sign. In the basic
form, theCPU timer is decremented by subtracting a
one in bit position 51 every microsecond. In models
having a higher or lower resolution, a different bit
position is decremented at such a frequency that the
rate of reduction of theCPU timer is the same as if a
one were subtracted in bit position 51 every micro
second. The resolution of theCPU timer is such that
the stepping rate is comparable to the instruction
execution rate of the model.
TheCPU timer causes an external interruption
with the interruption code1005 (hex). A request for
aCPU-timer interruption exists whenever the value
in theCPU timer is negative (bit 0 of the CPU timer
is one). The request does not remain pending when
theCPU-timer value is made positive.
When both theCPU timer and the time-of -day
clock are running, the stepping rates are synchro
nized such that both are stepped at the same rate.
Normally the decrementing of theCPU timer is not
affected by concurrentI/O activity. However, in
some models theCPU timer may stop during ex
tremeI/O activity and other similar interference
situations. In these cases, the time recorded by theCPU timer provides a more accurate measure of the CPU time used by the program than that which
would have been recorded had theCPU timer con
tinued to step.
TheCPU timer is decremented when the CPU is
executing instructions, during the wait state, and
during initial program loading, but it is not decre
mented when theCPU is in the stopped state. When
the rate switch on the system console is in the
instruction-step position, theCPU timer is decre
mented only during the time in which theCPU is
actually performing a unit of operation. Depending
on the model, theCPU timer mayor may not be
decremented when the time-of -day clock is in the
error, stopped, or not-operational state or when theCPU is in the check-stop state.
TheCPU timer can be inspected by means of the
instructionSTORE CPU TIMER and can be set to a
By TNL:
arate clock comparator.
The clock comparator has the same format as the
time-of-day clock. In the basic form, the clock com
parator consists of bits
with the corresponding bits of the time-of-day clock.
In some models, higher resolution is obtained by
comparing more than 48 bits. When the resolution of
the time-of -day clock is less than that of the clock
comparator, the contents of the clock comparator
are compared with the clock value as this value
would be stored by
ruption with the interruption code
quest for a clock comparator interruption exists when
ever either of the following conditions exists:
of the clock comparator is less than the value
in the compared portion of the time-of-day
dock, both comparands being considered bina
ry unsigned quantities
does not remain pending when the value of the clock
comparator is made equal to or larger than that of
the time-of -day clock or when the value of the time
of-day clock is made less than the clock-comparator
value.. The latter may occur as a result of the time
of-day clock either being set or wrapping to zero.
The clock comparator can be inspected by means
of
the SET
The contents of the clock comparator are initial
ized to zero.
Programming Note
The instruction
which is larger than that in the clock comparator,
even though the
parator interruption. This is because the time-of-day
clock: may be incremented one or more times be
tween the instants when instruction execution is
begun and when the clock value is accessed. Howev
er, in this situation the interruption occurs at the
completion of the execution of the instruction.
An interruption request for clock comparator
persists as long as the clock comparator value is less
than that of the
of this, after an external interruption for clock com
parator has occurred, either the value of the clock
comparator has to be replaced or the clock-
48
formed.
The
elapsed
when a prespecified amount of time has elapsed.
In a multiprocessing system, each
arate
The
which is the same as that of the time-of -day clock,
except that bit
form, the
one in bit position 51 every microsecond. In models
having a higher or lower resolution, a different bit
position is decremented at such a frequency that the
rate of reduction of the
one were subtracted in bit position 51 every micro
second. The resolution of the
the stepping rate is comparable to the instruction
execution rate of the model.
The
with the interruption code
a
in the
is one). The request does not remain pending when
the
When both the
clock are running, the stepping rates are synchro
nized such that both are stepped at the same rate.
Normally the decrementing of the
affected by concurrent
some models the
treme
situations. In these cases, the time recorded by the
would have been recorded had the
tinued to step.
The
executing instructions, during the wait state, and
during initial program loading, but it is not decre
mented when the
the rate switch on the system console is in the
instruction-step position, the
mented only during the time in which the
actually performing a unit of operation. Depending
on the model, the
decremented when the time-of -day clock is in the
error, stopped, or not-operational state or when the
The
instruction