liveBook · Manning

Livelock

A livelock is a concurrency failure in which active threads or tasks repeatedly respond to one another without making useful overall progress.

How 3 Manning books explain it

Modern C, Third Edition

A livelock is a concurrency failure in which threads continue executing but repeatedly make no effective progress in response to one another.

How it is used
Explains livelock as a threaded-program failure in which apparent activity masks the absence of progress.
How deep it goes
Defines repeating control-loop behavior, contrasts it with deadlock, and points toward case analysis without developing a full prevention method.
Examples
Uses cyclic traffic detours and interacting vehicles to model threads that repeatedly change behavior without escaping.
What you can do after
Evaluate threaded behavior by distinguishing blocked waits from active repetition and by analyzing possible state cycles.

Read how Modern C, Third Edition explains livelock →

Grokking Concurrency

A livelock is a concurrency failure in which tasks remain active but repeatedly relinquish and reacquire resources without making progress.

How it is used
Explains a concurrency failure that helps distinguish active nonprogress from blocked execution.
How deep it goes
Explains the lock cycle through analogy, philosophers, effects, and Python code, but does not provide a detailed detection algorithm.
Examples
Uses a simultaneous-phone-call analogy, dining philosophers, chopsticks, and a Python threading listing.
What you can do after
Diagnose repeated lock concessions and reduce livelock by applying hierarchical lock ordering.

Read how Grokking Concurrency explains livelock →

C++ Concurrency in Action, Second Edition

A livelock is a state in which threads repeatedly change or retry operations in response to one another without making useful progress.

How it is used
Explains livelock as a risk of lock-free data structures and a cause of unwanted blocking symptoms.
How deep it goes
Defines the retry cycle, contrasts active checking with blocking, and describes symptoms without detailing detection procedures.
Examples
Uses two threads repeatedly invalidating each other’s operations and an analogy of people retrying passage through a narrow gap.
What you can do after
Diagnose possible livelock from stalled progress combined with active thread execution and high CPU usage.

Read how C++ Concurrency in Action, Second Edition explains livelock →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.