cs603 clock synchronization n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CS603 Clock Synchronization PowerPoint Presentation
Download Presentation
CS603 Clock Synchronization

Loading in 2 Seconds...

play fullscreen
1 / 10

CS603 Clock Synchronization - PowerPoint PPT Presentation


  • 97 Views
  • Uploaded on

CS603 Clock Synchronization. February 4, 2002. What is Clock Synchronization?. All nodes agree on time What do we mean by time? Monotonic Any observation increases When sun is overhead, time is “noon” What do we mean by agree?

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CS603 Clock Synchronization' - nanda


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
what is clock synchronization
What is Clock Synchronization?

All nodes agree on time

  • What do we mean by time?
    • Monotonic
    • Any observation increases
    • When sun is overhead, time is “noon”
  • What do we mean by agree?
    • Clocks on different nodes give same reading when time requested simultaneously
    • Can’t distinguish readings from above definition
time in a distributed system
Time in a Distributed System

P

Q

R

q1

p1

r1

q2

p2

q3

p3

q4

r2

p4

q5

r3

q6

event based definition lamport 78
Event-based definition(Lamport ’78)

Define partial order of processes

  • A  B: A “happened before” B: Smallest relation such that:
    • If A and B in same process and A occurs first, A  B
    • If A is sending a message and B is receipt of a message, A  B
    • If A  B and B  C, then A  C
anomalous events
Anomalous Events

P

Q

R

q1

p1

r1

q2

p2

q3

p3

q4

r2

p4

q5

r3

q6

r4

event based definition lamport 781
Event-based definition(Lamport ’78)

Define partial order of processes

  • A  B: A “happened before” B: Smallest relation such that:
    • If A and B in same process and A occurs first, A  B
    • If A is sending a message and B is receipt of a message, A  B
    • If A  B and B  C, then A  C
  • Clock: C(x) is time x occurs:
    • C(x) = Ci(x) where x running on node i.
    • Clocks correct if  a,b: ab  C(a) < C(b)
event based clocks
Event-based clocks

P

Q

R

q1

p1

r1

q2

p2

q3

p3

q4

r2

p4

q5

r3

q6

lamport clock implementation
Lamport Clock Implementation
  • Node i Increments Ci between any two successive events
  • If event a is sending of a message m from i to j,
    • m contains timestamp Tm = Ci(a)
    • Upon receiving m, set Cj≥ current Cj and > Tm
  • Can now define total ordering. a  b iff:
    • Ci(a) < Cj(b)
    • Ci(a) = Cj(b) and Pi < Pj
what if we want wall clock time
What if we want “wall clock” time?
  • Ci must run at correct rate:
    • κ << 1 such that | dCi(t)/dt – 1 | < κ
  • Synchronized:
    •  small ε such that  i,j: | Ci(t) – Cj(t) | < ε
  • Assume transmission time between μ and μ+ξ
  • Algorithm: Upon receiving message m,set Cj(t) = max(Cj(t), Tm+μ)
  • Theorem: Assume every τ seconds a message with unpredictable delay ξ is sent over every arc. Then t ≥ t0 + τd, ε≈ d(2κτ + ξ)
is this it
Is this it?
  • What if we don’t know maximum delay ξ?
  • What if a clock goes “bad”
    • Runs much too fast/slow
    • Gives wrong answers
  • What about network faults?
  • Can we do better in practice?
    • Probabilistic algorithms