AlgoViz

Concurrency and shared state

medium 4 min

Two requests can overlap even on one processor.

Remember it

The few things worth knowing cold, and how to make them stick.

Memory hook

Two requests can overlap even on one processor. A scheduler can suspend one handler after a read and run another before the first write. Identify the shared resource and the smallest decision that must appear indivisible.