edited by
34,888 views
49 votes
49 votes

A system has $6$ identical resources and $N$ processes competing for them. Each process can request at most $2$ requests. Which one of the following values of $N$ could lead to a deadlock?

  1. $1$
  2. $2$
  3. $3$
  4. $4$
edited by

10 Answers

Best answer
50 votes
50 votes
$3 \times 2 = 6$
$4 \times 2 = 8$

I guess a question can't get easier than this- (D) choice. (Also, we can simply take the greatest value among choice for this question)

[There are $6$ resources and all of them must be in use for deadlock. If the system has no other resource dependence, $N=4$ cannot lead to a deadlock. But if $N=4$, the system can be in deadlock in presence of other dependencies.

Why $N=3$ cannot cause deadlock? It can cause deadlock, only if the system is already in deadlock and so the deadlock is independent of the considered resource. Till $N=3,$ all requests for considered resource will always be satisfied and hence there won't be a waiting and hence no deadlock with respect to the considered resource. ]
edited by
8 votes
8 votes
I thinks the question was quite incomplete to answer..  What I mean to say that anybody can introduce their own policy to answer this question..
8 votes
8 votes
for this type of question always allocate (max_need-1)resource to each process and keep 1 extra resource , allocating that extra resource to any process , the process can execute and all its resources will be available. so in this particular Question max need is 2, allocate (2-1)=1 to each process and u need 1 extra resource, so actually u can support 5 process with 6 resource. as the highest number of process is 4 go for D.

actually min no. of resource required to guarantee deadlock free condition = (sum of all (max_need -1))+1
Answer:

Related questions

7.5k
views
3 answers
30 votes
go_editor asked Feb 12, 2015
7,471 views
Consider $6$ memory partitions of sizes $200$ $\text{KB}$, $400$ $\text{KB}$, $600$ $\text{KB}$, $500$ $\text{KB}$, $300$ $\text{KB}$and $250$ $\text{KB}$, where $\text{K...
22.0k
views
5 answers
56 votes
go_editor asked Feb 12, 2015
21,995 views
A computer system implements a $40\;\text{-bit}$ virtual address, page size of $8\;\text{kilobytes}$, and a $128\text{-entry}$ translation look-aside buffer $\text{(TLB)}...
14.9k
views
4 answers
48 votes
go_editor asked Feb 13, 2015
14,932 views
In a connected graph, a bridge is an edge whose removal disconnects the graph. Which one of the following statements is true?A tree has no bridgesA bridge cannot be part ...
17.2k
views
3 answers
58 votes
go_editor asked Feb 12, 2015
17,212 views
Consider a processor with byte-addressable memory. Assume that all registers, including program counter (PC) and Program Status Word (PSW), are size of two bytes. A stack...