initial: a = 1, b = 1, c = 1
thread 1 | thread 2 | thread 3 |
---|---|---|
P(a) | P(c) | P(c) |
P(b) | P(b) | V(c) |
V(b) | V(b) | P(b) |
P(c) | V(c) | P(a) |
V(c) | P(a) | V(a) |
V(a) | V(a) | V(b) |
A.
thread 1: a&b, a&c
thread 2: b&c
thread 3: a&b
B.
thread 2 and thread 3
C.
keep same order P(a), P(b), P(c) in every thread