edited
13,501 views
22 votes
22 votes
A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is _________.
edited

5 Answers

Best answer
28 votes
28 votes
Up to, $6$ resources, there can be a case that all process have $2$ each and dead lock can occur. With $7$ resources, at least one process's need is satisfied and hence it must go ahead and finish and release all $3$ resources it held. So, no dead lock is possible.
selected by
35 votes
35 votes
For these type of problems in which every process is making same number of requests, use the formula    

$$n.(m-1)+1\leq r$$
where,
$n= \text{ no. of processes}$
$m=\text{resource requests made by processes}$
$r=\text{no. of  resources}$

So, in above problem we get $3.(3-1)+1\leq r \implies   r \geq 7$

 Minimum number of resource required to avoid deadlock is $7.$
9 votes
9 votes

Max number of resourses by which deadlock happen

P1=2

P2=2

P3=2

So Max=6 deadlock will occur

therefore minimum number of resourses by which deadlock not happen=6+1>=7

2 votes
2 votes
If 6 resources are there then it may be possible that all three process have 2 resources and waiting for 1 more resource. Therefore, all of them will have to wait indefinitely. If 7 resources are there, then atleast one must have 3 resources so deadlock can never occur.
Answer:

Related questions

54 votes
54 votes
5 answers
1
go_editor asked Sep 28, 2014
13,567 views
The length of the shortest string NOT in the language (over $\Sigma = \{a, b\})$ of the following regular expression is _______.$$a^*b^*(ba)^*a^*$$
31 votes
31 votes
5 answers
2
go_editor asked Sep 28, 2014
10,824 views
If $\int \limits_0^{2 \pi} |x \: \sin x| dx=k\pi$, then the value of $k$ is equal to ______.