Clocks and Time in Distributed Systems

Underlying communications services often deliver a bit-level clock to time data on and off the wire. In some systems (e.g. E1/Megastream, or the UK electricity clock cycle) this is globally guaranteed to some level of accuracy. However, higher level protocols usually rely on networks built out of LANs connected via routers and long haul links. In such systems, applications may be attached to different networks. Hence although each network may have its own bit level clock, there is no common bit level clock available to both applications. Hence a clock is needed at a higher level available to both end points. A high level clock synchronization mechanism is then often useful to provide coordinated time. Examples of such systems are the Network Time Protocol and the Digital Time Service, which use periodic exchanges of timestamped messages to estimate network transit delays, and therefore derive clock differences. A hierarchy of time servers is formed based on the measured accuracy and reliability of reports. Nowadays, enterprises will even site atomic or satellite fed Global Positioning System receiver based clocks at a number of key places on the network to support such a service. Few distributed systems make use of this, but it could be very powerful in optimizing performance. However, havign global application level agreement on time can save application level handshake phases in many situations.