Vector Clocks and Detecting Concurrency
Compare componentwise knowledge across events and use incomparable vectors to identify concurrent observations.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
One coordinate represents each process
Under the standard fixed-participant scheme, a process increments its own coordinate for an event. A received message is incorporated by taking componentwise maxima with its timestamp, then incrementing the receiver coordinate for the receive event. If clock \((3,1)\) receives \((2,4)\) at the first process, it becomes \((4,4)\). The maxima combine knowledge of events seen through different paths.
Strict componentwise comparison captures causal order in the model
If \(u\) is at most \(v\) in all positions and strictly smaller in one, the represented event order is causal under the scheme’s assumptions. Vectors \((3,1)\) and \((2,4)\) are incomparable. This costs state proportional to participants and requires conventions for membership changes. Lamport clocks are more compact but cannot identify concurrency by comparison alone. Causal replication uses this information to delay a dependent update until its prerequisites can be seen.[1][2]