10 10 votes A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units, then Deadlock can never occur Deadlock may occur Deadlock has to occur None of these Operating System operating-system resource-allocation isro2016 + – asu 14.8k views answer comment Share Follow Print See 1 comment 1 1 comment reply ritiksri8 commented Oct 7, 2024 reply Follow flag 3(2-1)+1<=4 4<=4 Deadlock never occur Ref:https://www.gatevidyalay.com/deadlock-in-os-deadlock-problems-questions/#:~:text=of%20resource%20R-,Thus%2C,deadlock%20%3D%2010%20%2B%201%20%3D%2011 2 2 replyShare Please log in or register to add a comment.
Best answer 21 21 votes If the system is deadlocked, it implies that each process is holding one resource and is waiting for one more. Since there are 3 processes and 4 resources, one process must be able to obtain two resources. This process requires no more resources and therefore it will return its resources when done. Hence,Option(A)deadlock can never occur. LeenSharma answered Jul 4, 2016 • selected Jul 4, 2016 by ManojK LeenSharma comment Share Follow 0 reply Please log in or register to add a comment.
4 4 votes Deadlock can never occur Sankha Narayan Bose answered Jul 4, 2016 Sankha Narayan Bose comment Share Follow See all 3 Comments 3 3 Comments reply rj123 commented Jul 4, 2016 reply Follow flag ,deadlock May occur will be the answer. Let's say all process gets 1 resource each. Now there is a situation as to who out of three process will get the last resource to get their 2 process. –1 –1 replyShare asu commented Jul 4, 2016 reply Follow flag the remaining one process can be give to any one process.. so there is no waiting of process...see here p1 1 p2 1 p3 1 now 1 process can be given to any one of (p 1,p2,p3) then no deadlock 0 0 replyShare rj123 commented Jul 5, 2016 reply Follow flag still there is contention as to who will get that resource 0 0 replyShare Please log in or register to add a comment.
4 4 votes To make a system deadlock free, assign each process with one less then their max need. After doing so if we are left with one or more resources then there is no deadlock. Assign 1 resource (max need -1) to each process. allocated resources=1+1+1=3 we are still left with 1 resource to avoid deadlock. so deadlock can never occur. Answer (A) srivivek95 answered Jul 23, 2016 srivivek95 comment Share Follow 0 reply Please log in or register to add a comment.
2 2 votes 100 % Answer will be (A)... Given 3 processes are there...So what we can do is we can allocate one - one resource to each process.Now 3 resources have been used but still we have one resource available.we can give this one resource to any one process then that process maximum requirement is also fulfilled.then after this process completes.Now these 2 resources have freed so we can use there resources to fulfill the resource requirement of other process.. In this deadlock never happens........... akash.dinkar12 answered Apr 7, 2017 akash.dinkar12 comment Share Follow 0 reply Please log in or register to add a comment.
1 1 vote Deadlock will never happen in such problem. Suppose we hve three problem like P1,P2 and P3 now allocate each one only 1 unit and one unit is remaining nd this remaining can be given to any one to complete its execution and release the resources by which another can use it.So Deadlock will never be happen in such satuation. Paras Nath answered Sep 24, 2016 Paras Nath comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes Here Answer should be B. Suppose, P1 and P2 both consume 2 resources each then Dealock can occur. Hence, we cant say deadlock never occur. cse7 answered Nov 21, 2016 cse7 comment Share Follow 0 reply Please log in or register to add a comment.