NEW
A memory consistency model where operations appear in a single global order consistent with each thread’s program order.
DESCRIPTION
Sequential consistency ensures that all threads observe memory operations in a globally consistent sequence that respects per-thread order. It’s weaker than linearizability but stronger than eventual consistency. Implementations rely on synchronization, fences, and atomic operations to avoid reordering. Language and hardware memory models define guarantees and constraints. Achieving sequential consistency can reduce performance due to limited reordering, so systems often balance consistency and throughput.
ALTERNATIVE DEFINITIONS
Wikipedia
Sequential consistency is the property that the result of any execution is the same as if the operations of all the processes were executed in some sequential order.
Standard property definition emphasizing global order.
Leslie Lamport
A multiprocessor is sequentially consistent if the result of any execution is the same as if the operations were executed in some sequential order.
Original formulation by Lamport.
RELATED TERMS
Memory Model Atomicity Isolation (ACID) Happens-Before Causal Consistency Strong Consistency Distributed Systems Locking
COMPETING TERMS
Linearizability Eventual Consistency
RELATIONS
- Broader: Consistency
KNOWLEDGE AREAS
Software Engineering Infrastructure Real-time & Streaming Data Data Storage & Operations
TARGET AUDIENCE
Software Developer Software Architect DevOps Engineer Cloud Architect Solution Architect Data Engineer
EXTERNAL SOURCES
- Wikipedia - Sequential consistency
- Leslie Lamport - Foundational paper defining sequential consistency
- Java Language Specification - Java memory model and happens-before
- Wikipedia - Stronger consistency model reference
TOP QUESTIONS
How does Sequential Consistency differ from Linearizability?
Linearizability adds real-time order constraints, making it stronger than sequential consistency, which only requires a global order consistent with program orders.
Category: Definition
Why is Sequential Consistency useful?
It provides an intuitive model for reasoning about concurrency without enforcing strict timing constraints, simplifying correctness proofs.
Category: Relevancy
What are risks of assuming Sequential Consistency incorrectly?
Hardware or language-level reorderings can violate assumptions, leading to subtle concurrency bugs. Proper fences and atomic operations are needed.
Category: Risk
What are common mistakes in ensuring Sequential Consistency?
Missing memory barriers, relying on volatile alone, and improper synchronization primitives lead to reordering and visibility issues.
Category: Mistakes
How do programming languages formalize memory consistency?
They define memory models specifying visibility and ordering rules, with constructs like happens-before, atomics, and synchronized blocks.
Category: Management
Is Sequential Consistency always necessary?
No. Many systems accept weaker models for performance and rely on application-level mechanisms to maintain correctness.
Category: Opinion
What’s a hot topic around Sequential Consistency?
Efficient hardware memory models and compiler optimizations that preserve correctness while allowing safe reordering.
Category: Topic
Where to learn about Sequential Consistency?
Lamport’s paper, Java Memory Model docs, and concurrency texts like “The Art of Multiprocessor Programming.”
Category: Learning
What’s a useful analogy for Sequential Consistency?
It’s like everyone reading the same merged timeline of events that preserves each actor’s sequence of actions.
Category: Example