0 votes 0 votes In which of the following situations can a deadlock occur? Process requests all the required resources in the beginning. Process requests resource only if it is holding no resource. Process orders resources in increasing order of enumeration. Resources are immediately allocated to process holding some resources. GATE tbb-mockgate-3 operating-system deadlock-prevention-avoidance-detection + – Bikram asked Feb 9, 2017 • retagged Sep 14, 2020 by ajaysoni1924 Bikram 393 views answer comment Share Follow See 1 comment See all 1 1 comment reply Rishabh Gupta 2 commented Feb 1, 2018 reply Follow Share Question should be: In which of the following situations, deadlock can occur? 4 votes 4 votes Please log in or register to add a comment.
Best answer 2 votes 2 votes In order to not satisfy Hold and Wait condition , we must guarantee that whenever a process requests a resource , it does NOT hold any other resources. hence option D satisfies Hold and Wait condition necessary for deadlock occurrence. Bikram answered Feb 9, 2017 • selected Feb 11, 2017 by Bikram Bikram comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Gaurab Ghosh commented Feb 11, 2017 reply Follow Share The question says the resource is "Immediately ALLOCATED" to the process holding some resources. How this satisfies Hold and Wait? If anything it preempt the resource from other processes I can say. Please clear my doubt. 0 votes 0 votes Lucky sunda commented Feb 11, 2017 reply Follow Share Oh yes...I got confused. Thanks sir :) 0 votes 0 votes GO_user commented Jan 6, 2019 reply Follow Share @Arjun Sir @Bikram Sir I know option A, B and C are clearly not the answer. But I am having the same confusion..how deadlock is possible in D if "wait" condition is not there..? There might be starvation though.. 0 votes 0 votes Please log in or register to add a comment.