Glossary · Automation software engineering and architecture
Livelock
German: Livelock
In concurrent systems, a livelock is a situation in which two or more tasks or processes keep changing their state in response to each other but make no progress, for example by repeatedly retrying or yielding, so the system appears active while no useful work is done.
- Software engineering
In one sentence
A livelock occurs when tasks keep reacting to each other without making progress, so the system looks active but does no useful work.
Example
Two shuttles in a warehouse system both back off when they detect each other at a crossing, then both retry at the same moment, over and over.
How it applies
- Engineering: Livelocks often arise from symmetric recovery logic, where all participants react the same way at the same time. Randomized or prioritized Backoff, a defined tie-breaker and retry limits prevent them.
- Operation: A livelocked system consumes processor time or keeps moving but does not complete work. Progress monitoring, such as checking that orders or steps actually complete within a time limit, detects it where health checks based on activity do not.
- Documentation: Document the arbitration rules for shared resources, such as crossings, shared buffers or communication channels, and the retry limits. Service documentation should explain how to recognize and resolve a blocked situation safely.
Livelock vs. deadlock
In a Deadlock, tasks are blocked and inactive. In a livelock, they are active but make no progress. Deadlocks are often easier to spot, because activity stops; livelocks can hide behind busy processors and moving parts.