|
Write Atomicity
- Example (A=0, B=0 initially)
P0: A=1;
P1: while (!A); B=1;
P2: while (!B); print A;
- A correct execution on an SC machine should print A=1
Summary of SC
- Program order from each processor creates a partial order among memory operations
- Interleaving of these partial orders defines a total order
- Sequential consistency: one of many total orders
- A multiprocessor is said to be SC if any execution on this machine is SC compliant
- Sufficient but not necessary conditions for SC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|