RESOURCE ALLOCATION GRAPH
When a process Pi wishes an instance of resource type Rj, a request edge is inserted in the resource allocation graph. When this request is able to be fulfilled, the request edge is immediately transformed to an assignment edge. When the process no longer requires access to the resource, it liberate the resource as a result the assignment edge is deleted.
Process states:
- Process p1 is embrace an instance of r2 and is waiting for an instance of r1.
- Process p2 is embrace an instance of r1 and an instance of r2 and is waiting for an instance of r3.
- Process p3 is embracing an instance of r3.
If there is a cycle in the reallocation graph then there is deadlock, else no.