4,125 views
9 9 votes

Consider a system having ‘N ’ resources of the same type. ‘N’ resources are shared between 3 processes P1 , P2 and P3 which have individual peak demand of 4, 6 and 8. The minimum value of ‘N’ to ensure that deadlock will never occur, if it is given the maximum requirement for combination of P1 and P3 is 9 are__________.

3 Answers

Best answer
8 8 votes
P1 P2 P3
4 6 8

Asked :
The minimum value of ‘N’ to ensure that deadlock will never occur.

Important Fact:

maximum requirement for combination of P1 and P3 is 9

Solution:
Ilustration about important fact is at any point of time both process does not require more than 9 resources
Analogy : For example you have two application(web) which are running simulatenously but ensuring that the bandwidth required by both of them will not exceed by some Value.


 Possible combination :
$P1:P3= $ $(4,5) (3,6) (2,7) (1,8)$


Thus to satisfy combination We need atmost 7 and one system backup resource.
Total Resource need =7+5+1(this one to ensure retrival once process completes execution)

Total=13

• selected by
5 5 votes

Let's focus this statement:- 

if it is given the maximum requirement for combination of P1 and P3 is 9

it means that at any time sum of maximum resources taken by P1& P3 is 9

now lets see all possiblties:-

P1:P3 :P2 =  (4,5)(3,6)(2,7)(1,8)

now for following cases consider the condition for no deadlock:- "allocate n-1 resource to evry process after then allocating one more resource guarantee of no_deadlock."

(4,5,6) =(4-1,5-1,6-1)+1=13

(3,6,6)=(2,5,5)+1=13

(2,7,6)=(1,6,5)+1=13

(1,8,6)=(0,7,5)+1=13

Position:
Show:

Related questions

3 3 votes
1 1 answer
139
139 views
GO Classes asked Aug 26
139 views
Consider the resource allocation graph below consisting of four tasks $(\text{T1}$, $\text{T2}$, $\text{T3}$, and $\text{T4})$ and three resources $(\text{R1}$, $\text{R2...
3 3 votes
1 1 answer
130
130 views
GO Classes asked Aug 21
130 views
A system contains three distinct critical resources: $R_1,R_2,R_3$ shared by four processes.Their resource requirements are:$P_1$ requires $R_1$ and $R_2$.$P_2$ requires ...
3 3 votes
1 1 answer
108
108 views
GO Classes asked Aug 21
108 views
In a multiprocessor system with preemptive scheduling, three processes $P_1,P_2,P_3$ share resources $R_1,R_2,R_3$.$P_1$ and $P_2$ compete for $R_1$. $P_2$ and $P_3$ comp...
3 3 votes
1 1 answer
101
101 views
GO Classes asked Aug 21
101 views
In the wait-for graph for transactions $A$ through $G$ shown below, which option lists all transactions that are in a permanent waiting state?Here, an edge $X \to Y$ in t...