Lec7 - ECE151 Lecture 7 Chapter 5 Synchronization ECE151...

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

View Full Document Right Arrow Icon
ECE151 – Lecture 7 1 ECE151 – Lecture 7 Chapter 5 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
ECE151 – Lecture 7 2 Clock Synchronization When each machine has its own clock, an event that occurred after another event may nevertheless be assigned an earlier time. Physical clocks Logical clocks Vector clocks
Background image of page 2
ECE151 – Lecture 7 3 Physical Clocks Problem: Sometimes we simply need the exact time, not just an ordering. Solution: Universal Coordinated Time (UTC): Based on the number of transitions per second of the cesium 133 atom (pretty accurate). At present, the real time is taken as the average of some 50 cesium- clocks around the world. Introduces a leap second from time to time to compensate that days are getting longer. UTC is broadcast through short wave radio and satellite. Satellites can give an accuracy of about 0 5 ms. Question: Does this solve all our problems? Don’t we now have some global timing mechanism?
Background image of page 3

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

View Full DocumentRight Arrow Icon
ECE151 – Lecture 7 4 Physical Clocks (1) Computation of the mean solar day.
Background image of page 4
ECE151 – Lecture 7 5 Physical Clocks (2) TAI seconds are of constant length, unlike solar seconds. Leap seconds are introduced when necessary to keep in phase with the sun.
Background image of page 5

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

View Full DocumentRight Arrow Icon
ECE151 – Lecture 7 6 Physical Clocks 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 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
Background image of page 6
ECE151 – Lecture 7 7 Clock Synchronization Algorithms The relation between clock time and UTC when clocks tick at different rates. In practice: 1 - ρ < dC/dt < 1 + ρ Goal: Never let two clocks in any system differ by more than δ time units synchronize at least every δ /(2 ρ ) seconds.
Background image of page 7

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

View Full DocumentRight Arrow Icon
ECE151 – Lecture 7 8 Clock Synchronization Principles Principle I: Every machine asks a time server for the accurate time at least once every δ /(2 ρ ) seconds. Okay, 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. Okay, you’ll probably get every machine in sync. You don’t even need to propagate UTC time (why not?) Fundamental problem: You’ll have to ensure that setting time back is never allowed (smooth adjustments)
Background image of page 8
ECE151 – Lecture 7 9 Cristian's Algorithm Getting the current time from a time server.
Background image of page 9

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

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

This note was uploaded on 05/04/2008 for the course ECE 151 taught by Professor Melliar-smith during the Spring '08 term at UCSB.

Page1 / 29

Lec7 - ECE151 Lecture 7 Chapter 5 Synchronization ECE151...

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

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