{
  "status": "unknown",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-10",
  "slug": "lamport-clock",
  "term": "Lamport clock",
  "aliases": [
    "Lamport logical clock",
    "Scalar logical clock"
  ],
  "definition": "A Lamport clock assigns scalar logical timestamps that increase along happened-before relations without identifying every causal dependency.",
  "note": "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. [lamport-clocks]\n\nOrdering 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. [lamport-clocks]\n\nCOPS (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. [cops-clocks]",
  "related": [
    "happened-before",
    "causal-consistency",
    "sequential-consistency"
  ],
  "citations": [
    {
      "id": "lamport-clocks",
      "title": "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.",
      "url": "https://lamport.azurewebsites.net/pubs/time-clocks.pdf",
      "accessed": "2026-11-10"
    },
    {
      "id": "cops-clocks",
      "title": "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.",
      "url": "https://www.cs.cmu.edu/~dga/papers/cops-sosp2011.pdf",
      "accessed": "2026-11-10"
    }
  ],
  "provenance": [
    "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."
  ]
}
