662 views
3 3 votes

Consider a scenario where 3 processes P1, P2  and P3 are sharing   X  resources of the same type. The maximum need of the three processes is 4, 8, 6. It is also known that the maximum combined need of both processes P1 and P2 at a time is 9 and they always execute only in a combined manner. Then the value of  X+ 7 is ________.

1 Answer

0 0 votes

here we have to select a number randomly

given p1 requires 4

p2 requires 8

p3 requires 6

p1+p2 both require minimum 9 resources at same time

so let us assume x=10

process allocated required
p1 3 1
p2 6 2
p3 1 5

so it may lead to unsafe state 

now let us assume x=12 

if we create a resource allocation table then the system will be always in safe state

so x=12 and x+7=19

Position:
Show:

Related questions

1 1 vote
1 1 answer
732
732 views
Anil Ji asked Aug 5, 2018
732 views
The height h of an AVL tree with n nodes lies in the interval:1.log2(n+1) ≤ h < c log2(n+2)+b 2.log10(n) ≤ h < c log10(n+1)+b 3.log10(n+1) ≤ h < c log10(n+2)+b 4.log2(n) ...
0 0 votes
0 0 answers
927
927 views
himgta asked Apr 30, 2018
927 views
Consider the below given C code:Void main(){int x=5,y=2;int *p;p=&x;y=*p;x=*y;printf("y is %d x is %d\n",y,x);}Choose the correct option:A) The following program has 1 le...
2 2 votes
2 2 answers
1.2k
1.2k views
himgta asked Apr 30, 2018
1,182 views
Consider implementation of stack using queue by following algorithm.Let $x$ be an element to be pushed in the stackpush(q1,x) { EQ(q1,x) while(q1 does not contain 1 eleme...
2 2 votes
1 1 answer
665
665 views
himgta asked Apr 21, 2018
665 views
Find the output of the c program below, assume base address of the array is 1500. The size of int is 4 bytes