List the 8 Fallacies of Distributed Computing.
What is the 9th fallacy sometimes added?
All clocks are synchronised.
Why do distributed systems need time?
Schedulers
What are Physical clocks?
Count number of seconds elapsed.
What are Logical clocks?
Count events (e.g. messages sent).
Why is time difficult in DS?
No global agreement on time. Each machine has own clock running at slightly different rate.
What is Clock Skew?
Different clocks running at slightly different rates in a distributed system.
How do Quartz clocks work?
Crystal resonates at specific frequency via piezoelectric effect. Count cycles to measure time.
What is clock drift measured in?
Parts per million (ppm). 1 ppm = 1 μs/sec = 86 ms/day = 32 s/year. Most computers within 50 ppm.
What happens if two clocks drift opposite directions?
After time δt they may be 2ρδt apart (where ρ is max drift rate).
What was TAI before 1958?
Time based on mean solar second: 1/86
What is TAI (International Atomic Time)?
1 second = time for caesium-133 to make 9,192,631,770 electronic transitions.
Why are leap seconds needed?
Mean solar day growing longer. Without them
What is UTC?
Universal Coordinated Time - TAI corrected with leap seconds to match solar time.
What is Unix time?
Seconds since 1 January 1970 00:00:00 UTC (the epoch)
What is ISO 8601?
Date format: year
How does most software deal with leap seconds?
Ignores them! Smearing spreads leap second over a day.
When to use Cristian’s Algorithm?
One machine has UTC receiver - synchronise others with it.
When to use Berkeley Algorithm?
No machines have UTC receivers - just minimise clock skew between them.
What is the drift rate constraint for proper clock?
1 - ρ ≤ dC/dt ≤ 1 + ρ where ρ is max drift rate.
How does Cristian’s Algorithm work?
Client asks UTC server for time, server responds. Client adjusts gradually to avoid time running backward.
What is the formula for round-trip delay in Cristian’s?
δ = (t₄ - t₁) - (t₃ - t₂)
What is estimated server time when client receives response?
t₃ + δ/2
What is estimated clock skew in Cristian’s?
θ = t₃ + δ/2 - t₄ = (t₂ - t₁ + t₃ - t₄)/2