14,845 views
10 10 votes

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

  1. Deadlock can never occur
  2. Deadlock may occur
  3. Deadlock has to occur
  4. None of these

8 Answers

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.

selected by
4 4 votes
  1. Deadlock can never occur
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)
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...........
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.
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. 

Answer:
Position:
Show:

Related questions

15 15 votes
6 answers 6 answers
13.7k
13.7k views
asu asked Jul 4, 2016
13,663 views
With single resource, deadlock occursif there are more than two processes competing for that resourcesif there are only two processes competing for that resourcesif there...
8 8 votes
3 answers 3 answers
12.5k
12.5k views
Arjun asked Jul 6, 2016
12,487 views
At a particular time of computation the value of a counting semaphore is 7. Then 20 $P$ operations and $x$ $V$ operations were completed on this semaphore. If the new val...
20 20 votes
3 answers 3 answers
12.2k
12.2k views
go_editor asked Jul 6, 2016
12,162 views
For the real time operating system, which of the following is the most suitable scheduling scheme?Round robinFirst come first servePre-emptiveRandom scheduling
5 5 votes
4 answers 4 answers
10.1k
10.1k views
habedo007 asked Jul 5, 2016
10,106 views
Determine the number of page faults when references to pages occur in the following order:1, 2, 4, 5, 2, 1, 2, 4Assume that the main memory can accommodate 3 pages and th...