• edited
21,017 views
30 30 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 _________.

5 Answers

Best answer
35 35 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
54 54 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.$
13 13 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 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.
2 2 votes
As we know from the resource-request algorithm, which is a variant of Banker's algorithm-

Demand < Number of processes + Number of resources

now, the demand is 3 tape drives for each of the three programs, therefore 9.

let the minimum number of tapedrives or resources be R.

So,

9 < 3 + R

$\therefore$ R > 6. So minimum number of tapedrives should be 7.
Answer:
Position:
Show:

Related questions

9 9 votes
5 answers 5 answers
8.9k
8.9k views
go_editor asked Sep 28, 2014
8,900 views
In the context of modular software design, which one of the following combinations is desirable?High cohesion and high couplingHigh cohesion and low couplingLow cohesion ...
72 72 votes
5 answers 5 answers
23.5k
23.5k views
go_editor asked Sep 28, 2014
23,484 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^*$$
49 49 votes
6 answers 6 answers
18.8k
18.8k views
go_editor asked Sep 28, 2014
18,774 views
If $\int \limits_0^{2 \pi} |x \: \sin x| dx=k\pi$, then the value of $k$ is equal to ______.
75 75 votes
10 answers 10 answers
27.2k
27.2k views
go_editor asked Sep 28, 2014
27,200 views
Consider the following relational schema:employee (empId,empName,empDept) customer (custId,custName,salesRepId,rating) salesRepId is a foreign key referring to empId of t...