Skip to content

Non-Blocking Algorithm

A concurrent shared-object procedure whose operation-progress guarantee does not depend on a paused thread releasing exclusive ownership.

Version
v1 · 2026-10-03 · History
Domain-specific #
13465
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Aliases
Nonblocking Algorithm

Core Idea

A non-blocking algorithm operates on shared concurrent state without making all other active callers depend on one paused thread releasing an exclusive lock. The guarantee belongs to the whole operation, not merely to an atomic instruction. Obstruction-free guarantees completion after enough solo execution; lock-free guarantees some active operation completes; wait-free guarantees each active operation bounded-step progress under the stated model.[1]

How would you explain it like I'm…

No Hogging the Crayons

Imagine kids sharing one box of crayons. In one way of sharing, a kid grabs the whole box, and if they fall asleep holding it, nobody else can color. A Non-Blocking Algorithm is a way of sharing where nobody can hog the box like that, so even if one kid stops in the middle, the others can still keep coloring.

No Waiting on a Stuck Friend

Computers often have many workers, called threads, sharing the same piece of data at once. A common way to share is a lock: one worker takes it, and everyone else waits. But if the worker with the lock gets stuck, everyone is stuck. A Non-Blocking Algorithm is designed so that a stuck or slow worker never makes everyone else wait for it. There are different strengths of this promise, from 'you'll finish if others leave you alone' up to 'everyone finishes in a limited number of steps'.

Lock-Independent Progress Guarantees

A Non-Blocking Algorithm is a way of designing operations on shared data used by several threads so that a thread delayed or stopped in the middle of an operation never becomes an owner that all others must wait for. The name describes a progress guarantee for the whole operation, not just the fact that the code avoids locks or uses special atomic processor instructions. There are three common levels. Obstruction-free: an operation finishes if it gets to run alone for long enough, though constant conflicts can stall it. Lock-free: the system as a whole always progresses, meaning some operation finishes, though one unlucky thread might starve. Wait-free: every operation finishes within a bounded number of its own steps. These describe guarantees, not speed, and the algorithm still has to be proven correct separately.

 

A Non-Blocking Algorithm specifies operations on a shared concurrent object such that a thread delayed or halted inside an operation cannot become an exclusive owner that all other threads must wait for. The term names a progress property of the complete operation, not the mere absence of a mutex or the availability of an atomic instruction such as compare-and-swap. Correctness of interleaved operations still requires a separate argument; the progress claim specifies what can complete when others are delayed or interfering. Obstruction-freedom guarantees that an operation completes after running long enough without interference, even if others are paused mid-operation, but it may livelock under continuous contention. Lock-freedom guarantees system-wide progress, with some active operation always completing, though an individual thread may starve. Wait-freedom guarantees that every active operation completes within a bounded number of its own steps under the stated model. These levels form a hierarchy of guarantees, not a ranking of performance or a promise of low latency for every operation.

Scope of Application

Michael and Scott's linked FIFO queue is a lock-free case using compare-and-swap; Oracle documents a library queue based on it. Herlihy, Luchangco and Moir's array-based deque is an obstruction-free case: a paused peer does not own a lock, but sustained conflicts need not yield system-wide progress. These are unlike progress tiers, not evidence that all non-blocking objects use CAS or helping.[2][3][1]

Clarity

Name the object operation, state-transition correctness, memory model and precise progress tier. A CAS-based spinlock is still blocking if its owner can pause while others wait. Lock-free does not imply fairness for each thread; obstruction-free does not imply progress under continuous contention. ABA and safe reclamation may matter in a specific pointer-based design but are not universal definitional roles.[1][2]

Manages Complexity

The identity separates safety under interleaving from liveness under delay. It also separates formal progress from measured throughput: a stronger guarantee is not automatically faster. Comparing a linked queue with an array deque reveals the common stopped-owner test while preserving different structures and guarantees.[1][2]

Abstract Reasoning

Let an operation update shared state while other threads may interleave or halt. Ask whether a halted participant retains exclusive ownership required by every peer. Then quantify progress: one operation after isolation, some operation despite ongoing activity, or each operation within its own step bound. That quantifier—not the brand of atomic primitive—classifies the non-blocking strength.[1]

Knowledge Transfer

Transfer shared object / interleaving-safe transition / progress condition / stalled-peer test from the FIFO queue to the deque. Do not transfer a lock-free claim to the obstruction-free implementation or infer per-operation latency from a system-wide guarantee. The staged strict parent is live prime Algorithm; no canonical graph edge has been applied.[2][1]

Relationships to Other Abstractions

Local relationship map for Non-Blocking AlgorithmParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Non-BlockingAlgorithmDOMAINPrime abstraction: Algorithm — is a kind ofAlgorithmPRIME

Current abstraction Non-Blocking Algorithm Domain-specific

Parents (1) — outgoing typed relations

  • Non-Blocking Algorithm is a kind of Algorithm Prime

    A non-blocking algorithm is an executable concurrent procedure with an additional independent-progress condition.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Non-Blocking Algorithm sits in a sparse region of the domain-specific corpus (73rd percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Unclustered & Miscellaneous (3155 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Maurice Herlihy, Victor Luchangco and Mark Moir, “Obstruction-Free Synchronization: Double-Ended Queues as an Example,” ICDCS (2003), 522–529, Introduction and §§3–4. registry ↩a ↩b ↩c ↩d ↩e ↩f

[2] Maged M. Michael and Michael L. Scott, “Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms,” PODC (1996), 267–275, Introduction, §2 and Fig. 1. registry ↩a ↩b ↩c ↩d

[3] Oracle, Java Platform SE 8 ConcurrentLinkedQueue documentation, class description. registry ↩