| Lamport Timestamps |
Article Index for Lamport |
Information AboutLamport Timestamps |
| CATEGORIES ABOUT LAMPORT TIMESTAMPS | |
| distributed systems | |
|
It follows some simple rules: # The counter is incremented before each event is issued at the process; # When a process sends a message, it piggybacks on the message the value; # 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. Considerations: For every two events, ''a'' and ''b'' occurring in the same process, and being ''C(x)'' the timestamp for a certain event ''x'', it is necessary that ''C(a)''!=''C(b)'' is always ''true''. Therefore it is necessary that: # The internal physical clock be set so that there is minimum of one clock "tick" between events ''a'' and ''b''; # In a multiprocess or multithreaded environment, it might be necessary to attach the process ID (PID) or any other unique ID to the timestamp so that it is possible to differentiate between events ''a'' and ''b'' which may occur simultaneously in different processes. |
|
|