Clock Synchronization
Publish date: Jan 21, 2020
Last updated: Apr 22, 2020
Last updated: Apr 22, 2020
Clock Synchronization
- coordinate otherwise independent clocks
- clock drift can result in clock skew
- it is impossible to synchronize the clocks perfectly
Problems
- expecially in distributed environment
- in Unix systems the
make command
is used to compile new or modified code and seeks to avoid recompiling unchanged code. The make command uses the clock of the machine it runs on to determine which source files need to be recompiled. If the sources reside on a separate file server and the two machines have unsynchronized clocks, the make program might not produce the correct results - Streaming media
- Audio over Ethernet
Solutions
$$ (Epoch Timestamp)_{64 bits} = 32(seconds) + 32(fraction second) $$
- Epoch time 1990
- Clock roll over period 2036
- Round trip delay
- Absolute time difference between clocks
Central server environment
Potential solutions to the clock synchronization problem in this environment
- Cristian’s algorithm
- the Berkeley algorithm
Distributed Environment setting
- Global time is not known
- NTP - Network time protocol
- Layered client -server architecture
- basded on UDP protocol
In a wireless network
the problem becomes even more challenging due to the possibility of collision of the synchronization packets on the wireless medium and the higher drift rate of clocks on the low-cost wireless devices.4
NTP - Network Time Protocol
- networking protocol for clock synchronization
- It uses the intersection algorithm, a modified version of Marzullo’s algorithm, to select accurate time servers and is designed to mitigate the effects of variable network latency
- Software implementation -
chrony
Chrony
- NTP implementation
Security
- NTP Protocols may be susceptible to man-in-the-middle attacks
- used in Distributed DoS attack2
Footnotes
[^6]: