edited by
662 views
1 votes
1 votes

A computer system has $6$ tape drives with n process competing for them. Each process may need up-to $2$ tape drives. The maximum value of n from which the system is guaranteed to be deadlock free is:

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

1 Answer

Best answer
1 votes
1 votes
Suppose at any instance, all 4 processes are holding 1 tape drive each as follows
       Hold   Need   Available
P1      1       1         2
P2      1       1
P3      1       1
P4      1       1
$$\begin{array}{|c|c|c|} \hline & \text{Hold} & \text{Need} & \text{Available} \\ \hline P1 & 1 & 1 & 2  \\ \hline P2 & 1 & 1 &  \\ \hline P3 & 1 & 1 & \\ \hline P4 & 1 & 1 &\\ \hline  \end{array}$$
The two tape drives can be allocated to P1, which will finish execution and gives its drives back to available pool, so that the other processes will get access to tapes. Any execution sequence will lead to safe state here. The system with 4 processes ensures dead-lock free environment .
selected by
Answer:

Related questions

2 votes
2 votes
1 answer
1
Bikram asked Dec 26, 2016
281 views
Consider the following 3 processes with 3 binary semaphores with initial values $S_{0}=0, S_{1}=0, S_{2}=1$$$ \begin{array}{|c|c|c|} \hline \textbf{P} & \textbf{Q} & \tex...
2 votes
2 votes
3 answers
2
Bikram asked Dec 26, 2016
1,111 views
In a paged memory, the page hit ratio is $0.35$. The time required to service the page fault is $100$ ns. Time required to access a page in primary memory is $10$ ns.The ...
1 votes
1 votes
1 answer
4
Bikram asked Dec 26, 2016
215 views
A counting semaphore is initialized to $10$. The $6$ P(wait) operations and $4$ V(signal) operations were completed in this semaphore. The resulting value of semaphore is...