lamport-clock · also Lamport logical clock, Scalar logical clock

Lamport clock

A Lamport clock assigns scalar logical timestamps that increase along happened-before relations without identifying every causal dependency.

Related Observatory article: Lamport clock on hesela.com

For integer counters, increment before each local or send event; timestamp a receive with max(local, message) + 1. Thus a -> b implies C(a) < C(b), but the converse fails. [1]

Ordering first by timestamp and then by a fixed order of unique process IDs gives a total order consistent with causality, not elapsed time or proof of communication. [1]

COPS (2011) combines a Lamport clock with a unique node identifier to order versions for last-writer-wins conflict handling. It separately checks dependencies before exposing remotely replicated writes. The version number alone does not establish dependency availability. [2]

Relations

related
Happened-before relation, Causal consistency, Sequential consistency

Citations

  1. Leslie Lamport. Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM 21(7), 558-565, July 1978; pp. 559-562. (accessed 2026-11-10)
  2. Lloyd et al. Don't Settle for Eventual: Scalable Causal Consistency for Wide-Area Storage with COPS. SOSP 2011, sections 3, 4.4 and 5.3. (accessed 2026-11-10)
Sources & caveats
  • Lamport 1978, printed pp. 559-562: Clock Condition, integer implementation and total-order construction. The formula is a valid unit-increment implementation, not a verbatim quotation.
  • COPS 2011, sections 4.4 and 5.3: version construction and separate dependency checks. Source synthesis, not a system benchmark.

JSON: /data/terms/lamport-clock.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Lamport clock. Hesela. 2026-11-10. https://hesela.dev/terms/lamport-clock/