0 votes 0 votes Question→ Given a system with 3 processes where each process requires at least 2 resources to complete their execution, then the largest number of resources which will guarantee a deadlock is ___ Answer Given is: 1 Operating System operating-system deadlock-prevention-avoidance-detection + – lalitver10 asked Jan 22, 2022 lalitver10 688 views answer comment Share Follow See all 10 Comments See all 10 10 Comments reply Vishal_kumar98 commented Jan 22, 2022 reply Follow Share The word at least changes the question. Think carefully. 1 votes 1 votes Isha_99 commented Jan 22, 2022 reply Follow Share @Vishal_kumar98 Why 1 is answer ? Isn’t 3 is the correct answer ? Minimum 4 resources will guarantee no deadlock so 4-1 will guarantee deadlock ?? 1 votes 1 votes palashbehra5 commented Jan 22, 2022 reply Follow Share https://gateoverflow.in/367866/Test-series-applied I still don't get it :) 1 votes 1 votes LRU commented Jan 22, 2022 reply Follow Share Question is saying at least 2 resources are needed to complete their execution, there is a slight variation in the question. If they require exactly(lower bound on at least) 2 resources per process then, to have a deadlock in the worst case, each process gets 1 resource each. Therefore, 3 resources can have deadlock. But if 1 process gets 2 resources (and if its requirement matches) then it is able to complete. Likewise, 2 resources can also dissatisfy deadlock. So, if there is only one resource, then there is no way a deadlock can be escaped. 1 should be the right answer. 2 votes 2 votes Shoto commented Jan 22, 2022 reply Follow Share @LRU Yes 1 is the correct ans, with 2 resource deadlock is possible but not always guaranteed. They are asking that deadlock must occur. 2 votes 2 votes Isha_99 commented Jan 22, 2022 reply Follow Share @adad20 Suppose if they have asked for possibility of deadlock then 3 must be the answer, right? 1 votes 1 votes Shoto commented Jan 22, 2022 reply Follow Share @Isha_99 Yes if they have asked max number of resources such that deadlock is possible then 3 is correct ans. 2 votes 2 votes palashbehra5 commented Jan 22, 2022 reply Follow Share I see, so whatever the minimum is of each process’s requirement, 1 less from that. This should be always the solution, right? 1 votes 1 votes Shoto commented Jan 22, 2022 reply Follow Share @palashbehra5 Yeah even after giving all the resources to one process must not satisfy the requirement of the process 1 votes 1 votes Chandrabhan Vishwa 1 commented Jan 22, 2022 reply Follow Share if your system in unsafe state then it is a possibility of dead lock but it is not gauranteed that dead lock occure in system okk so for guraunteed deadlock 0 or 1 resourse is needed if every process require atleast two resource to complete it task 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes 3 Should be the correct answer, as all the three process take one-one resource in worst condition. amitraj123 answered Jan 22, 2022 amitraj123 comment Share Follow See all 0 reply Please log in or register to add a comment.