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

Discussion

A computer has six tape drives, with n processes competing for them. Each process may need two drives. What is the maximum value of n for the system to be deadlock free ?

  • A.6
  • B.5
  • C.4
  • D.3

Answer: B

The maximum value of n is 5.

Deadlock is possible only if every process holds one drive and waits for a second with none left. If n processes each hold one drive and at least one drive is still free, some process can finish and release its drives. So the system is deadlock-free when

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

With 6 processes each could hold one drive and wait forever, so 6 is too many; 4 and 3 are safe but not the maximum.

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

Post your comment

Please log in or register to post a comment.