Header Ads

Calculate the Need for each resource by using the need formula and draw the Need Matrix.

Suppose a system has resource type C with 16 instances and 5 processes and the current system state is shown in the following table.



































Process



Max Need



Allocated



P0



11



4



P1



6



3



P2



13



4



P3



15



3



P4



7



2





Calculate the Need
for each resource by using the need formula and draw the Need Matrix.

Solution:

To calculate the Need for each resource, we can use the formula:


Need = Max Need - Allocated


Let's calculate the Need for each process and create the Need Matrix based on the given data:









































Process



Max Need



Allocated



Need



P0



11



4



11 - 4
= 7



P1



6



3



6 - 3 = 3



P2



13



4



13 - 4 = 9



P3



15



3



15 - 3 = 12



P4



7



2



7 - 2 = 5



Need Matrix:





























Process



Need



P0



7



P1



3



P2



9



P3



12



P4



5







No comments

Powered by Blogger.