Professional Documents
Culture Documents
Deadlock Detection Using Resource Allocation Graph Example
Deadlock Detection Using Resource Allocation Graph Example
using resource
allocation graph
example
Done by SATHYA D
Deadlock Characterization
REPRESENTATION
▪ Process Pi
Pi
▪ Pi holding an instance of Rj Rj
Example
Rule:
In a Resource Allocation Graph,
•If a cycle is being formed, then may be system is in a
deadlock state.
•If no cycle is being formed, then system is not in a
deadlock state.
Example for single instance Resource
P1R1P2R2 R2
P1R1P2R4P1
P3R3P4R4P1R1P2R4
R1
p1
DEADLOCK
OCCURS p3
p2
R4
p4 R3
Example for multiple instance Resource
R1 p5
p2
p1
P1R2P2R1P1
P2R1P5
R2 P1R2P4R3p3
p4
DEADLOCK
p3 DOESN’T
OCCUR HERE
R3
EXAMPLE
R1 p5
p2
p1
P1R2P2R1P1
P2R1P5
R2 P4R3p3R2P2R1P1R2P4
p4
P4R3p3R2P2R1P5
p3 DEADLOCK
OCCURS
R3
THANK YOU