edited by
1,059 views
3 votes
3 votes

Suppose 10 processes P1 to P10 share 7 identical resource units which can be reserved and release 1 at are time the maximum resource requirement of a processs i is SP where SP is greater then 0. The maximum value of  that ensures deadlock does not occurs is ________ .

edited by

3 Answers

4 votes
4 votes

Lets assume each of 10 process request 2(Sp) resourse max .. then 7 recourse will be divide into 10 process in which 7 process takes 1 resource each .. it will create deadlock.

If they request 1 resouce each so when process gets one resourse then it will complete its execition and release that resource will be assign to other process so deadlock never occure.

1 is answer

4 votes
4 votes
Si resources for pi

imagining worst case such that all processes are allocated all the available resources but are deadlocked i.e allocate Si-1 to process pi

so to avoid deadlock

$\sum_{i=1}^{i=n}$ (Si-1) < m              m= available resources

$\sum_{i=1}^{i=n}$ Si < m + n

$\sum_{i=1}^{i=n}$ Si < 7+10

$\sum_{i=1}^{i=n}$ Si < 17

$\sum_{i=1}^{i=n}$ Si <= 16    

so maximum 16
4 votes
4 votes
every process Pi require Si units
so in worst case we can give Si-1 to a process Pi
so total we have n processes and m resources
so every process we r giving Si-1 i.e (S1-1)+(S2-1)+.....+(Sn-1)<m (in order to avoid deadlock)
(S1+S2+........+Sn)-(1+1+......+n times)<m
sigma S1-n<m
sigma Si<m+n

then 10s<10+7.

10s<17

show 10s max value is 16.
edited by

Related questions