|
|
Observe that:
|
T1 T2 ================================= READ(A, t) t = t + 100 WRITE(A, t) READ(A, s) s = 2×s WRITE(A, s) READ(B, s) s = 2×s WRITE(B, s) READ(B, t) t = t + 100 WRITE(B, t) |
T1 T2 A B ======================================================= | READ(A, t) c c | t = t + 100 | WRITE(A, t) --------------------> c+100 | | READ(A, s) | s = 2×s | WRITE(A, s) ----> 2c+200 | | READ(B, s) | s = 2×s | WRITE(B, s) -------------> 2c | | READ(B, t) | t = t + 100 | WRITE(B, t) ------------------------------> 2c+100 V time |
At the end of the execution, we have:
A = 2c + 100 B = c + 100 (A ≠ B, which is not possible in a serial execution of T1 and T2) |
Therefore:
|