295 views
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 ____.

### 1 comment

Min r val is 8?

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

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