LearnViz CompSci
Home / Learn / Concurrency & Parallelism / Linearizability

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

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Concurrency & Parallelism quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Linearizability?
Correctness condition making operations appear atomic. It belongs to Concurrency & Parallelism and is an advanced-level topic.
Where do people use Linearizability?
Locks, atomic registers, concurrent queues and stacks, coordination services like etcd and ZooKeeper's writes and strongly consistent databases aim for linearizability.
What is the most common mistake with Linearizability?
It costs latency and availability in distributed systems, according to CAP, because operations need coordination.
What should I learn before this topic?
Start with Backpressure, the topic just before it in Concurrency & Parallelism.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Concurrency & Parallelism quiz.
Is Linearizability hard to learn?
It is an Advanced topic. Expect to read the explanation more than once and to connect it with earlier topics. Working through a small example by hand helps most.
How long does it take to learn Linearizability?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Linearizability?
Backpressure, Memory Models in Languages, Reactive Programming are closely connected. The full list is in the related topics section of this page.
What should I study after Linearizability?
Continue with Memory Models in Languages, the next topic in Concurrency & Parallelism.

Related topics