Advanced Topic 48 of 51 Concurrency & Parallelism
Linearizability
Correctness condition making operations appear atomic.
How it works
Linearizability is the strongest consistency model for concurrent objects: every operation appears to take effect instantaneously at some point between its invocation and its response, and the resulting order respects real-time order and the object's sequential specification. It makes a concurrent object behave like a single copy accessed one operation at a time, which composes: a system built of linearizable objects is linearizable. Checking histories for linearizability is NP-complete in general, though practical checkers exist.
Where it is used
Locks, atomic registers, concurrent queues and stacks, coordination services like etcd and ZooKeeper's writes and strongly consistent databases aim for linearizability.
Common pitfall
It costs latency and availability in distributed systems, according to CAP, because operations need coordination. It is often confused with serializability, which is about transactions and has no real-time constraint. Weaker models such as sequential consistency permit reordering across processes. Test with tools such as Jepsen's Knossos and Porcupine and understand the guarantees you need.
Where it fits in the course
Linearizability is topic 48 of 51 in Concurrency & Parallelism, rated Advanced. It follows Backpressure. The next topic is Memory Models in Languages.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Concurrency & Parallelism quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Concurrency & Parallelism quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Linearizability?
Where do people use Linearizability?
What is the most common mistake with Linearizability?
What should I learn before this topic?
How can I practice it?
Is Linearizability hard to learn?
How long does it take to learn Linearizability?
Which topics are related to Linearizability?
What should I study after Linearizability?
Related topics
- Backpressure (Concurrency & Parallelism)
- Memory Models in Languages (Concurrency & Parallelism)
- Reactive Programming (Concurrency & Parallelism)
- Hardware Transactional Memory (Concurrency & Parallelism)