Lamport Clocks Flashcards
What is the purpose of the Lamport logical clock?
Simple mechanism to capture the happened-before ordering numerically
What is a process pi logical clock, Li used for?
Li used to apply Lamport timestamps to events
How are Lamport timestamps denoted?
The timestamp of event e at pi is denoted by Li(e)
How is the happened-before relation captured?
processes update their logical clocks and transmit the values of their logical clocks in messages
State LC1
LC1: Li is incremented before each event is issued at process pi (Li = Li + 1)
State LC2 sends
LC2: When process pi sends message m, it piggybacks on m the value t = Li
State LC2 recieves
LC2: On receiving (m, t), a process pj computes
Lj = max(Lj, t) and then applies LC1 before timestamping the event receive(m)
State the limitation of Lamport clocks
from L(e) < L(e’) we cannot conclude that e → e’