Faking atomicity
Instead of atomic exchange, have an instruction pair that can be deduced to have operated in an atomic fashion
Load locked (ll) + Store conditional (sc) (Alpha)
- sc detects if the value of the memory location loaded by ll has been modified. If so returns 0 otherwise 1
- Similar to atomic exchange but does nor require read-modify-write
Implementation
- Use a special register to store the address of the memory location addressed by ll . On interrupt or invalidation of block corresponding to that address (by another sc), the register is cleared. If on sc, the addresses match, the sc succeeds