Question OS-SYNC-0016
Hardx is a shared variable initialised to 0. Two threads each run x = x + 1 once (load, add, store) with no synchronisation. What can the final value of x be?
- A.
1 or 2
- B.
Only 1
- C.
Sign up free to see the answer and a step-by-step explanation.