...
Execution Order | Assignment | Assigned Value | Notes |
---|---|---|---|
1. |
| 10 |
|
2. |
| 20 |
|
3. |
| 0 | Reads initial value of |
4. |
| 0 | Reads initial value of |
In this ordering, a
r1
and b
r2
read the values of future write operations because reads are permitted to see future writesoriginal values of the variables a
and b
even though they might be expected to see the updated values.
Execution Order | Statement | Assigned Value | Notes |
---|---|---|---|
1. |
| 20 | Reads later value (in step 4.) of write, that is 20 |
2. |
| 10 | Reads later value (in step 3.) of write, that is 10 |
3. |
| 10 |
|
4. |
| 20 |
|
In this ordering, a
r1
and b
r2
read the values of a
and b
written from step 3 and 4, before the steps are executed. Such counter-intuitive behavior necessitates the sequential consistency property.
...