Machine-translated by Google. Questions are authored in English.
Top

Discussion

A computer system has 6 tape drives, with 'n' processes competing for them. Each process may need 3 drives. The maximum value of 'n' for which the system is guaranteed to be deadlock free is

  • A.1
  • B.2
  • C.3
  • D.4

Answer: B

The maximum value of n is 2.

Deadlock is possible only if every process can be holding some drives while waiting for more. In the worst case each process holds one fewer than it needs, 2 drives. The system is guaranteed deadlock-free if, even then, one drive is left to let some process finish:

\[ \begin{aligned} n(3 - 1) + 1 &\le 6 \\ 2n &\le 5,\ n \le 2 \end{aligned} \]

With 3 processes, each could hold 2 drives, using all 6, and all would wait for a third that never comes: a deadlock. With 1 process there is no competition, but 2 is the maximum that is still safe.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.