The TOD clock on IBM mainframes is an 8-byte hardware register than can
be stored by a special hardware instruction. It can be used to derive
wall clock time, but its other function is to provide a unique
time-stamp value that can be used for tracking and ordering system
events. As such it contains a large (52-bit) unsigned microsecond
counter, with trailing CPU-dependent bits to force uniqueness in
multi-processor environments. Its intended setting at hardware
initialization time is the number of microseconds since 0000 GMT on Jan
1, 1900. At operating system initialization time, local time offset
from GMT is supplied and used to generate a TOD clock offset value that
is saved for converting GMT-based TOD values to a local time equivalent.
There are Operating System interfaces to request time values as either
a raw TOD value, or as GMT or local clock time in various formats. For
several years now z-architecture machines also support an Extended TOD
clock register (with a different instruction to store it) which has 8
more high-order bits to extend the unique range of approximately 142
years to in excess of 36,000 years, and additional low-order bits to add
additional resolution for faster processors. For compatibility the
hardware also continues to supply a subset of the Extended TOD clock
bits when the old TOD clock is requested.
My impression of the PC clock is that it was never intended for any
purpose other than maintaining wall clock time, and as such has
appropriately low resolution. My other impression is that there is some
Operating system involvement in maintaining its value on the PC: that
the clock may run "slow" on a system that is totally maxed out or unable
to service interrupts for an extended period. On the original S/360
introduced in 1964, I believe a System Timer, which also required
periodic interrupt servicing, was used to track clock time and it had
similar drift problems. I believe the hardware TOD clock was introduced
with the following IBM S/370 architecture, so it has been around for at
least 30 years.
[EMAIL PROTECTED] wrote:
Hi folks!!
Just a quick question. IS the TOD clock in the mainframes the same as
the CMOS or RTC in standard PCs?
I know its different in a way, but you see, I am running a UNIX
operating system on a PC and I did set my CMOS or the Hardware Clock to
use the system time as UTC while the operating system clock or the
DISPLAYED TIME is set to local time adjusted from the CMOS clock in the
BIOS which is in UTC.
Would this be the same concept as if I were to set the TOD clcok to UTC
in a mainframe?
Is the TOD clock the same clock as the CMOS or the Real Time Clock in
my home PC?
thanks.
--
Joel C. Ewing, Fort Smith, AR [EMAIL PROTECTED]
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html