liveBook · Manning

Memory ordering

Memory ordering is the set of rules governing the permitted ordering and visibility of memory operations across concurrent execution contexts.

How 2 Manning books explain it

C++ Concurrency in Action, Second Edition

The constraints governing how memory operations are ordered and observed across threads in the C++ memory model.

How it is used
Governs what atomic operations make observable across threads, particularly when publishing data or implementing lock-free structures.
How deep it goes
Works through contrasting ordering models and a lock-free stack’s success and retry paths, including the relationships each path requires.
Examples
Contrasts two-flag thread examples with a release-acquire flag handoff and a reference-counted lock-free stack.
What you can do after
Apply it via `std::atomic` memory-order arguments by deriving required happens-before relationships before weakening success or retry paths.

Read how C++ Concurrency in Action, Second Edition explains memory ordering →

Latency

Memory ordering is the set of rules governing the observable order in which memory operations become effective across concurrent execution contexts.

How it is used
Controls visibility and ordering in lock-free and wait-free concurrent algorithms.
How deep it goes
Explains CPU reordering, barrier roles, ordering modes, and a runnable invariant-violation example.
Examples
Uses Rust atomics, a value-and-done flag pair, repeated execution, and sorted output to expose an invariant violation.
What you can do after
Apply it via Rust or C++ atomic APIs to publish data safely between concurrent threads.

Read how Latency explains memory ordering →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.