Consider the directed resource graph given below. (R1-2 means Resource 1 has 2 u
ID: 3810716 • Letter: C
Question
Consider the directed resource graph given below. (R1-2 means Resource 1 has 2 units of non-sharable resource.) a. Is this system, as a whole, deadlocked? b. Are there any deadlocked processes? c. Three processes are requesting resources from R2. i. Which requests would you satisfy to minimize the number of processes involved in the deadlock? ii. Which requests would you satisfy to maximize the number of processes involved in deadlock? d. Can the graph be reduced partially or totally? e. Can the deadlock be resolved without selecting a victim?Explanation / Answer
1.a) This system is as a whole deadlocked.because P3 is waiting for R3 which is held by P4, and P4 is waiting for R4 which is held by P3 and similary P1 and P2 are waiting for R1,R2 which are held by P2 and P1 respectively.
b) Yes, There is a cycle for the above resouce allocation graph containg P3,P4 processes which leads to deadlock.
c i) Even if P3 is satisfied still the P3 is involved in deadlock .so there is no use in satifying P3 instead P1 is satisified according to priority bases.
ii) P3 is solved to maximize the processes since P3,P4 are continuously allocated the resource'
d)It can be partially reduced by removing the cycle through P3,P4,R3,R4