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

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 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 Answer:

Related Book For  book-img-for-question

Computer Systems

ISBN: 9781284079630

5th Edition

Authors: J Stanley Warford

Question Posted: