(0) Resource allocation graph

a set of vertices V and a set of edges E.


  • V is partitioned into to two types:

  1. P= {P1,P2,...,Pn}, the set consisting of all the processes in the system.
  2. 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

Q: How would you know if there's a deadlock based on the Resource Allocation Graph?

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