Logical Clocks
   HOME

TheInfoList



OR:

A logical clock is a mechanism for capturing chronological and causal relationships in a distributed system. Often, distributed systems may have no physically synchronous global clock. In many applications (such as distributed
GNU make In software development, Make is a build automation tool that automatically builds executable programs and libraries from source code by reading files called ''Makefiles'' which specify how to derive the target program. Though integrated devel ...
), if two processes never interact, the lack of synchronization is unobservable and in these applications it is enough for the processes to agree on the event ordering (i.e., logical clock) rather than the wall-clock time. The first logical clock implementation, the
Lamport timestamps The Lamport timestamp algorithm is a simple logical clock algorithm used to determine the order of events in a distributed computer system. As different nodes or processes will typically not be perfectly synchronized, this algorithm is used to prov ...
, was proposed by Leslie Lamport in 1978 (
Turing Award The ACM A. M. Turing Award is an annual prize given by the Association for Computing Machinery (ACM) for contributions of lasting and major technical importance to computer science. It is generally recognized as the highest distinction in compu ...
in 2013).


Local vs global time

In logical clock systems each process has two data structures: ''logical local time'' and ''logical global time''. Logical local time is used by the process to mark its own events, and logical global time is the local information about global time. A special protocol is used to update logical local time after each local event, and logical global time when processes exchange data.Chapter 3: Logical Time
// Ajay Kshemkalyani and Mukesh Singhal, Distributed Computing: Principles, Algorithms, and Systems, Cambridge University Press, 2008


Applications

Logical clocks are useful in computation analysis, distributed algorithm design, individual event tracking, and exploring computational progress.


Algorithms

Some noteworthy logical clock algorithms are: *
Lamport timestamp The Lamport timestamp algorithm is a simple logical clock algorithm used to determine the order of events in a distributed computer system. As different nodes or processes will typically not be perfectly synchronized, this algorithm is used to pr ...
s, which are monotonically increasing software counters. *
Vector clock A vector clock is a data structure used for determining the partial ordering of events in a distributed system and detecting causality violations. Just as in Lamport timestamps, inter-process messages contain the state of the sending process's lo ...
s, that allow for partial ordering of events in a distributed system. *
Version vector A version vector is a mechanism for tracking changes to data in a distributed system, where multiple agents might update the data at different times. The version vector allows the participants to determine if one update preceded another (happened-b ...
s, order replicas, according to updates, in an optimistic replicated system. *
Matrix clock A matrix clock is a mechanism for capturing chronological and causal relationships in a distributed system. Matrix clocks are a generalization of the notion of vector clocks. A matrix clock maintains a vector of the vector clocks for each communica ...
s, an extension of vector clocks that also contains information about other processes' views of the system.


References


External links


Distributed System Logical Time
// Roberto Baldoni, Silvia Bonomi. MIDLAB, Sapienza University of Rome
Chapter 3: Logical Time
// Ajay Kshemkalyani and Mukesh Singhal, Distributed Computing: Principles, Algorithms, and Systems, Cambridge University Press, 2008
Distributed Systems 06. Logical Clocks
// Paul Krzyzanowski, Rutgers University, Fall 2014 {{DEFAULTSORT:Logical Clock * Causality Distributed algorithms