# Lecture05-1 - Distributed Systems Principles and Paradigms...

This preview shows pages 1–8. Sign up to view the full content.

Distributed Systems Principles and Paradigms Chapter 05 Synchronization

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Communication & Synchronization Why do processes communicate in DS? To exchange messages To synchronize processes Why do processes synchronize in DS? To coordinate access of shared resources To order events
Time, Clocks and Clock Synchronization Time Why is time important in DS? E.g. UNIX make utility (see Fig. 5-1) Clocks (Timer) Physical clocks Logical clocks (introduced by Leslie Lamport) Vector clocks (introduced by Collin Fidge) Clock Synchronization How do we synchronize clocks with real-world time? How do we synchronize clocks with each other? 05 – 1 Distributed Algorithms/5.1 Clock Synchronization

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Physical Clocks (1/3) Problem: Clock Skew – clocks gradually get out of synch and give different values Solution: Universal Coordinated Time (UTC): Formerly called GMT (Greenwich Mean Time) Based on the number of transitions per second of the cesium 133 atom (very accurate). At present, the real time is taken as the average of some 50 cesium-clocks around the world – International Atomic Time Introduces a leap second from time to time to compensate that days are getting longer. UTC is broadcasted through short wave radio (with the accuracy of +/- 1 msec) and satellite (Geostationary Environment Operational Satellite, GEOS, with the accuracy of +/- 0.5 msec). Question: Does this solve all our problems? Don’t we now have some global timing mechanism? 05 – 2 Distributed Algorithms/5.1 Clock
Physical Clocks (2/3) Problem: Suppose we have a distributed system with a UTC- receiver somewhere in it, we still have to distribute its time to each machine. Basic principle: Every machine has a timer that generates an interrupt H (typically 60) times per second. There is a clock in machine p that ticks on each timer interrupt. Denote the value of that clock by Cp ( t) , where t is UTC time. Ideally, we have that for each machine p , Cp ( t) = t , or, in other words, dC/ dt = 1 Theoretically, a timer with H=60 should generate 216,000 ticks per hour In practice, the relative error of modern timer chips is 10**-5 (or between 215,998 and 216,002 ticks per hour) 05 – 3 Distributed Algorithms/5.1 Clock Synchronization

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Physical Clocks (3/3) Goal: Never let two clocks in any system differ by more than δ time units => synchronize at least every δ / 2 ρ seconds. 05 – 4 Distributed Algorithms/5.1 Clock Synchronization Where ρ is the max. drift rate
Clock Synchronization Principles Principle I: Every machine asks a time server for the accurate time at least once every δ / 2 ρ seconds (see Fig. 5- 5). But you need an accurate measure of round trip delay, including interrupt handling and processing incoming messages. Principle II: Let the time server scan all machines periodically, calculate an average, and inform each machine how it should adjust its time relative to its present time.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 54

Lecture05-1 - Distributed Systems Principles and Paradigms...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online