Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Atomics and Memory Ordering

Status Draft outlineSection Concurrency

Atomicity prevents torn operations; memory ordering constrains what other reads and writes may appear before or after them.

Planned model

Execute litmus tests under relaxed, acquire-release, and sequentially consistent ordering. Display per-thread operations, allowed observations, and synchronization edges.

Questions

  • What correctness property requires an atomic operation?
  • Which write publishes the data and which read consumes it?
  • Why is “the CPU reordered it” an incomplete explanation?

Exercise

Prove the ordering of a one-time publication pattern and identify the weakest defensible ordering for each atomic access.