in Operating System retagged by
1,147 views
0 votes
0 votes

A system has $3$ processes sharing $4$ resources. If each process needs a maximum of $2$ units then, deadlock

  1. Can never occur
  2. Has to occur
  3. May occur
  4. None of the options 
in Operating System retagged by
by
1.1k views

2 Comments

lets take worst case .

each need 2 resource = then assign 1,1,1 then 1 is left give it to any one , so atleast one process is always run. hence no deadlock.

A
1
1
0
0

3 Answers

1 vote
1 vote

(A) Can never occur   

0 votes
0 votes
Min requirement of all processes is 3x1 + 1=4 which is not exceeding the available number of resources, which is 4 in the system, and therefore satisfies the necessary & condition for deadlock-free execution, hence option A is right
0 votes
0 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.

Answer:

Related questions