A11_Clocks-Synch1 - Synchronization in Distributed Systems Chapter 6 Guide to Synchronization Lectures Synchronization in shared memory systems

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

View Full Document Right Arrow Icon
Synchronization in Distributed Systems Chapter 6
Background image of page 1

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

View Full DocumentRight Arrow Icon
Guide to Synchronization Lectures Synchronization in shared memory systems Event ordering in distributed systems Logical time, logical clocks, time stamps, Mutual exclusion in distributed systems Election algorithms Data race detection in multithreaded programs
Background image of page 2
Background Synchronization: coordination of actions between processes. Processes are usually asynchronous, (operate without regard to events in other processes) Sometimes need to cooperate/synchronize For mutual exclusion For event ordering (was message x from process P sent before or after message y from process Q?)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Introduction Synchronization in centralized systems is primarily accomplished through shared memory Event ordering is clear because all events are timed by the same clock Synchronization in distributed systems is harder No shared memory No common clock
Background image of page 4
Clock Synchronization Some applications rely on event ordering to be successful See page 232 for some examples Event ordering is easier if you can accurately time-stamp events, but in a distributed system the clocks may not always be synchronized Is it possible to synchronize clocks in a distributed system?
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 - pages 233-238 Physical clock example: counter + holding register + oscillating quartz crystal The counter is decremented at each oscillation Counter interrupts when it reaches zero Reloads from the holding register Interrupt = clock tick (often 60 times/second) Software clock: counts interrupts This value represents number of seconds since some predetermined time (Jan 1, 1970 for UNIX systems; beginning of the Gregorian calendar for Microsoft) Can be converted to normal clock times
Background image of page 6
Clock Skew In a distributed system each computer has its own clock Each crystal will oscillate at slightly different rate. Over time, the software clock values on the different computers are no longer the same.
Background image of page 7

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

View Full DocumentRight Arrow Icon
Clock Skew Clock skew(offset) : the difference between the times on two different clocks C lock drift : the difference between a clock and actual time Ordinary quartz clocks drift by ~ 1sec in 11-12 days. (10 -6 secs/sec) High precision quartz clocks drift rate is somewhat better
Background image of page 8
Various Ways of Measuring Time* The sun Mean solar second – gradually getting longer International Atomic Time (TAI) Atomic clocks are based on transitions of the cesium atom Atomic second = value of solar second at some fixed time (no longer accurate) Universal Coordinated Time (UTC) Based on TAI seconds, but more accurately reflects sun time (inserts leap seconds)
Background image of page 9

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

View Full DocumentRight Arrow Icon
Getting the Correct (UTC) Time* WWV radio station or similar stations in other countries (accurate to +/- 10 msec) UTC services provided by earth satellites (accurate to .5 msec) GPS (Global Positioning System) (accurate to 20-35 nanoseconds)
Background image of page 10
Clock Synchronization Algorithms* In a distributed system one machine may
Background image of page 11

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

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

This note was uploaded on 12/14/2011 for the course CS 690 taught by Professor Staff during the Fall '11 term at University of Alabama - Huntsville.

Page1 / 55

A11_Clocks-Synch1 - Synchronization in Distributed Systems Chapter 6 Guide to Synchronization Lectures Synchronization in shared memory systems

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online