liveBook · Manning

Sequential consistency

Sequential consistency is a memory model in which participating operations appear in a single total order that preserves each thread’s program order.

How 2 Manning books explain it

C++ Concurrency in Action, Second Edition

Sequentially consistent ordering requires atomic operations using that ordering to fit one total order consistent with each thread's program order.

How it is used
Provides the default, easier-to-reason-about ordering for C++ atomic operations.
How deep it goes
Works through a four-thread total-order argument and compares guarantees and costs, without detailing CPU instruction sequences.
Examples
Uses two atomic flags, two waiting readers, and an assertion that at least one reader sees both flags set.
What you can do after
Evaluate/understand whether sequentially consistent atomic operations rule out a proposed four-thread observation.

Read how C++ Concurrency in Action, Second Edition explains sequential consistency →

Modern C

Sequential consistency is a memory-consistency model in which all operations on atomic objects appear in one global order consistent with each thread's program order.

How it is used
Uses a strong ordering model to reason about synchronization and the observable order of concurrent atomic operations.
How deep it goes
Explains global linearization, acquire-release implications, C interfaces, and performance costs without developing every implementation detail.
Examples
Uses a two-thread atomic-synchronization figure and declarations for ordinary and explicit C atomic interfaces.
What you can do after
Operate/configure C atomic operations using default sequential consistency or memory_order_seq_cst through _explicit interfaces.

Read how Modern C explains sequential consistency →

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.