Time Of Day Clock; Clock Comparator And Cpu Timer - IBM System/370 145 Manual

Hide thumbs Also See for System/370 145:
Table of Contents

Advertisement

TIME OF DAY CLOCK
This clock is a binary countel( of 52 bits with a cycle of
approximately 143 years.
It is
il
standard feature.
The clock is
updated every microsecond.
Two new instructions (SET CLOCK and STORE
CLOCK) are provided to set the time and to request that the current time
be stored in the specified
doublt~word
of processor storage.
The time
can be set only when the CPU is in supervisor state and only when the
clock security switch on the syst:.em console panel is held in the enable
set position.
The time of day clock can be llsed for more accurate time stamping
than the interval timer.
More a(::curate time of day can be maintained
because, during normal system operation. the clock stops only when CPU
power is turned off.
(CE use of certain system test modes and an error
in the clock will invalidate the clock time.)
The interval timer cannot
be as accurate as the clock for i:.ime of day maintenance because it is
not updated when the system is in the stopped state and its updating may
be omitted under certain conditions of excessive system activity.
The
15.5-hour cycle time of the
inteJ~val
timer is also a restriction.
The
time of day clock better answers the timing needs of teleprocessing and
real-time applications.
CLOCK COMPARATOR AND CPU TIMER
These timing facilities are an optional feature on the Model 145.
The Clock comparator provides
a nreans
of causing an external
interruption when the time of day clock has passed a time specified
by
a
program.
This feature can be
uSE~d
to initiate an action, terminate an
operation, or inspect an activitjr, for example, at specific clock times
during system operation.
The clock comparator is imp1emented in control storage and has the
same format as the time of day cl.ock.
The clock comparator is set to
zero during IPL.
The SET CLOCK COMPARATOR privileged instruction is
provided to place a value that
rE~presents
a time of day in the clock
comparator.
When clock comparator interruptions are specified via the
external interruption summary mas;k bit in the current PSW and the clock
comparator subclass mask bit in c:ontrol register 0, an external
interruption occurs when the
timE~
of day clock value is greater than the
clock comparator value,.
Bits 0
t~o
51 of the time of day clock and the
clock comparator are compared.
1:f clock comparator interruptions are
masked when this condition occurs;, the interruption remains pending only
as long as the time of day clock value remains higher than the value in
the clock comparator.
The STORE CLOCK COMPARATOR privileged instruction
can be used to obtain the
current~
value of the clock comparator.
The use of a clock comparator instead of the interval timer at
location 80 to cause an interrupt.ion when a specified time is passed
offers two advantages.
First, the time of day clock increments when the
system is in the stopped state while the interval timer does not.
Hence, if a system stop occurs
du~ing
processing and the system is
restarted. the clock comparator c:an still cause an interruption at the
time requested.
The interruption. caused by the interval timer in such a
situation is late.
second, imple!menting the time of day clock and the
clock comparator in the same format eliminates having to convert
doubleword time of day clock valu.es to single word interval timer
values.
The CPU timer provides a means: of causing an external interruption
when an interval of time specified
by
a program has elapsed.
The CPU
timer is implemented in local storage as a binary counter with a format
identical to that of the time of day clock; however, bit 0 of the CPU
timer is considered to be a sign.
The CPU timer has a maximum time
A Guide to the IBM System/370 Mod.el 145
23

Advertisement

Table of Contents
loading

Table of Contents