2?

Dark Mode

2,120 views

3 votes

Best answer

Given : Total Resources: 28

Total no of processes : 4+n

Out of this 4 process require 5 resources and n require 5. So For the minimum no of processes for which deadlock occurs we will take away 1 resource from each of the process. So total 4 processes have 4 resources each and n have 4.

So that means 4*4+4*n=28 for deadlock so for deadlock minimum val of n is n=(28-16)/4=3

This causes deadlock. So for system to be deadlock free maximum value of n is = 3-1=2. This is because this value of n will not lead to any deadlock 3 would. So we first calculate the value for minimum value which causes deadlock and then subtract 1 for max value which wont cause deadlock.

Total no of processes : 4+n

Out of this 4 process require 5 resources and n require 5. So For the minimum no of processes for which deadlock occurs we will take away 1 resource from each of the process. So total 4 processes have 4 resources each and n have 4.

So that means 4*4+4*n=28 for deadlock so for deadlock minimum val of n is n=(28-16)/4=3

This causes deadlock. So for system to be deadlock free maximum value of n is = 3-1=2. This is because this value of n will not lead to any deadlock 3 would. So we first calculate the value for minimum value which causes deadlock and then subtract 1 for max value which wont cause deadlock.