Sequential consistency

from Wikipedia, the free encyclopedia

Sequential consistency (Engl. Sequential consistency ) is a consistency model for the storage system of multi-processor systems .

It is defined by the following property:

"The result of any execution is the same as if the operations of all the processors were executed in some sequential order, and the operations of each individual processor appear in this sequence in the order specified by its program."

"The result of an execution is the same as if the instructions of all processors were executed in any fixed sequential order and the instructions of each individual processor are executed in the order specified by the program."

- Leslie Lamport : How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs

Each individual processor therefore executes the commands in exactly the order in which they are specified in the program. On the other hand, there is no statement about the order of the commands of different processors, as the following example shows:

 Prozessor 1:     <-- A1 --> <-- B1 -->        <-- C1 -->
 Prozessor 2:       <-- A2 --> <-- B2 -->
 Zeit --------------------------------------------------------------------->

While the order of A1, B1 and C1 (A1 before B1 before C1) and of A2 and B2 (A2 before B2) is fixed, the order of the commands between processors is not defined. Therefore A1 could be done before or after A2 and B1 before or after B2.

Sequential consistency means that memory operations (read, write) appear atomic .

For a multiprocessor system to have sequential consistency, the following conditions must be met:

  • Each processor executes memory accesses in the order specified by the program.
  • Memory accesses from all processors to one and the same memory cell are served in FIFO order .
A switch always connects exactly one processor to the memory one after the other.
Sequential Consistency Model

The property of sequential consistency can be modeled by a switch that connects one of the processors to the memory at any point in time. All processors work through their respective programs sequentially and the switch ensures the serialization of the memory accesses of the processors.

Individual evidence

  1. ^ A b Leslie Lamport: How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs . In: IEEE Transactions on Computers C-28 . tape September 9 , 1979 ( microsoft.com [accessed November 25, 2017]).
  2. ^ A b Sarita V. Adve, Kourosh Gharachorloo: Shared Memory Consistency Models: A Tutorial . Ed .: Western Research Laboratory. 1995.