Question: 25. An operating system has processes P1, P2, P3, and P4 and resources R1 (one resource), R2 (one resource), R3 (two resources), and R4 (three

25. An operating system has processes P1, P2, P3, and P4 and resources R1 (one resource), R2

(one resource), R3 (two resources), and R4 (three resources). The notation (1, 1), (2, 2), (1, 2) means that P1 requests R1, then P2 requests R2, then P1 requests R2. Note that the first two requests produce allocation edges on the resource allocation graph, but the third request produces a request edge on the graph because R2 is already allocated to P2.

Draw the resource allocation graph after each sequence of requests. State whether the graph contains a cycle. If it does, state whether it is a deadlock cycle.

*

(a) (1, 1), (2, 2), (1, 2), (2, 1)

*

(b) (1, 4), (2, 4), (3, 4), (4, 4)

(c) (1, 1), (2, 1), (3, 1), (4, 1)

(d) (3, 3), (4, 3), (2, 2), (3, 2), (2, 3)

(e) (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4)

(f) (2, 1), (1, 2), (2, 3), (3, 3), (2, 2), (1, 3)

(g) (2, 1), (1, 2), (2, 3), (3, 3), (2, 2), (1, 3), (3, 1)
(h) (1, 4), (2, 3), (3, 3), (2, 1), (3, 4), (1, 3), (4, 4), (3, 1), (2, 4)
(i) (1, 4), (2, 3), (3, 3), (2, 1), (3, 4), (1, 3), (4, 4), (3, 1), (2, 4), (4, 3)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Principles Algorithms And Systems Questions!