

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The importance of clock synchronization in distributed systems and the challenges of maintaining synchronized wallclock times. It covers historical time definitions, clock synchronization problems, synchronization algorithms, and correcting clock errors. The document also introduces the network time protocol (ntp) as a solution for clock synchronization in large systems.
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Maria Hybinette, UGA
Maria Hybinette, UGA 2
Maria Hybinette, UGA 3
! Each processor has a local oscillator providing wallclock time values ! At any instant clocks in distinct processors will differ ! Clocks in different processors drift relative to each other Position update generated @ 3. 3.010 3.020 3.030 3.040 3.050 3.060 3.070 3. Wallclock time (processor 2) Wallclock time^ 3.025^ 3.035^ 3.045^ 3.055^ 3.065^ 3.075^ 3.085^ 3. (processor 1) Received @ 3. Message received before it was sent! Dead reckoning? A mechanism to synchronize hardware clocks is needed. Maria Hybinette, UGA 4
» Solar day: time duration that elapses between event where the sun is at the highest point in the sky » 24 hours per solar day, 3600 seconds per hour » Greenwich mean time: solar time at the Greenwich meridian (observatory near London)
» Time duration based on transitions of cesium atom
» Solar day: time duration that elapses between event where the sun is at the highest point in the sky » 24 hours per solar day, 3600 seconds per hour » Greenwich mean time: solar time at the Greenwich meridian (observatory near London)
» Time duration based on transitions of cesium atom
» Resulting time called Coordinated Universal Time (UTC) » Time standard accepted world wide » Disseminated by standards organizations
Maria Hybinette, UGA 7
! = maximum offset allowed between two clocks
» Only an issue if interacting with UTC-based devices Maria Hybinette, UGA 8
» Ci = hardware clock in processor i » T = UTC » Max clock drift ": 1 - "! dCi/dT! 1 + " » Clocks in two processor may drift 2 " per unit UTC
»! = maximum offset allowed between two clocks » Clocks can drift! time units in !/ 2 " time » Resynchronization must be done at least every !/ 2 " time units Maria Hybinette, UGA 9
» Each processor periodically requests current time from a central time server » Server reads local clock and returns current time value
» Central time server periodically sends current time to other processors
» No central time server » Processors use distributed algorithm to synchronize their local clock
Maria Hybinette, UGA 10
TS = local time in requestor when request sent I = interrupt service time T = time value provided by server TR = local time in requestor when response received TR = T + L where L is communication latency Estimate L = (TR - TS - I) / 2 Collect several estimates of L, discard outliers, average Latency often symmetric in LANs, typically not in WANs
» Server periodically broadcasts time values » Requires assumption of message latency
» Avoids single point of failure, bottleneck for large systems » A push algorithm
» Clock information flows down hierarchy » Servers at level i synchronize with servers at level i+ 1
» Level 1 of tree » Synchronized with national time servers
» Level 2 , 3 , …