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 ?
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.
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