Skip to content

wikipedia Happened-before

For example, in some programming languages such as Java, C++ or Rust, a happens-before edge exists if memory written to by statement A is visible to statement B, that is, if statement A completes its write before statement B starts its read.

NOTE:

1、上述三种programming language的memory model都是基于happens-before relation而建立的

Like all strict partial orders, the happened-before relation is transitive, irreflexive and antisymmetric, i.e.

The processes that make up a distributed system have no knowledge of the happened-before relation unless they use a logical clock, like a Lamport clock or a vector clock. This allows one to design algorithms for mutual exclusion, and tasks like debugging or optimising distributed systems.

NOTE:

1、它是构建distributed system的基础

2、formal description