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
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.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development