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? Operating System operating-system deadlock-prevention-avoidance-detection + – just_bhavana asked Jul 18, 2017 retagged May 20, 2021 by Shiva Sagar Rao just_bhavana 823 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments smsubham commented Jul 19, 2017 reply Follow Share No deadlock is possible here. Here each process can complete its execution using single resource only, so total requirement of resource is 100 instance of R, which is available. When each process requires only one instance to complete, there is unnecessary allocation if we allocate more. For example if a process requires use of only one printer, we can allocate it 100, but it serves no purpose. 1 votes 1 votes srestha commented Nov 8, 2017 reply Follow Share I think deadlock starvation both not possible. Because each resource getting their required 1 instances 0 votes 0 votes G.K.T commented Nov 8, 2017 reply Follow Share but its minimum may be every process needs two instances 0 votes 0 votes Please log in or register to add a comment.
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. Saswat Swarup answered Jul 21, 2017 selected Aug 9, 2017 by just_bhavana Saswat Swarup comment Share Follow See all 0 reply Please log in or register to add a comment.
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.... Abhi Som answered Jul 19, 2017 Abhi Som comment Share Follow See all 0 reply Please log in or register to add a comment.
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. prabhas44 answered Jul 20, 2017 prabhas44 comment Share Follow See all 2 Comments See all 2 2 Comments reply just_bhavana commented Jul 20, 2017 reply Follow Share what if more than one process requests for 100 resources at a time ? 0 votes 0 votes Aasharam Patidar commented Nov 11, 2017 reply Follow Share But if we consider the scenariio like P1 P2 P3....... 1 1 1............... Means Each of hundred process have taken 1 instance and waiting for other process to releaan there se then there may be deadlock Please help 0 votes 0 votes Please log in or register to add a comment.
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. jatin saini answered Nov 8, 2017 jatin saini comment Share Follow See 1 comment See all 1 1 comment reply Shubhanshu commented Nov 8, 2017 reply Follow Share But in the question, it is given that minimum requirement of each process is 1. It is minimum, not maximum. 0 votes 0 votes Please log in or register to add a comment.