When data is stored across multiple copies, or handled by many workers at once, what does it take for the whole system to behave as if there were only a single copy? And who could ever tell the difference?
To find out, we return to the ancient Greek island of Arche, where three trading houses must fill one another's grain requests in the exact order they were truly placed, even when heavy clouds hide the sun.
We find out by checking one question: what must a shared queue promise so that, however many copies or workers stand behind it, callers cannot tell it from a single queue operated one step at a time?
After Maurice P. Herlihy and Jeannette M. Wing, Linearizability: A Correctness Condition for Concurrent Objects, 1990

Each link shows how one paper built on an idea from another. Hover over or tap any link to read how.
a paper this book retells a paper retold in another book a paper outside the series
House 1, House 2, and House 3 sit along the coast of the island of Arche, separated by a steep central mountain. Official word travels between them only on written slips carried along a single coastal road, and during the cloudy trading season nobody on the island can read the sundials.Three processes, P1, P2 and P3, communicate only by messages, which travel in order and always eventually arrive. They have no shared clock: each process's local clock keeps its own separate time.
House 3 has grain in its storehouse, and both other houses need it. All three houses have agreed on a fair rule: whichever request was placed first must be filled first.P3 holds the queue of requests for a shared resource, and both P1 and P2 want it. All three have agreed on a fair rule: whichever request was made first must be served first.
With no shared clock to consult, House 3 has been ordering requests using tallies (logical clocks): a rising number stamped on every slip and advanced whenever a slip arrives, with house numbers used to break ties. Tallies guarantee that an effect never comes before its cause along the road, and that no house can jump the queue simply by hiring a faster runner.*With no shared clock to consult, P3 has been ordering requests using logical timestamps (Lamport clocks): a rising number stamped on every message and advanced whenever a message arrives, with process numbers used to break ties. Timestamps guarantee that an effect never comes before its cause, and that no process can jump the queue simply because its messages travel faster.*
However, tallies only track official slips travelling along the coastal road, and news can also cross the mountain by word of mouth. Scroll through the morning below to see how an unrecorded shortcut can turn the tally order upside down.However, timestamps only track the system's own messages, and information can also travel outside them. Scroll through the execution below to see how an unrecorded shortcut can turn the timestamp order upside down.

Early in the morning, House 1 sends a request for grain and receives its confirmation back from House 3 before the sun is high. Then a goatherd carries the news over the mountain to House 2, and at noon House 2 sends a request of its own.Early on, P1 sends a request and receives its confirmation back from P3. Then the information reaches P2 by some path outside the system, and later P2 sends a request of its own.
House 1 has already logged two local entries this morning. Houses 2 and 3 have logged none, and no slips have travelled yet. Each house's current tally is shown beside its name.P1 has already logged two local events. P2 and P3 have logged none, and no messages have travelled yet. Each process's current timestamp is shown beside its name.
House 1 writes a grain request as its third entry, stamping the slip with a tally of . A messenger sets off along the road to House 3.P1 makes a request as its third event, stamping the message with a timestamp of . The message sets off towards P3.
The slip reaches House 3, which places the request on its waiting board and jumps its own tally past the slip's number. It sends back a confirmation marked with its new tally, .The message reaches P3, which puts the request on its queue and advances its own timestamp past the message's. It sends back a confirmation marked with its new timestamp, .
The confirmation reaches House 1 well before noon, and House 1 advances its tally past the confirmation's number. House 1's request is now completely finished and confirmed.The confirmation reaches P1 early, and P1 advances its timestamp past the confirmation's. P1's request is now completely finished and confirmed.
A goatherd scrambles over Mount Phyle and mentions House 1's finished request to a clerk at House 2. Because the goatherd carries no official slip, and House 2 has had a completely quiet morning, House 2's tally is still sitting at 0.P2 is informed, outside the system, that P1's request has finished. Because this information travels outside the system's messages, and P2 has had no activity, P2's timestamp is still 0.
At noon, House 2 writes a grain request of its own. Because no official slip has reached it all morning, its request carries a tally of , smaller than House 1's!Later, P2 makes a request of its own. Because no message has reached it, its request carries a timestamp of , smaller than P1's!
House 3 puts the second request on its board and serves the smaller tally first, giving the grain to House 2. By the rules of the tally, nothing went wrong. Yet House 1's request was completely entered and confirmed before House 2 even asked!P3 puts the second request on its queue and serves the smaller timestamp first, serving P2. By the rules of the timestamps, nothing went wrong. Yet P1's request was completely entered and confirmed before P2 even asked!
As far as the tallies can tell, no official slip connected the two requests, so either one could go first. But House 2 knows, and so does anyone who spoke with the goatherd, that House 1's request was completely finished and confirmed before House 2 even picked up a stylus. In real time, under the sun, House 1 was indisputably first.As far as the timestamps can tell, no message connected the two requests, so either one could go first. But P2 knows, and so does anyone who received the out-of-band information, that P1's request was completely finished and confirmed before P2 even made its own. In real time, P1 was indisputably first.
We saw earlier that tallies have this blind spot because they only track official slips.* Instead of trying to build synchronized clocks, the houses want a stronger guarantee about how their request board behaves: a promise that any request that finishes before another begins is always served first, so that no goatherd crossing the mountain can ever catch the board out of order.We saw earlier that logical timestamps have this blind spot because they only track the system's own messages.* Instead of trying to build synchronized clocks, the processes want a stronger guarantee about how their queue behaves: a promise that any request that finishes before another begins is always served first, so that no out-of-band information can ever catch the queue out of order.
Nobody on cloudy Arche can read a sundial, so the houses must find a way to state, and keep, a promise based on real time.No process can read a shared clock, so they must find a way to state, and keep, a promise based on real time.
Any promise about the board must be stated in terms of what the houses actually observe at their gates. For a request, a house observes two events: the moment it sends the request slip out, and the moment the confirmation slip arrives back. Somewhere between those two moments, the request took its place on House 3's waiting board.Any promise about the queue must be stated in terms of what the processes actually observe at their interfaces. For a request, a process observes two events: the moment it sends the request out (the invocation), and the moment the confirmation arrives back (the response). Somewhere between those two moments, the request took its place in the queue.
Serving a request has a start and a finish too: a loader at House 3 walks up to the board, takes the oldest waiting request, and loads the grain sacks onto a cart. Each house, and each loader, performs one piece of business at a time.Serving a request has a start and a finish too: a dequeue takes the oldest waiting request off the queue. Each process performs one operation at a time.
Every piece of business therefore spans an interval of real time, from its start to its completion. One piece of business comes before another if it completely finished before the other began; otherwise, the two overlap in time, and neither is strictly first. Click any two requests in the diagram below to see whether one came before the other or if their spans overlap.Every operation therefore spans an interval of real time, from its invocation to its response. One operation comes before another if it completely finished before the other began; otherwise, the two overlap in time, and neither is strictly first. Click any two requests in the diagram below to see whether one came before the other or if their spans overlap.
Each line tracks one house over time, moving outward. Each thick bar shows the span of a request from sending to confirmation, and a faint ring of its colour carries that stretch of time round the whole circle: where two rings overlap, so do the requests. Click the starting dot of any two requests to compare them.Each lane is one process, with real time running left to right. Each bar is a request, from invocation to response, and its stretch of time is shaded down through every lane: where two shadings overlap, so do the requests. Click any two bars to compare them.
A is House 1's request, B is House 2's first request and C is House 2's second.A is P1's request, B is P2's first request and C is P2's second.
Now we can state the promise, which the paper calls linearizability, and which the houses call the rule of the board. Imagine a single, unhurried steward standing beside a single board, doing one thing at a time: either entering a new request at the back of the board, or handing the oldest waiting request to a loader. The houses do not need to see this steward; they only ask that everything they experience at their gates could have come from such a steward, with each action taking effect at a single instant inside its real-time span. More precisely, all requests and servings must fit into a single sequence that satisfies three demands:Now we can state the promise, linearizability. Imagine a single, unhurried sequential queue, doing one thing at a time: either enqueueing a new request at the back, or dequeueing the oldest waiting request. The processes do not need to see this queue; they only ask that everything they experience at their interfaces could have come from it, with each operation taking effect at a single instant inside its real-time span. More precisely, all requests and servings must fit into a single sequence that satisfies three demands:
Every serving hands out the exact request that a single steward, managing a single board in that one-at-a-time sequence, would have handed out.Every dequeue returns the exact request that a single sequential queue, executing operations one at a time in that sequence, would have returned.
Each request or serving takes effect at a single instant (its linearization point) somewhere between its start and its completion.Each request or serving takes effect at a single instant (its linearization point) somewhere between its invocation and its response.
If one piece of business completely finished before another began, it must appear earlier in the sequence.If one operation completely finished before another began, it must appear earlier in the sequence.
Notice how the second demand ties the promise to real time under the sun, and automatically guarantees the third! If House 1's request finished before House 2's request even began, then the single instant inside House 1's span must come earlier than the single instant inside House 2's span. A single steward therefore enters House 1's request first and serves it first, which is why the goatherd's morning violates the rule of the board.Notice how the second demand ties the promise to real time, and automatically guarantees the third! If P1's request finished before P2's request even began, then the single instant inside P1's span must come earlier than the single instant inside P2's span. A single sequential queue therefore enters P1's request first and serves it first, which is why the out-of-band execution violates linearizability.
A correctness rule can fail by being too strict (forbidding runs that make complete sense) or too loose (allowing runs that are clearly broken). Let's test the rule of the board against four different mornings.A correctness rule can fail by being too strict (forbidding runs that make complete sense) or too loose (allowing runs that are clearly broken). Let's test linearizability against four different executions.
Write <H for the real-time order of a history H: a <H b when operation a receives its response before operation b is invoked. The board is a FIFO queue: placing a request is Enq, and serving a request is Deq.
A history of requests and servings satisfies the rule of the board (linearizability) if all completed operations—plus whichever still-pending operations have already taken effect—can be placed into a single sequential order such that:
Deq) returns the exact request that a single FIFO queue, executing operations one at a time in that sequence, would return.Herlihy & Wing 1990, §2.2: a history H is linearizable if, after appending responses to some pending invocations and discarding the rest, it is equivalent to a legal sequential history S that preserves the real-time order <H.
Write <H for the real-time order of a history H: a <H b when operation a receives its response before operation b is invoked. The queue is a FIFO queue: a request is enqueued by Enq and dequeued by Deq.
A history of enqueues and dequeues is linearizable if all completed operations—plus whichever still-pending operations have already taken effect—can be placed into a single sequential order such that:
Deq) returns the exact request that a single FIFO queue, executing operations one at a time in that sequence, would return.Herlihy & Wing 1990, §2.2: a history H is linearizable if, after appending responses to some pending invocations and discarding the rest, it is equivalent to a legal sequential history S that preserves the real-time order <H.
We judge each of the four mornings below by asking the exact same question: can we pick one single moment inside the span of every request and every serving so that a single steward would have handed out the exact same grain?We judge each of the four executions below by asking the same question: can we pick one single moment inside the span of every request and every dequeue so that a single sequential queue would have returned exactly the same results?
Two of these mornings ought to pass if our rule is flexible enough for real life, and two ought to fail if our rule catches genuine mistakes. Click each morning below to see the verdict.Two of these executions ought to pass if our definition is flexible enough for real life, and two ought to fail if it catches genuine mistakes. Click each execution below to see the verdict.
Requests are shown as thick bars on House 1's and House 2's lines, from sending to confirmation. A serving is a grey bar on House 3's line, ending with a colored dot showing which house's request it filled. A faint ring round the circle carries each bar's stretch of time to every line, so overlaps can be read at a glance.Each lane is one process, with real time running left to right. An enqueue is a bar on P1's or P2's lane, from invocation to response; a dequeue is a grey bar on P3's lane, named for the request it returned. Each bar's stretch of time is shaded down through every lane, so overlaps can be read straight down.
Choose a morning.
These four mornings show why the rule draws its boundary right where it does. When two requests overlap in time, either one may legitimately be served first; when one finishes before the other begins, their order is fixed. A request can even be served while its confirmation slip is still travelling back along the road, because the request took effect the moment it was placed on the board. And no timing overlap can ever excuse serving the same request twice.These four executions show why linearizability draws its boundary right where it does. When two requests overlap in time, either one may legitimately be served first; when one finishes before the other begins, their order is fixed. A request can even be served while its response is still travelling back, because the request took effect the moment it was placed on the queue. And no timing overlap can ever excuse serving the same request twice.
Suppose we stop and judge a morning while some request is still in flight, sent, but not yet confirmed. The rule makes a natural allowance: an unfinished request may either be counted as already on the board or left out, whichever fits what the loaders have already served.Suppose we stop and judge an execution while some request is still in flight, invoked, but not yet answered. The definition makes a natural allowance: an unfinished request may either be counted as already in the queue or left out, whichever fits what the dequeues have already returned.
We now have two ways of defining "which request came first": the tallies, and the rule of the board. The two are compared next.We now have two ways of defining “which request came first”: logical timestamps and linearizability. The two are compared next.
Surprisingly, the tallies (causal order) and the rule of the board (real-time order) give genuinely different answers about which request came first, and neither rule is a stricter version of the other.Surprisingly, logical timestamps (causal order) and linearizability (real-time order) give genuinely different answers about which request came first, and neither is a stricter version of the other.
For the tallies, one request must precede another if a chain of official slips leads from the first to the second; otherwise, ties are broken by tally and house number.* For the rule of the board, one request must precede another if the first received its confirmation before the second was sent, regardless of whether any slips passed between the two houses. Compare the two mornings below to see how each rule can require an order the other does not.For timestamps, one request must precede another if a chain of messages leads from the first to the second; otherwise, ties are broken by timestamp and process number.* For linearizability, one request must precede another if the first received its response before the second was sent, regardless of whether any messages passed between the two processes. Compare the two executions below to see how each rule can require an order the other does not.
The number inside a dot shows the tally under which that request was written. Thick bars show the real-time span of each request, with a faint ring round the circle for the same stretch of time, and curved arcs show slips on the road.Each lane is one process, with real time running left to right. Each request is a bar from invocation to response, named with the timestamp it was made under; small dots are other events, and arrows are messages, sloping right because they take time.
Choose a morning.
On the goatherd's morning, no official slip connects the two requests, so the tallies allow House 2 to be served first, whereas the rule of the board forces House 1 to go first because its confirmation arrived before House 2 asked. Now flip the situation: suppose House 1 sends a grain request to House 3, and immediately sends a second slip telling House 2 about it. Upon reading that slip, House 2 sends its own grain request while House 1 is still waiting for its confirmation. Because a slip connects them, the tallies force House 1 to be served first, whereas their real-time spans overlap, so the rule of the board allows either house to be served first!In the out-of-band execution, no message connects the two requests, so the timestamps allow P2 to be served first, whereas linearizability forces P1 to go first because its response arrived before P2 asked. Now flip the situation: suppose P1 sends a request to P3, and immediately sends a second message telling P2 about it. Upon reading that message, P2 sends its own request while P1 is still waiting for its response. Because a message connects them, the timestamps force P1 to be served first, whereas their real-time spans overlap, so linearizability allows either process to be served first!
Even without a sundial, House 3 can satisfy the rule of the board in a remarkably simple way: keep a single board at House 3's gate, enter each request the moment its messenger arrives, and send the confirmation slip back right after. Because the entry happens after the request left and before the confirmation returns, that entry is guaranteed to fall inside the request's real-time span.Even without a shared clock, P3 can satisfy linearizability in a remarkably simple way: keep a single queue at P3's interface, enter each request the moment its message arrives, and send the response right after. Because the entry happens after the request left and before the response returns, that entry is guaranteed to fall inside the request's real-time span.
Entering requests in the order their messengers reach House 3's gate satisfies the rule of the board (linearizability). Serving them by tally order need not. Conversely, tally order can fix the sequence of two overlapping requests where the rule of the board allows either order.Entering requests in the order they reach P3's interface satisfies linearizability. Serving them by timestamp order need not. Conversely, timestamp order can fix the sequence of two overlapping requests where linearizability allows either order.
The houses keep tallies because when two requests overlap in time, serving by arrival at the gate always favors whichever house has the faster runner or the shorter stretch of road. The rule of the board does not mind that, when two requests overlap, it allows either order. Tallies, by contrast, protect causal chains and prevent faster runners from winning, at the cost of ignoring real-time order when no slip connects two events. The two rules simply protect different guarantees.Timestamps are worth keeping because when two requests overlap in time, serving by arrival always favours whichever process has the faster messages or the shorter path. Linearizability does not mind that, when two requests overlap, it allows either order. Timestamps, by contrast, protect causal chains and prevent faster senders from winning, at the cost of ignoring real-time order when no message connects two events. The two rules simply protect different guarantees.
We just saw that a single board at House 3's gate satisfies the rule of the board. The next case is all three houses keeping copies of the board locally.We just saw that a single queue at P3's interface satisfies linearizability. The next case is all three processes keeping copies of the queue locally.
Write <H for the real-time order of a history H: a <H b when a responds before b is invoked. H is linearizable if it can be extended to a history equivalent to a legal sequential history S with <H ⊆ <S. For the board (a FIFO queue), legal means each Deq returns the oldest item Enq-ed and not yet returned. Suppose a single copy sits at House 3's gate, and each operation takes effect at the exact instant it is applied to that board. Claim. Ordering operations by the instant they are applied at House 3's gate forms a valid linearization S.
Write <H for the real-time order of a history H: a <H b when a responds before b is invoked. H is linearizable if it can be extended to a history equivalent to a legal sequential history S with <H ⊆ <S. For the queue (a FIFO queue), legal means each Deq returns the oldest item Enq-ed and not yet returned. Suppose a single copy sits at the queue's interface, and each operation takes effect at the exact instant it is applied to that queue. Claim. Ordering operations by the instant they are applied at the queue's interface forms a valid linearization S.
Whether the island uses one central board or three separate copies is settled by what the rule of the board talks about: it speaks only of requests sent, confirmations received, and grain served at the houses' gates.Whether the system uses one central queue or three separate copies is settled by what linearizability talks about: it speaks only of requests sent, responses received, and results returned at the processes' interfaces.
The rule never mentions how the board is built inside the counting rooms. As long as the confirmations and servings seen at the gates match what a single steward with a single board could have produced, the rule is satisfied, whether there is one wooden board at House 3, or three copies kept in sync by messengers behind the scenes.The definition never mentions how the queue is built inside. As long as the responses and results seen at the interfaces match what a single sequential queue could have produced, it is satisfied, whether there is one queue at P3, or three copies kept in sync by messages behind the scenes.
A house sends a request, receives a confirmation, and sees loaders fill orders. The rule of the board is defined entirely by these external events.A process sends a request, receives a response, and sees results come back from dequeues. Linearizability is defined entirely by these external events.
One central board, three copies of the board kept in step by slips, or a busy room of clerks: the rule leaves the internal machinery completely open.One central queue, three replicated queues coordinated by messages, or a busy array shared by many workers: the definition leaves the internal machinery completely open.
Even if the houses compared all their logs alongside an observer who watched the sun, no one could ever prove there was more than a single board. That is what it means for many copies to act as one.Even if the processes compared all their logs alongside an observer with a perfect clock, no one could ever prove there was more than a single queue. That is what it means for many copies to act as one.
The ways of keeping replicated copies in step are left to other arrangements. Here, we focus on what the guarantee of linearizability itself gives to anyone who relies on it.
First comes an island with more than one kind of trade. Grain is not the only commodity on Arche, and the houses may run separate boards for grain and olive oil, so it must be asked whether they have to coordinate the two boards with each other.First comes a system with more than one shared object. The processes may run separate queues for different resources, so it must be asked whether they have to coordinate the queues with each other.
While House 3 stores grain, House 2 presses olive oil and manages oil requests on a separate board of its own. If adding a second board meant the two boards had to coordinate with each other, building large systems out of smaller parts would be a nightmare.While P3 hosts one queue, P2 hosts a second queue of its own. If adding a second queue meant the two queues had to coordinate with each other, building large systems out of smaller parts would be a nightmare.
With the rule of the board, they do not have to coordinate at all. Checking each board on its own is enough to guarantee that the whole island's business is linearizable.With linearizability, they do not have to coordinate at all. Checking each queue on its own is enough to guarantee that the whole system is linearizable.
The combined history of all business across the island satisfies the rule of the board if and only if each individual board's history satisfies the rule on its own.The combined history of all operations across the system is linearizable if and only if each individual queue's history is linearizable on its own.
Separate boards fit together without any cross-board coordination because every board is anchored to the same real-world timeline, the sun, and real time never loops back on itself. Once you pick a valid instant inside the span of each grain operation and a valid instant inside the span of each oil operation, those instants naturally sit in a single timeline across the whole island.Separate queues fit together without any cross-queue coordination because every queue is anchored to the same real-world timeline, and real time never loops back on itself. Once you pick a valid instant inside the span of each operation on the first queue and a valid instant inside the span of each operation on the second, those instants naturally sit in a single timeline across the whole system.
To see why anchoring to real time is essential, consider a slightly weaker rule called sequential consistency (which we will call the looser rule). It requires that operations behave as if executed by a single steward in an order that respects each individual house's own sequence of actions, without requiring an operation finished earlier in real time to go before one started later. On its own, the looser rule sounds reasonable, it even allows the goatherd's morning. Yet as the interactive below shows, two boards can each pass the looser rule individually while contradicting each other when combined!To see why anchoring to real time is essential, consider a slightly weaker rule called sequential consistency. It requires that operations behave as if executed by a single sequential queue in an order that respects each individual process's own sequence of actions, without requiring an operation finished earlier in real time to go before one started later. On its own, it sounds reasonable, it even allows the out-of-band execution. Yet as the interactive below shows, two queues can each pass sequential consistency individually while contradicting each other when combined!
House 1 places a grain request (and waits for its confirmation) and then an oil request. Meanwhile, House 2 places an oil request (and waits for its confirmation) and then a grain request. Suppose the oil board serves House 1 first, while the grain board serves House 2 first.P1 makes a request on queue G (and waits for its response) and then on queue O. Meanwhile, P2 makes a request on queue O (and waits for its response) and then on queue G. Suppose queue O serves P1 first, while queue G serves P2 first.
Choose a rule.
Under the looser rule, the grain board looks fine on its own, and the oil board looks fine on its own, yet together they form an impossible cycle where neither house's first request could have happened first! Systems that rely only on sequential consistency cannot be verified one component at a time. Under the rule of the board (linearizability), real time breaks the cycle and pinpoints the exact culprit on the grain board.Under sequential consistency, queue G looks fine on its own, and queue O looks fine on its own, yet together they form an impossible cycle where neither process's first request could have happened first! Systems that rely only on sequential consistency cannot be verified one component at a time. Under linearizability, real time breaks the cycle and pinpoints the exact culprit on queue G.
So each board can be built and verified independently. Next to examine is whether obeying the rule of the board can ever force a house to stand waiting at the gate while someone else's request finishes.So each queue can be built and verified independently. Next to examine is whether obeying linearizability can ever force a process to wait while someone else's request finishes.
For a history H and an object x, write H|x for the subhistory of operations on x, and <H for the real-time order: a <H b when a responds before b is invoked. Claim (Locality, Theorem 1, the "if" direction): if every H|x is linearizable, then H is linearizable.
For a history H and an object x, write H|x for the subhistory of operations on x, and <H for the real-time order: a <H b when a responds before b is invoked. Claim (Locality, Theorem 1, the "if" direction): if every H|x is linearizable, then H is linearizable.
The rule of the board never forces a house placing a request to wait for another house's operation to finish. Whatever is currently on the board, a single steward can always append a new request to the end right now, so completing a pending request immediately can never violate the rule.Linearizability never forces a process placing a request to wait for another process's operation to finish. Whatever is currently in the queue, a single sequential queue can always append a new request to the end right now, so completing a pending request immediately can never violate it.
Whenever the history so far satisfies the rule of the board, any pending operation that has a valid answer in every state (like placing a request) can complete immediately without breaking the rule.Whenever the history so far is linearizable, any pending operation that has a valid answer in every state (like placing a request) can complete immediately without breaking it.
That means if a house ever has to wait for its confirmation, the delay comes from the physical road or the way the counting room was organized, never from the rule of the board itself. A loader trying to serve grain when the board is completely empty is a different matter: a single steward would naturally have nothing to hand over until a request arrives. Waiting at an empty board is part of what "serve the next request" means, not an artificial delay imposed by the ordering rule.That means if a process ever has to wait for its response, the delay comes from the network or from the way the implementation is organized, never from linearizability itself. A dequeue on a completely empty queue is a different matter: a single sequential queue would naturally have nothing to return until a request arrives. Waiting at an empty queue is part of what “dequeue the next request” means, not an artificial delay imposed by the ordering rule.
By contrast, database transactions (serializability), where a house asks to perform a bundle of several actions all together as one unit, can force callers to wait or even abort. Compare the three scenarios below to see the difference.By contrast, database transactions (serializability), where a process asks to perform a bundle of several actions all together as one unit, can force callers to wait or even abort. Compare the three scenarios below to see the difference.
Choose a case.
In the third case, each house's two-step transaction saw an empty board before the other house's request was entered, making it impossible to place either transaction wholly before the other. At least one house must have its transaction called off (aborted). Because the rule of the board applies to single operations rather than multi-step transactions, it never forces an operation to abort or block.In the third case, each process's two-step transaction saw an empty queue before the other process's request was entered, making it impossible to place either transaction wholly before the other. At least one process must have its transaction called off (aborted). Because linearizability applies to single operations rather than multi-step transactions, it never forces an operation to abort or block.
Up to now, we have imagined a single steward working alone at the board. In reality, House 3's board is bustling with multiple clerks and loaders working simultaneously, and proving that such a busy board still obeys the rule brings one last surprise.Up to now, we have imagined a single sequential queue working alone. In reality, a queue is used by many workers at the same time, and proving that such a busy queue still obeys linearizability brings one last surprise.
A total operation (such as Enq on an unbounded queue) is defined in every object state. Claim (Nonblocking property, Theorem 2): if H is linearizable and p is a pending invocation of a total operation in H, then there exists a response r such that H extended by r is also linearizable.
At House 3's actual portico, several clerks and loaders work at the board at the same time. To keep everyone moving briskly, the master of the board designed a lock-free procedure where no worker ever has to stand aside and wait for another.In a real implementation, several enqueuers and dequeuers use the queue at the same time. To keep everyone moving briskly, it is designed lock-free: no operation ever has to wait for another.
The wooden board consists of a long row of numbered slots, each large enough for one wax request tablet, and a movable peg marking the next unused slot number. To enter a request, a clerk performs two steps: first, in one swift motion, they read the slot number at the peg and advance the peg by one; second, they walk to that slot and place their tablet inside. To serve a request, a loader reads the peg, scans the slots starting from slot 1, and takes the first tablet they find. Even if a slow clerk pauses between taking a slot number and placing a tablet, nobody else is held up.The queue is an array of numbered slots, each holding one request, and a shared back counter marking the next unused slot number. To enqueue, a process performs two steps: first, in one atomic step, it reads the counter and advances it by one; second, it stores its request in that slot. To dequeue, a process reads the counter, scans the slots starting from slot 1, and takes the first request it finds. Even if a slow enqueuer pauses between taking a slot number and storing its request, nobody else is held up.

With a single steward, it was easy to point to the exact step where each request joined the board. On this busy board, entering a request takes two separate steps (moving the peg, then placing the tablet), and as the scroll below reveals, neither step by itself can always be called the exact instant the request took effect!With a single sequential queue, it was easy to point to the exact step where each request joined it. In this concurrent queue, enqueueing takes two separate steps (advancing the counter, then storing the request), and as the scroll below reveals, neither step by itself can always be called the exact instant the request took effect!
Four empty slots sit on the wall, with the peg resting above slot 1. Two clerks arrive at the same time, one carrying a request for House 1, the other for House 2.Four empty slots, with the back counter at slot 1. Two enqueuers arrive at the same time, one with a request for P1, the other for P2.
The clerk for House 1 claims slot 1 at the peg and slides the peg to slot 2. However, the clerk has not yet placed House 1's tablet into slot 1.P1's enqueuer claims slot 1 at the counter and advances the counter to 2. However, it has not yet stored P1's request in slot 1.
Right behind them, the clerk for House 2 claims slot 2 at the peg and slides the peg to slot 3.Right behind it, P2's enqueuer claims slot 2 and advances the counter to 3.
Moving quickly, the second clerk places House 2's tablet into slot 2 and finishes up, while the first clerk is still walking toward slot 1.Moving quickly, the second enqueuer stores P2's request in slot 2 and finishes, while the first is still on its way to slot 1.
At this exact moment it cannot yet be said whether House 1's request is on the board ahead of House 2's. Which request gets served first depends entirely on who reaches slot 1 next: a loader, or the slow first clerk.At this exact moment it cannot yet be said whether P1's request is ahead of P2's. Which request gets served first depends entirely on who reaches slot 1 next: a dequeuer, or the slow first enqueuer.
Suppose a loader checks the peg, looks into slot 1, finds it still empty, and moves on to slot 2, taking House 2's tablet! In this ending, House 2's request effectively joined the board ahead of House 1's.Suppose a dequeuer reads the counter, looks into slot 1, finds it still empty, and moves on to slot 2, taking P2's request! In this ending, P2's request effectively joined the queue ahead of P1's.
Now suppose instead that the first clerk slips House 1's tablet into slot 1 just before the loader looks. The loader scans from slot 1, finds House 1's tablet waiting, and serves House 1 first!Now suppose instead that the first enqueuer stores P1's request in slot 1 just before the dequeuer looks. The dequeuer scans from slot 1, finds P1's request, and serves P1 first!
Neither ending violates the rule of the board: because the two clerks' spans overlapped, either House 1 or House 2 may legitimately go first. What makes this board fascinating is that at Step 4, when the second clerk has already finished, which order the board is in has not yet been decided! A future race between the first clerk and the loader will settle it, which means no single fixed step in the clerk's routine can be pointed to as the one moment a request takes effect.Neither ending violates linearizability: because the two enqueuers' spans overlapped, either P1 or P2 may legitimately go first. What makes this queue fascinating is that at Step 4, when the second enqueuer has already finished, which order the queue is in has not yet been decided! A future race between the first enqueuer and the dequeuer will settle it, which means no single fixed step in an enqueuer's routine can be pointed to as the one moment a request takes effect.
Since no single step in the clerk's routine can be pointed to as the moment of entry, proving that the busy board always obeys the rule of the board needs another method.Since no single step in the enqueuer's routine can be pointed to as the moment of entry, proving that the concurrent queue always obeys linearizability needs another method.
Herlihy and Wing's concurrent lock-free queue (§4.2). The board is represented by an unbounded array items initialized to null and a counter back initialized to 1; array slots are never reused.
Enq(x)): Atomically read the current slot index at the peg and increment it by 1 (i := INC(q.back)), then store the request tablet in that slot (STORE(q.items[i], x)).Deq()): Read the peg's current position (range := READ(q.back) - 1). Scan slots 1 through range in ascending order, atomically swapping each slot with null (SWAP(q.items[i], null)), and return the first non-null tablet found. If all scanned slots are empty, repeat from the beginning.Herlihy and Wing's concurrent lock-free queue (§4.2). The queue is represented by an unbounded array items initialized to null and a counter back initialized to 1; array slots are never reused.
Enq(x)): Atomically read the current slot index at the back counter and increment it by 1 (i := INC(q.back)), then store the request in that slot (STORE(q.items[i], x)).Deq()): Read the back counter's current position (range := READ(q.back) - 1). Scan slots 1 through range in ascending order, atomically swapping each slot with null (SWAP(q.items[i], null)), and return the first non-null request found. If all scanned slots are empty, repeat from the beginning.Herlihy and Wing solved this puzzle with an elegant shift in perspective: instead of insisting that the board represent one specific queue order at every instant, ask for the set of all possible sequences the board could legitimately stand for right now.Herlihy and Wing solved this puzzle with an elegant shift in perspective: instead of insisting that the array represent one specific queue order at every instant, ask for the set of all possible sequences it could legitimately stand for right now.
The slots on the wall can stand for many sequences. Only one strict rule constrains them: if one tablet was already sitting in its slot before another clerk even touched the peg, then that tablet must appear before the other clerk's. Any two tablets whose clerks overlapped while using the peg and filling their slots may appear in either order! Try both scenarios below to see the set of sequences the board can represent, and watch what happens when a loader scans from slot 1.The slots can stand for many sequences. Only one strict rule constrains them: if request A was already stored in its slot before enqueuer B even took a number, then A must appear before B. Any two requests whose enqueuers overlapped while taking numbers and filling slots may appear in either order! Try both scenarios below to see the set of sequences the array can represent, and watch what happens when a dequeuer scans from slot 1.
Choose a run.
To prove the busy board is linearizable, we only need to show that at every step, every sequence the board could stand for is a sequence that a single steward could legally have reached so far. Two simple facts guarantee this. First, when a clerk places a new tablet into a slot, that tablet can always be placed at the very back of every sequence, because no other tablet could have taken a peg number after an action that is only happening right now. Second, when a loader scans upward from slot 1 and takes the first tablet they see, that tablet is guaranteed to stand at the front of at least one valid sequence, because any tablet required to precede it would sit in an earlier slot that the loader already checked!To prove the concurrent queue is linearizable, we only need to show that at every step, every sequence the array could stand for is a sequence that a single sequential queue could legally have reached so far. Two simple facts guarantee this. First, when an enqueuer stores a new request in a slot, that request can always be placed at the very back of every sequence, because no other request could have taken a counter value after an action that is only happening right now. Second, when a dequeuer scans upward from slot 1 and takes the first request it sees, that request is guaranteed to stand at the front of at least one valid sequence, because any request required to precede it would sit in an earlier slot that the dequeuer already checked!
At every moment, every sequence of waiting requests the board's slots could stand for is also a valid linearizable sequence of the business so far. Therefore, the busy lock-free board satisfies the rule of the board.At every moment, every sequence of waiting requests the array's slots could stand for is also a valid linearizable sequence of the operations so far. Therefore, the concurrent lock-free queue is linearizable.
Because the busy board satisfies the rule of the board, any house using it gets the exact same safety guarantees as if a single steward managed everything one step at a time: requests are served in real-time order, no confirmed request ever vanishes, and no phantom request is ever invented.Because the concurrent queue is linearizable, any process using it gets the exact same safety guarantees as if a single sequential queue were operated one step at a time: requests are served in real-time order, no confirmed request ever vanishes, and no phantom request is ever invented.
We have seen what the rule of the board promises and how even a lock-free board keeps it. To finish, let us state plainly the four things the rule of the board does not promise.We have seen what linearizability promises and how even a lock-free queue keeps it. To finish, let us state plainly the four things linearizability does not promise.
Let A: REP → 2ABS map each state r of the array and peg to the set of abstract FIFO queues it could represent: namely, all permutations of the tablets currently in slots that respect the partial order x <r y (where the STORE of x preceded the INC of y). Let Lin(H|ABS) be the set of abstract queue states reachable by valid linearizations of the history so far. Claim (§4.3.2, Theorem 17): for every reachable state r, A(r) ⊆ Lin(H|ABS).
INC, and READ: None of these steps adds or removes a tablet from a slot, so A(r) is unchanged (or constrained only in ways consistent with the ongoing operation spans).STORE of x): For another tablet y to be required to follow x (x <r y), y's INC would have to occur after x's STORE—which is happening right now. Thus x is maximal in <r and can be appended to the back of any sequence, matching a legal Enq(x) taking effect right now.SWAP of x at slot i): Suppose the loader scans upward from slot 1 and takes x from slot i. Could some other remaining tablet z satisfy z <r x? If so, z's STORE preceded x's INC, which implies both that z sits in a lower slot (j < i) and that z was already in slot j before the loader began scanning. But then the loader would have encountered and taken z before ever reaching slot i! Thus x is minimal in <r and stands first in at least one valid sequence, matching a legal Deq() returning x.∎This outlines Herlihy and Wing's proof in §4.3.2 (Lemmas 15–16 and Theorem 17); full formal details appear in their companion technical report.
Let A: REP → 2ABS map each state r of the array and back counter to the set of abstract FIFO queues it could represent: namely, all permutations of the requests currently in slots that respect the partial order x <r y (where the STORE of x preceded the INC of y). Let Lin(H|ABS) be the set of abstract queue states reachable by valid linearizations of the history so far. Claim (§4.3.2, Theorem 17): for every reachable state r, A(r) ⊆ Lin(H|ABS).
INC, and READ: None of these steps adds or removes a request from a slot, so A(r) is unchanged (or constrained only in ways consistent with the ongoing operation spans).STORE of x): For another request y to be required to follow x (x <r y), y's INC would have to occur after x's STORE—which is happening right now. Thus x is maximal in <r and can be appended to the back of any sequence, matching a legal Enq(x) taking effect right now.SWAP of x at slot i): Suppose the dequeuer scans upward from slot 1 and takes x from slot i. Could some other remaining request z satisfy z <r x? If so, z's STORE preceded x's INC, which implies both that z sits in a lower slot (j < i) and that z was already in slot j before the dequeuer began scanning. But then the dequeuer would have encountered and taken z before ever reaching slot i! Thus x is minimal in <r and stands first in at least one valid sequence, matching a legal Deq() returning x.∎This outlines Herlihy and Wing's proof in §4.3.2 (Lemmas 15–16 and Theorem 17); full formal details appear in their companion technical report.
The rule of the board is a clean, powerful guarantee, but a house that relies on it should also know the four things it deliberately leaves out:Linearizability is a clean, powerful guarantee, but a system that relies on it should also know the four things it deliberately leaves out:
Although the rule is defined using real time under the sun, the houses do not need sundials to keep it. They know the rule holds because the design of the board (like House 3's gate or the busy slot board) mathematically guarantees it.Although the definition uses real time, the processes do not need a shared clock to keep it. They know it holds because the design of the queue (like the single interface at P3 or the concurrent array) mathematically guarantees it.
Linearizability is a safety property: it forbids wrong answers, but does not guarantee that an operation eventually finishes. On the busy board, a slow loader could theoretically see every slot emptied by faster loaders just before reaching it. Guaranteeing progress (wait-freedom or starvation-freedom) is a separate requirement.Linearizability is a safety property: it forbids wrong answers, but does not guarantee that an operation eventually finishes. In the concurrent queue, a slow dequeuer could theoretically see every slot emptied by faster dequeuers just before reaching it. Guaranteeing progress (wait-freedom or starvation-freedom) is a separate requirement.
The rule defines what multiple copies must look like from the outside, but leaves the way copies are kept in step, the slips that carry word between them, to other arrangements.Linearizability defines what multiple copies must look like from the outside, but leaves the replication protocol, the messages that keep copies synchronized across a network, to consensus and replication algorithms.
When two requests overlap in real time, linearizability allows either one to go first, even if a slip passed between them. Houses that care about chains of slips rather than spans of the sun use causal ordering (tallies) instead.When two requests overlap in real time, linearizability allows either one to go first, even if a message passed between them. Systems that care about message chains rather than wall-clock spans use causal ordering (timestamps) instead.
What the rule of the board does promise is the gold standard for a single board: whatever busy work or copying hides behind the gate, every request is filled as though a single steward with a single board handled them one at a time in real-world order.What linearizability does promise is the gold standard for single-object consistency: whatever concurrency or replication hides behind the interface, every request is served as though a single sequential queue handled them one at a time in real-world order.
A shared object is linearizable if every operation appears to take effect at a single instant between its invocation and its response, in an order that respects real time.
Whether backed by one copy or many, each linearizable object can be verified in isolation, and no caller is forced to wait when an operation is always defined.
Setting Three Houses Keeping Order
| the houses; the loaders; the clerks | Sequential processes, each waiting for one operation's response before issuing the next. Processes, §2.1. |
| the board; placed first, filled first | A FIFO queue. The paper's running example, Fig. 1 and Fig. 3. |
| a request; a serving | Enq; Deq, which returns the oldest item. Axioms E and D, Fig. 3. Enq is total; Deq is partial. |
| sending a request; its confirmation | An invocation and its matching response. §2.1. |
| before; overlap; judged by the sun | One operation's response precedes the other's invocation; otherwise concurrent. The real-time partial order <H, §2.2, which no process observes. |
| a single steward with a single board | The object's sequential specification. A legal sequential history. |
| the rule of the board | Extend the history with responses to some pending invocations, drop the rest; the result is equivalent to a legal sequential history that respects <H. Linearizability, L1 and L2, §2.2. |
| each thing's moment inside its span | The instant between invocation and response at which the operation appears to take effect. §1, §6.2. |
| the goatherd's morning | An enqueue completes before another begins, and the later item is dequeued first. Sequentially consistent but not linearizable: H₇; with overlap, H₂ (Fig. 1b). |
| the four mornings | H₁ (acceptable), H₂ (not), H₃ (an operation takes effect before its response), H₄ (one item dequeued twice, not acceptable), Fig. 1. |
| the tallies' first | Lamport's happened-before, extended to a total order by process identifiers. Not in this paper; neither it nor <H contains the other. |
| serving by entry at House 3's gate | A single-copy implementation whose linearization point is the step at which the request is applied. The single-valued abstraction function of §4.2, in the easy case. |
| copies acting as one | Linearizability is stated on invocations and responses alone and does not see the implementation. §2.2; the implementor is free to realise any level of concurrency, §6.2. |
| One Board at a Time; grain and oil | A history is linearizable if and only if each object's subhistory is. Locality, Theorem 1, §3.1. |
| the looser rule; each board served the other house first | Sequential consistency; each queue's subhistory is sequentially consistent and the whole is not. Lamport 1979; H₈, §3.3. |
| No Request Waits on Another | A pending invocation of a total operation can always be completed without breaking linearizability. Nonblocking, Theorem 2, §3.2. |
| a loader at an empty board | Blocking on a partial operation, which the nonblocking property allows. Deq on the empty queue, §3.2. |
| several things done as one; one of two called off | A transaction; serializability is neither local nor nonblocking. §3.3. The paper's blocking example, H₉, uses two registers; H₈ read as transactions is strictly serializable per object and not overall. Footnote 1: there is no counterpart to aborting for linearizability. |
| the busy board; slots; the peg | The lock-free queue: the array items and the index back. §4.2. |
| taking a number; putting a tablet in; looking at the peg; emptying a slot | INC (returning the old value); STORE; READ; SWAP with null. §4.2. |
| the race of the two clerks and the loader | Two concurrent enqueues and a dequeue whose request depends on a later race, so no single-valued abstraction function exists. §4.2. The paper's trace shows READ(q.back) returning 2 after two INCs from 1; with INC returning the old value it would be 3, giving the two slots the trace walks. |
| what the board could mean | An abstraction function to sets of queue values, with the representation invariant kept between every step. A: REP → 2ABS, §4.2–4.3.3. |
| put in before another's number was taken | x's STORE precedes y's INC. The partial order <r. |
| sequences the business could have produced | Linearized values. Lin(H), §4.3.1. |
| The Board Keeps the RuleThe Queue Is Linearizable | A(r) ⊆ Lin(H|ABS) for every linearized representation value. §4.3.2; Theorem 17, Appendix II, using Lemmas 15 and 16. Supporting lemmas are proved in the technical report [45]. |
| in order, none vanishes, none invented | Theorems 6–8, §5.2. Theorem 6 alone was Gottlieb, Lubachevsky and Rudolph's condition. |
| a loader overtaken for ever; a board that never serves | Linearizability is a safety property only. §4.2; §6.2. |
The paper behind this book. Maurice P. Herlihy and Jeannette M. Wing, Linearizability: A Correctness Condition for Concurrent Objects. ACM Transactions on Programming Languages and Systems 12, 3 (July 1990), 463–492. Covers the definition of linearizability, locality (Theorem 1), the nonblocking property (Theorem 2), the comparison with sequential consistency and serializability, the proof method using set-valued abstraction functions, and the lock-free concurrent queue.
The ideas. Herlihy and Wing propose that a concurrent object is correct if every operation appears to take effect instantaneously at some single moment between its invocation and its response. That ensures the object behaves like a single copy executing operations one at a time, while respecting real-time order: any operation that finishes before another begins must take effect first. Because linearizability is defined purely in terms of external calls and responses, clients cannot tell whether an object is implemented by a single copy, replicated across machines, or shared without locks.
Crucially, real-time order is distinct from Lamport's causal order. One operation can finish before another starts without any system message passing between them (as when information travels out-of-band, like our goatherd), and conversely, two operations linked by a message can still overlap in real time. Neither ordering contains the other.
Two properties make linearizability ideal for building modular systems: it is local (a system is linearizable if and only if each individual object is linearizable) and nonblocking (a pending total operation is never forced to wait for another operation). Dropping the real-time requirement gives sequential consistency, which loses locality; applying the one-at-a-time requirement to multi-operation transactions gives serializability, which loses both locality and the nonblocking property.
Finally, when concurrent races make it impossible to point to a single line of code as an operation's linearization point—as in Herlihy and Wing's lock-free queue—we can still prove linearizability by mapping each concrete state to the set of abstract queue orders it could represent, and showing that every such order is valid.
Herlihy, M. P., and Wing, J. M. Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12, 3 (1990), 463–492.