Analyze the below resource allocation graph. Which of the following is the corresponding wait-for graph?
Tap to open full sizeFigure description
Resource allocation graph with processes P1 to P5 (circles) and resources R1 to R5 (squares, one instance each). Edges: P1 -> R1 (request); R1 -> P2 (assignment); P2 -> R3 (request); R3 -> P5 (assignment); P2 -> R4 (request); R4 -> P3 (assignment); P2 -> R5 (request); P3 -> R5 (request); R5 -> P4 (assignment); P4 -> R2 (request); R2 -> P1 (assignment). Options are wait-for graphs on P1 to P5. (a) P1->P2, P2->P5, P2->P3, P2->P4, P3->P4, P4->P1. (b) P1->P2, P2->P5, P2->P3, P3->P4, P4->P1 (no P2->P4). (c) P1->P2, P2->P5, P2->P3, P2->P4, P4->P1 (no P3->P4). (d) P1->P2, P2->P5, P2->P3, P2->P4, P3->P4 (no P4->P1).
- (A)
Wait-for graph with edges P1->P2, P2->P5, P2->P3, P2->P4, P3->P4, P4->P1
- (B)
Wait-for graph with edges P1->P2, P2->P5, P2->P3, P3->P4, P4->P1 (no edge P2->P4)
- (C)
Wait-for graph with edges P1->P2, P2->P5, P2->P3, P2->P4, P4->P1 (no edge P3->P4)
- (D)
Wait-for graph with edges P1->P2, P2->P5, P2->P3, P2->P4, P3->P4 (no edge P4->P1)