Resource Allocation Graph
Deadlock can be described through a resource allocation graph.
The RAG consists of a set of vertices P={P1,P2,…,Pn} of processes and R={R1,R2,…,Rm} of resources.
A directed edge from a processes to a resource, Pi->Rj, implies that Pi has requested Rj.
A directed edge from a resource to a process, Rj->Pi, implies that Rj has been allocated by Pi.
If the graph has no cycles, deadlock cannot exist. If the graph has a cycle, deadlock may exist.