Lamport timestamps |
Leslie Lamport invented a simple mechanism by which the happened-before ordering can be captured numerically. A Lamport logical clock is a monotonically incrementing software counter.
It follows some simple rules:
1) The counter is incremented before each event is issued at the process.
2) When a process sends a message, it piggybacks on the message the value.
3) On receiving a message a process computes the counter as the maximum between their own value and the received value and then applies rule 1 before timestamping the event as received.|
|