AlgoPlus//structures / deadlock
Read the theory

Deadlock · Resource-Allocation Graph

When processes hold one resource and wait for another, a cycle can trap them forever.

State
running
Waiting
0
Step
1/1
Legend
Request edge (P→R)
Assignment (R→P)
Deadlock cycle
AI Tutor Workspace
In a nutshell
A deadlock is a traffic jam between programs: each one is holding a resource the next one needs, arranged in a closed loop, so none of them can ever move forward. You can draw the situation as a graph of who-holds-what and who-wants-what; when single-copy resources form a loop, that loop is the deadlock, and breaking any one link frees everyone.
Ready
Press play to begin the cinematic walkthrough.
Deadlock is a standoff: each process holds something the next one needs, in a closed circle, so nobody can move. With single-instance resources, that circle is literally a cycle in the graph — break any one of the four Coffman conditions and the standoff ends.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Deadlock · Resource-Allocation Graph.