in Operating System
329 views
1 vote
1 vote

in Operating System
329 views

6 Comments

Since 5 process request 3 instances each, total remaining instances will be 27-15=12.

max value of n such that each of n has 4 instances is:

3n+1<=12 (each of n processes assigned with 3 instances(as max requirement is 4) and at least 1 instance should be left out to avoid deadlock)

n<=3.66

max value of  n can be 3.
0
0
edited by
Shriram why aren't we doing the same way for those 5 processes? Like why are you accepting their requests and allocating them with 3 resources each? Why can't we allocate 2 resources for the same reason that you are applying for the n processes?
1
1

@ MiNiPanda Your methodology looks fine to me.
Here is my work :
$\rightarrow$ $ 5 \times 2+n \times 3+1\leq 26$
$\rightarrow$ $3n+1\leq 16$

$\rightarrow n \leq\color{Red}5$

So,

$5$ Processes $4$ Resources Allocate $15$
$5$ Processes $3$ Resources Allocate $10$
  $15+10+1=26$ (No deadlock)
1
1
So it is coming 5 right?
1
1
Yeah, i too thought of the same. The ans then woud be n=5.
0
0
My bad. I misread the question. I thought it was allocation instead of request. Now I see the point.
0
0

Please log in or register to answer this question.