Time and Global State
Time and global state concern how a distributed system orders events and reasons about its collective condition when there is no shared clock and no instantaneous global view.
Definition
In a distributed system events occur at separate processes with no shared clock; the study of time and global state provides the relations and algorithms—logical and vector clocks, snapshots, and ordered delivery—that let the system order events causally and capture consistent global states.
Scope
This area covers logical clocks and the happened-before relation, physical clock synchronization, vector clocks and the detection of causality and concurrency, the determination of consistent global snapshots, and the ordering guarantees (FIFO, causal, total) needed for reliable multicast. Together these tools let distributed systems make meaningful statements about 'when' and 'what state' despite the absence of a global clock.
Sub-topics
Core questions
- How can events at different processes be ordered without a shared physical clock?
- How can a process determine whether two events are causally related or concurrent?
- How can a consistent global snapshot be recorded while computation continues?
- What ordering guarantees on message delivery are needed to preserve causality?
Key theories
- Happened-before and logical clocks
- Lamport's happened-before relation defines a partial causal order on events, and logical (scalar) clocks assign timestamps consistent with it, providing a clock-free notion of order sufficient to build a total order for many protocols.
- Vector clocks and causality
- Vector clocks extend logical clocks so that comparing two timestamps exactly captures whether one event causally precedes another or whether the two are concurrent, enabling precise causality tracking.
- Consistent global snapshots
- The Chandy-Lamport snapshot algorithm records a consistent global state—process states plus in-transit messages—without halting the system, by propagating markers along channels.
Clinical relevance
Logical and vector clocks underpin causal consistency, conflict detection in replicated stores, and debugging of distributed executions; consistent snapshots underpin distributed checkpointing, deadlock and termination detection, and stream-processing fault recovery.
History
Lamport's 1978 paper introduced logical time and the happened-before relation, one of the most cited results in computer science; Chandy and Lamport formalized consistent global snapshots in 1985; and Fidge and Mattern independently developed vector clocks in the late 1980s, completing the foundational toolkit for reasoning about time and state.
Key figures
- Leslie Lamport
- K. Mani Chandy
- Colin Fidge
- Friedemann Mattern
Related topics
Seminal works
- lamport1978
- chandy1985
- fidge1988
Frequently asked questions
- Why can't distributed systems just use synchronized physical clocks?
- Physical clocks drift and cannot be synchronized perfectly across a network with variable delay, so two events' real-time order can be ambiguous. Logical and vector clocks instead capture the causal order that actually matters for correctness.
- What makes a global snapshot 'consistent'?
- A snapshot is consistent if, whenever it includes the receipt of a message, it also includes that message's send. Such a state could have occurred during the execution, even though no single instant was ever observed globally.