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

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

View Full Document Right Arrow Icon
Distributed Systems Principles and Paradigms Chapter 05 Synchronization
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
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
Background image of page 5

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

View Full DocumentRight Arrow Icon
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
Background image of page 6
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.
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/09/2010 for the course SC 13 taught by Professor Dr.grant during the Spring '10 term at University of Illinois, Urbana Champaign.

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 Right Arrow Icon
Ask a homework question - tutors are online