retagged by
823 views
2 votes
2 votes

How come here deadlock is not possible?! It says each process needs a minimum of one instance to complete. So maximum could  be anything greater than one and deadlock may happen in the worst case, right?

retagged by

4 Answers

Best answer
2 votes
2 votes

D. DEADLOCK FREE

You are confused with the word minimum.

But just try to read beyond minimum ie. minimum of one instance to complete. It simply means it will complete even with one instance of resource.Even with more than  1 resources it will ALSO get completed as the minimum is 1.

Actually if you bring the concept of maximum resource along with minimum here then it does not make any sense logically.

But yes, the question would have been more appropriate if it had maximum in place of minimum.

selected by
0 votes
0 votes
Here , process need minimum 1 instance , any process P1 to p100 any one aqure ( take ) resource as it get 1 instance it will be completed ( and release the resource ) and so on .... No process will take resources ( here instance )  it requires....
0 votes
0 votes
I guess u are confused about worst case, so let say one of the process is given all the 100 instances so it will complete with it's execution and it will release all the 100 resources , now we are left with 99 processes again assume the same scenario hence it will be continued till 100th process. Although it will take very long time for the term of 100th process to come but surely it will not lead to deadlock , because deadlock means we are stuck and we cannot move further anymore but in above scenario,  the movement is there.
0 votes
0 votes
No of resource need <No.of process+no of resource available,     for no-deadlock

 100<100+100,hence no-deadlock.

Or ,we directly give every process one instance or R,and they all will complete.

Hence,no deadlock.