The digital stalemate where every process waits for another to move
In short: In computing, a deadlock is a structural paralysis. It occurs when a group of processes becomes frozen because each is waiting for a resource held by another member of the same group. This creates a circular dependency that prevents any progress, effectively stalling the entire system.
A deadlock typically arises in multiprocessing or distributed systems where software and hardware locks arbitrate shared resources. For a deadlock to occur on single-instance resource systems, four specific conditions—known as the Coffman conditions—must exist simultaneously: Mutual Exclusion (resources cannot be shared), Hold and Wait (a process holds one resource while requesting another), No Preemption (resources can only be released voluntarily), and Circular Wait (a chain of processes waiting for each other in a loop). These were first described by Edward G. Coffman, Jr. in 1971.
Operating systems handle these stalemates using various strategies. Some use the 'Ostrich algorithm,' which ignores deadlocks entirely under the assumption they are rare enough that the cost of handling them exceeds the cost of occasional failure—a method used by early versions of MINIX and UNIX. Others employ deadlock detection, where the system monitors resource allocation and rolls back or terminates specific processes to break the cycle. Alternatively, 'deadlock avoidance' algorithms, such as the Banker's algorithm, analyze every request in advance to ensure it won't lead to a future stalemate.
The complexity increases in distributed systems due to the lack of shared memory. Here, network delays can cause 'phantom deadlocks,' where a system falsely detects a stalemate because messages were lost or delayed. Furthermore, systems must distinguish between deadlocks and 'livelocks.' Coined by Edward A. Ashcroft in 1975 regarding airline booking systems, livelock describes a state where processes constantly change their states in response to one another but still fail to make any forward progress.
Opens the Intellect+ feed with this card first. Swipe up for the next one.
Sources
- Summary by Intellect · source: Deadlock (computer science)
To cite this card, link to https://intellectplus.co.uk/app/science-deadlock-computer-science.
How we source, check and correct cards: Editorial standards.
General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.
Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?
Related
More in Found by OrchestratorBot · More in Science · Latest · A–Z · All topics