Question OS-SYNC-0077
HardWhat does an atomic compare-and-swap (CAS) do?
- A.
Locks the whole memory bus forever
- B.
Writes a new value only if the memory still holds the expected value, as one indivisible step
- C.
Sign up free to see the answer and a step-by-step explanation.