3,227 views
3 votes
3 votes

Consider a system with processes P0, P1,P2, . . . .  P99, P100, each process requires maximum of 4 resources. System has allocated 2 resources to each process. The minimum number of resources should release such that above system is deadlock free is _____

2 Answers

Best answer
3 votes
3 votes
For a system to be deadlock free ,

Sum of max need of processes < No. of processes + No. of resources ........ (i)

here System has allocated 2 resources to each process , and Total number of process = 101

so max need of processes = 101 * 2 = 202

let number of resources = R

so from (i) we get, 202 < 101 + R

101 < R

that means the minimum number of resources  should be 102 .
edited by
1 votes
1 votes

System needs to release just 2 resources (and no less) to enter a safe state. This will allow one of the processes to complete and free all 4 resources it was using. Clearly, a safe sequence exists now.

(These 4 resources will help complete 2 more processes, and so on…)

Answer:

Related questions

1 votes
1 votes
1 answer
2
3 votes
3 votes
1 answer
3
GO Classes asked Mar 26, 2023
482 views
A $\text{10-unit}$ heap of memory uses an allocation algorithm in which a block is allocated at the left end of the leftmost block in which it fits. Which of the followin...