537 views
5 votes
5 votes
A given system has 13 processes and x number of copies of a resource r.  Out of 13 processes, 6 processes require 2 resources each, 3 processes require 3 resources each and the remaining processes require 5 resources each. The minimum value of x will guarantee that the system is deadlock free is ____.

 

2 Answers

Best answer
3 votes
3 votes

ref: https://gateoverflow.in/1394/gate-cse-2005-question-71

      https://gateoverflow.in/2065/gate-cse-2014-set-3-question-31


 

Given,

Total process(n) = $13$

Total resource = $r$


Formula 

$\sum_{i=1}^{n}S_i < n + r$ 

Where, 

$S_i$ is resource require by process $P_i$

$n$ is Total number of process

$r$ is Total number of resource


According to question

$(6*2 + 3*3 + 4*5) < 13 + r$

$(12 + 9 + 20) < 13 + r$

$41 < 13 + r$

$28 < r$

$r_{min} = 29$ for deadlock free

selected by
1 votes
1 votes

So we need to recall 2 basic formulaes for deadlock and no deadlock

R is resources ,n is number of processes and Si is resource copy alloted for each process.

  1. If deadlock present R<=$\sum_{i=0}^{n}Si-n$  
  2. If no deadlock R>$\sum_{i=0}^{n}Si-n$  

now question demands for no deadlock so R>(12+9+20)-13

R>28 so min value for no deadlock is 29

Related questions

2 votes
2 votes
2 answers
1
LRU asked Oct 10, 2021
680 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
423 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 ...