Consistency model
A consistency model is a formal specification of how operations on state may be ordered and what values those operations can observe.
Modern C
A C memory model is the language-level model that specifies how objects occupy storage and how their locations can be accessed during execution.
- How it is used
- Provides rules for reasoning about visibility and timing when threads access shared state.
- How deep it goes
- Compares sequential and acquire-release consistency and their costs, while setting aside consume consistency and its dependency ordering.
- Examples
- Uses a two-thread diagram showing modifications to a shared object and information about each thread's state.
- What you can do after
- Evaluate/understand cross-thread timing and why explicit acquire-release operations need careful design.
Modern C, Third Edition
The C memory model is the language abstraction that defines how objects, storage, pointers, and program state relate without requiring a particular physical-memory arrangement.
- How it is used
- Models C program state and pointer-based access without committing programs to physical memory locations.
- How deep it goes
- Descends from physical and virtual memory through storage, objects, representations, alignment, and aliasing, while deferring detailed lifetime rules.
- Examples
- Uses pointer-based functions, aliasing calls, unions, byte arrays, addresses, and an int32_t representation diagram.
- What you can do after
- Evaluate pointer accesses and object representations while recognizing portability, aliasing, type, alignment, and storage constraints.
Read how Modern C, Third Edition explains consistency model →
Microsoft Azure in Action
A consistency level is a Cosmos DB setting that defines the guarantees governing how current and ordered reads are relative to writes.
- How it is used
- Guides Cosmos DB choices when applications must balance data accuracy, performance, availability, and user expectations.
- How deep it goes
- Compares five levels through definitions, read behavior, trade-offs, and practical uses.
- Examples
- Uses inventory updates, order confirmations, user sessions, ordered reads, noncritical applications, and Azure CLI configuration.
- What you can do after
- Operate/configure Cosmos DB consistency with Azure CLI and select a level for application freshness and performance needs.
Read how Microsoft Azure in Action explains consistency model →
Latency
A consistency model is a set of guarantees defining the ordering and visibility of operations and data updates in a distributed system.
- How it is used
- Guides replication designs by defining update visibility and operation ordering across copies.
- How deep it goes
- Defines distributed models, trade-offs, examples, and implementation mechanisms, then connects them to hardware memory ordering.
- Examples
- Uses collaborative document editing, shopping carts, vector clocks, and data-plus-flag publication ordering.
- What you can do after
- Evaluate consistency choices against application needs for latency, stale reads, ordering, and availability.
Related concepts
- eventual consistencyincludes · Eventual consistency is a distributed-data consistency model that allows replicas to differ temporarily but guarantees they converge to a consistent state after updates propagate, typically when no further updates occur.
- strong consistencyincludes · Strong consistency is a data consistency guarantee under which operations observe completed writes according to a coordinated, authoritative order, so reads reflect current rather than stale state.
- meancontrasts with · A mean is a measure of central tendency, calculated as the arithmetic average of values or, for a random variable, as the probability-weighted average of its possible values.
- linearizabilityincludes · Linearizability is a consistency property in which each operation appears to take effect atomically at a point between invocation and completion while preserving real-time order.
- sequential consistencyincludes · Sequential consistency is a memory model in which participating operations appear in a single total order that preserves each thread’s program order.
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.



