liveBook · Manning

Physical clock

As explained in Think Distributed Systems

A physical clock is a timekeeping mechanism that measures elapsed or calendar time using a physical process.

A physical clock measures elapsed or calendar time through a physical process. In distributed systems, each component uses an imperfect actual clock rather than a hypothetical perfect wall clock. section 2.2.3

Two imperfections make timestamps from different components difficult to compare:

  • Clock skew is a fixed time difference between clocks. section 2.2.3
  • Clock drift is a difference in tick frequency that causes clocks to diverge over time. section 2.2.3
  • NTP mitigates both problems by having clients adjust their clocks toward an NTP server’s reading. section 2.2.3

Two clocks

Two clocks may begin five minutes apart and preserve that offset, showing skew; or begin together and gradually separate, showing drift. Adjusting a clock backward can make time appear to move backward, motivating time-of-day and monotonic clocks. section 2.2.3

Figure 2.16 Clock skew
A black and white image of a clock

AI-generated content may be incorrect.

Visualizes two clocks maintaining a fixed time difference. section 2.2.3

Figure 2.17 Clock drift
A black and white clock

AI-generated content may be incorrect.

Visualizes two clocks gradually diverging because their tick frequencies differ. section 2.2.3

How Think Distributed Systems covers it

How deep it goes
Explains wall clocks, skew, drift, synchronization, and clock types, but does not develop synchronization protocols internally.
Examples
Uses a hypothetical wall clock, fixed-offset clocks, diverging clocks, and time-of-day versus monotonic clock listings.
What you can do after
Apply it via NTP and distinguish skew, drift, and backward-adjustment risks when interpreting distributed timestamps.
How it connects
Connects physical time with logical clocks, clock skew, clock drift, NTP, concurrency, and parallelism.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Think Distributed Systems. The section links point to the parts of the book it draws on.