
p1 is holding instance of r1..
p1 may request instance of r2
p2 is holding the instance of r2
p2 is requesting instance of r1
there no dead lock becuse there is no cycle..
request edge – directed edge P1 → Rj
assignment edge – directed edge Rj → Pi
If graph contains no cycles no deadlock.
If graph contains a cycle
Resource-Allocation Graph Algorithm
Claim edge Pi → Rj indicated that process Pj may requestresource Rj; represented by a dashed line.
Claim edge converts to request edge when a processrequests a resource.
When a resource is released by a process, assignmentedge reconverts to a claim edge.
Resources must be claimed a priori in the system.
2. Reasonable alternative periodically. But what period to use?
No satisfying solution in all cases
Some standard OSes don‘t bother deadlocks at all (e.gSUN’s OS) arguing that deadlocks will occur scarcely
“a set of processes is in a deadlock state when every process in theset is waiting for an event that can be caused only by another process in the set”, Silberschatz et. al., “Operating Systems Concepts”
There is no efficient solution
Regressive deadlock recovery
subject