(0) Resource allocation graph
a set of vertices V and a set of edges E.
- V is partitioned into to two types:
- P= {P1,P2,...,Pn}, the set consisting of all the processes in the system.
- R={R1,R2,...,Rm}, the set consisting of all resource types in the system.
-request edge-directed edge P1 [] Rj
-assignment edge-directed edge Rj[]Pi
_Process

_Resource typeb with 4 instances

_Pi requests instance of Rj

_Pi is holding an instance of Rj
Basic Facts:
- if graph contains no cycle => no deadlock
- if graph contains a cycle,
---if only one instance per resource type, then deadlock
---if several instances per resource type, possibility of deadlock.
0 comments:
Post a Comment