Time in Distributed Systems - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Time in Distributed Systems

Description:

Clocks and Clock Drifts. Quartz Clocks. Accuracy: 10^6 (1 ... Managed by an atomic clock. Propagated by radio and satellite signals. Delay? Speed of light ... – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 12
Provided by: umar2
Category:

less

Transcript and Presenter's Notes

Title: Time in Distributed Systems


1
Time in Distributed Systems
  • Distributed Systems, Lecture 7

2
Why Time is Important?
  • If you work in the industry, you never have to
    worry about this
  • Youll rarely have to architect a
    time-coordination framework

3
Why is Time important?
  • There is no such thing as absolute time
  • Read A Brief History of Time (Stephan Hawking)
  • Lets assume there was a big bang, t0
  • UNIX epoch (big bang) Jan 1, 1971
  • Mostly for causal ordering

4
Ugliness of Time
  • Humans measure it in astronomical terms
  • Computers measure it either as
  • Quartz crystal oscillations
  • Atomic Caesium - 133 transitions between
    hyperfine levels of the ground state
  • These things get out of synch
  • We add leap seconds

5
Clocks and Clock Drifts
  • Quartz Clocks
  • Accuracy 106 (1 second in 11.6 days)
  • Atomic Clocks
  • Accuracy 1013 (1 second in 300,000 years)

6
UTC
  • Universal Time Coordinated
  • Managed by an atomic clock
  • Propagated by radio and satellite signals
  • Delay?
  • Speed of light

7
Cristians algorithm
  • Client asks the Server
  • Sets its time to
  • Server transmission delay
  • Assumptions
  • Consistent Delay
  • Symmetric Delay
  • Problems
  • Server can crash
  • Security

8
Berkeleys Algorithm
  • Server Polls clients
  • Keeps an estimate of client delay
  • Server takes a fault-tolerant average
  • Drop out-liers
  • Take an average (including its own)
  • Propagate the delta (not time)

9
NTP
  • Hierarchical time dissemination
  • Time Correction cant role back time
  • Root talks to strata 1, strata 1 talks to strata
    2 and so on
  • Hosts ranked on strata number
  • Use a dispersion filter to rank hosts
  • Dispersion filter variation of delay

10
What we really care about
  • Causal ordering
  • Lamport clocks
  • Monotonically increasing counter per process
    (host)
  • Only meaningful for one pair
  • No global ordering

11
Vector Clocks
  • Lamport Clocks
  • One clock for every process (host)
  • Vector of size N, for an N node system
  • Imposes total ordering
  • Not very scalable
Write a Comment
User Comments (0)
About PowerShow.com