liveBook · Manning

Starvation-free

As explained in Latency

Starvation-free is a progress guarantee that every continuously pending operation eventually completes.

Starvation-free is a progress guarantee for concurrent operations: every thread eventually makes progress, although completion may be delayed significantly. It is stronger than blocking but may still be unsuitable for low-latency systems that require predictable delays. section 8.5.1

A plain mutex provides blocking progress: one thread may hold the lock for a long time, and another may wait indefinitely or lose the lock to competing threads. A fair queue-based lock improves this situation by ordering waiters, illustrating how fairness supports starvation-free progress. section 8.5.1

Compare starvation-free progress with neighboring guarantees:

  • Blocking provides no progress guarantee and can cause high tail latency. section 8.5.1
  • Obstruction-free completion is guaranteed only when an operation runs in isolation, so contention can still cause interference or livelock. section 8.5.1
  • Starvation-free guarantees eventual progress but not a tightly bounded completion time; wait-free synchronization targets more predictable low latency. section 8.5.1 section 8.7
Figure 8.3 The relationship between different wait-free and lock-free progress conditions
Figure 8.3: The relationship between different wait-free and lock-free progress conditions.

Use the progress-condition relationship figure to situate starvation-free among blocking, obstruction-free, lock-free, and wait-free guarantees. section 8.5.1

How Latency covers it

How deep it goes
Defines eventual progress, contrasts neighboring guarantees, and illustrates waiting behavior without specifying an implementation algorithm.
Examples
Uses competing threads acquiring a mutex and contrasts that behavior with a fair queue-based lock.
What it assumes
Assumes concurrent threads, shared resources, mutexes, and the idea that operations may contend for progress.
What you can do after
Evaluate synchronization guarantees by distinguishing eventual progress from isolation-only progress and predictable completion.
How it connects
Relates blocking, obstruction-free, lock-free, wait-free, mutexes, fair queue-based locks, and low-latency systems.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Latency. The section links point to the parts of the book it draws on.