Dark Mode

[closed]

776 views

4 votes

closed with the note:
Duplicate of: https://gateoverflow.in/178957/me-test-series

A system has 10 identical resources and *N* processes competing for them. Each process can request atmost 3 resources but by grouping of first 3 processes needs only 6 resources. Then, the maximum value of ‘*N*’ is

3 votes

First 3 processes 2,2,2 (They are in deadlock yet as each need 3 resource but we are giving them 2 resource each) (P1,P2,P3)

Left resources 10-6 Resources then 4 resources are remaining, Now from 4 remaining resources, Give one resource to each 3 different process(P4,P5,P6)

We are left with resources 4-3 ie 1 resource

As each need 3 resource Now to remove deadlock give this left 1 resource to any of P1,P2,P3 so that they satisfy there condition and will not be in deadlock after completing there request any one of them will release it's lock and system will not be in deadlock

So we need 6 maximum process hence **N=6**

0 votes

As first 3 processes needs only 6 resources so we can give each process one less resource initially.Remaining resource we have 10-(6-3) =7. Given each process can request atmost 3 resources and we have to find the maximum no. of processes so we have to think that rest of process can even request for 3 resources so we give 3-1=2 resource to each of the remaining processes. we have to keep one resource for giving it to anyone for completing its execution.

(P1,P2,P3) -- 6-3=3

P4 --- 2

P5 -- 2

P6 -- 2

= 9 +1 =10

Hence total 6 PROCESS

(P1,P2,P3) -- 6-3=3

P4 --- 2

P5 -- 2

P6 -- 2

= 9 +1 =10

Hence total 6 PROCESS