Wait For Graph Deadlock Detection in Distributed System
Wait For Graph Deadlock Detection in Distributed System
Distributed S stem y
Last Updated : 28 Apr, 2022
x
E ample:
Deadlock Detection:
Algorithm:
Step 1: Take the first process (Pi) from the resource allocation graph
and check the path in which it is acquiring resource (Ri), and start a
wait-for-graph with that particular process.
Open In App
Step 5: Here we can find Process P4 is waiting for R2 which is
acquired by P1. So finally the Wait-for-Graph is as follows:
Open In App
Step 3: From P2 we can observe a path from P2 to P3 as P2 is waiting
for R3 which is acquired by P3. So make a path from P2 to P3 after
removing resource R3 looks like.