Consider the directed graph and answer the following questions: a) Is the system
ID: 3612941 • Letter: C
Question
Consider the directed graph and answer the following questions: a) Is the system as a whole, deadlocked ? b) Are there any deadlocked processes ? c) 3 processes - P1, P2, P3 are requesting resourcesfrom R2 : 1. Which requestswuoldyou satisfy to minimize the number of processes involved in adeadlock ? 2. Which requestswould you satisfy to maximize the number of processes involved in a deadlock ? d) Can the graph be reduced, partially or totally? e) Can the deadlock be resolved without selecting avictim ? Consider the directed graph and answer the following questions: a) Is the system as a whole, deadlocked ? b) Are there any deadlocked processes ? c) 3 processes - P1, P2, P3 are requesting resourcesfrom R2 : 1. Which requestswuoldyou satisfy to minimize the number of processes involved in adeadlock ? 2. Which requestswould you satisfy to maximize the number of processes involved in a deadlock ? d) Can the graph be reduced, partially or totally? e) Can the deadlock be resolved without selecting avictim ?Explanation / Answer
a) Yes the system is deadlocked P3 and P4 are in deadlock..since they arewaiting for each other to release the resources. Again P1, P2 are in deadlock ..since they arealso waiting for each other to release the resources. b) P3, P4 are in deadlock P1, P2 are in deadlock..and P3 is waiting forP1, P2 to release the resource. c) 1) If R2 is given to P2, thenP2 will execute to completion...then P1 will get both R1, R2 and itwill execute to completion. R3 will be then allocated to P3. therefore only 2 processes P3, P4 willbe in deadlock if R2 is given to P2 2) If R2 is given to P3,then {P1, P2} will be in deadlock and also{P3, P4} will be in deadlock. therefore total 4 processes{(P1, P2), (P3, P4)} will be in deadlock d) the graph can be reduced partially if we allocateR2 to P2..then P1 and P2 will be excuted to completion and onlyP3,P4 will remain in the graph. e) The deadlock cannot be resolved without selecting thevictim....since P3, P4 will be in deadlock even though deadlock ofP1, P2 is resolved