Sequential consistency


Sequential consistency is one of the consistency models used in the domain of concurrent computing.
It was first defined as the property that requires that
To understand this statement, it is essential to understand one key property of sequential consistency: execution order of program in the same processor is the same as the program order, while execution order of program between processors is undefined. In an example like this:
processor 1: <-- A1 run --> <-- B1 run --> <-- C1 run -->
processor 2: <-- A2 run --> <-- B2 run -->
Time --------------------------------------------------------------------->
execution order between A1, B1 and C1 is preserved, that is, A1 runs before B1, and B1 before C1. The same for A2 and B2. But, as execution order between processors is undefined, B2 might run before or after C1
Conceptually, there is single global memory and a "switch" that connects an arbitrary processor to memory at any time step. Each processor issues memory operations in program order and the switch provides the global serialization among all memory operations
The sequential consistency is weaker than strict consistency, which requires a read from a location to return the value of the last write to that location; strict consistency demands that operations be seen in the order in which they were actually issued.