A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Sequential Consistency

Graduate Depth 99 in the knowledge graph ☐ I know this ☆ Set as goal
12topics build on this
369prerequisites beneath it
See this on the map →
Consistency Models in Distributed SystemsRead-After-Write Consistency+1 more→→Causal ConsistencyLinearizability
consistency ordering formal-semantics

Core Idea

Sequential consistency guarantees that there exists a total order on all operations that respects the program order of each individual process. Unlike linearizability, this total order does not have to correspond to real time—operations can appear to execute in any order as long as each process's sequence is preserved. This weaker model can be more efficient to implement.

Explainer

From your study of consistency models, you know that distributed systems offer different guarantees about the order in which operations appear to execute. Sequential consistency, defined by Leslie Lamport in 1979, occupies an important middle ground: stronger than eventual consistency, weaker than linearizability, and often the best tradeoff between correctness and performance.

The guarantee is best understood through an analogy. Imagine three people — Alice, Bob, and Carol — each writing statements on separate notepads, then handing all three notepads to a judge. The judge must shuffle the statements into a single sequence (a total order) that could explain every observation, with one constraint: the statements from each person's notepad must appear in the same relative order they were written. The judge is free to interleave statements from different people however she likes — she just cannot reorder any individual person's statements. If such an interleaving exists and is consistent with what everyone observed, the execution is sequentially consistent.

What sequential consistency does *not* guarantee is real-time ordering. If Alice finishes writing a value at 3:00 PM and Bob starts reading at 3:01 PM, sequential consistency does not promise Bob sees Alice's write — the total order might place Bob's read before Alice's write, as long as no single process's operations are reordered. This is the key difference from linearizability, which would require Bob to see the write because Alice's operation completed before Bob's began in wall-clock time. The practical consequence is that sequentially consistent systems can batch, buffer, and reorder operations across nodes for better performance, as long as each node's own operations stay in order.

Sequential consistency appears naturally in hardware memory models. Many multiprocessor architectures guarantee something close to sequential consistency for shared memory access (though modern CPUs often relax even this for performance, requiring memory barriers). In distributed databases, sequential consistency means clients always see a progression of states — they never see writes appear and then disappear — but two clients might disagree about the order of concurrent writes from different sources. For applications like social media feeds or collaborative documents where strict real-time ordering is less critical than a coherent narrative, sequential consistency often provides enough correctness at significantly lower latency and higher availability than linearizability.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Binary Counters: Design and Analysis → Binary Arithmetic → Fixed-Point Number Representation → Two's Complement Representation → Overflow and Underflow Detection → Binary Adders: Half-Adders and Full-Adders → Full Adder and Carry Propagation → Carry Lookahead Adder Design → Half Adder Circuit Design → Multiplication Circuit Design → Sequential Circuit Design → Registers and Register Files → Instruction Set Architecture (ISA) → Kernel Architecture and OS Structure → System Calls and User/Kernel Mode → Processes and the Process Control Block → Logical Clocks and Event Ordering → Vector Clocks and Capturing Causality → Happened-Before Relation and Causal Ordering → Consistency Models in Distributed Systems → Read-After-Write Consistency → Sequential Consistency

Longest path: 100 steps · 369 total prerequisite topics

Prerequisites (3)

Leads To (2)