489 views
2 votes
2 votes
There are 5 processes in a system where each of them has a requirement of x resources. In the worst case, y number of resources would ensure that the system is deadlock free.

The system later on has 7 processes that require x resources each. In the worst case, (y + 4) resources would ensure that the system is deadlock free.

The value of x is ______

1 Answer

Best answer
2 votes
2 votes

x = 3

The condition for the system to ensure it is deadlock free is given as -

$\sum$ Si = m + n -1

(where Si = sum of resources required by all the processes, m = number of resources available, n= number of processes)

Now according to question,

5 * x = y + 5 -1

5x = y + 4        ------ (1)

7 * x = (y + 4) + 7 – 1     

7x = y + 10      ------- (2)

By subtracting eqn (1) from (2) we get ;

x = 3

selected by

Related questions

2 votes
2 votes
2 answers
2
LRU asked Oct 10, 2021
744 views
Given 5 processes and R copies of total resources in a system, each process requires 7 copies of resources to complete its execution. The maximum value of R to have deadl...
1 votes
1 votes
1 answer
4
LRU asked Nov 5, 2021
438 views
Given a system with 3 processes where each process requires at least 2 resources to complete their execution, then the largest number of resources which will guarantee a ...