10 Physical Clocks

Hardware Clock

In the machine, hardware clock (quartz clock). Generates periodic electric signals, sends interrupt signal to CPU, CPU halts whatever the fuck it's doing, and jump to interrupt handler.

Problem is, it's not accurate.

Clock Skew is how much 2 clocks vary from each other.

Atomic Clock

Extremely accurate. We must synchronize

Syncrhonization

Precision (π)

measure of how much two clocks differ from one another

∀t, ∀p, q : |Cp(t) − Cq(t)| ≤ π

No matter when you check, the readings of any two clocks in the system are at most π apart.

Accuracy (α)

measure of how much a clock differs from some external reference point

∀t, ∀p : |Cp(t) − t| ≤ α

No matter when you check, each clock is at most α off from real time.

External Synchronization

represents a system where two clocks are accurate: they both attempt to synchronize to some external reference point.

Clock Drift

Rate difference between two clocks

Bounding Clock Drift

Say the maximum drift rate of a clock is ρ per unit of time

At a max, two clocks drift exactly apart, thus difference grows by 2*ρ every unit of time.

To bound a max diff in clocks of π, we need to synchronize every π/(2*ρ) units of time.