Deadlock
A deadlock is a state in which two or more processes are each waiting for a resource held by another, creating a circular dependency that prevents any process from proceeding. It is the coordination failure par excellence: every agent is doing exactly what it should — waiting politely for a resource it needs — and the system as a whole halts indefinitely.
The four necessary conditions for deadlock, first formalized by Coffman in 1971, are: mutual exclusion (resources cannot be shared), hold-and-wait (processes hold resources while waiting for others), no preemption (resources cannot be forcibly reclaimed), and circular wait (a cycle exists in the resource allocation graph). All four must hold simultaneously; breaking any one prevents deadlock. This structural insight is what makes deadlock a systems problem rather than a programming error: it emerges from the interaction of local policies, not from any individual mistake.
Operating systems prevent deadlock through resource ordering (requiring processes to acquire resources in a fixed sequence), preemption (forcibly reclaiming resources), or avoidance algorithms like the Banker's Algorithm. Distributed systems face a harder variant: without a global clock or shared memory, detecting circular wait requires consensus protocols that are themselves vulnerable to liveness failures. Deadlock is therefore not merely a technical bug but a fundamental property of systems that enforce mutual exclusion without a global coordinator.