Discussion
An operating system contains 3 user processes each requiring 2 unit of resources 'R'. The minimum number of units of 'r' such that no deadlocks will ever arise is :
Answer: C
The minimum is 4 units.
With n processes each needing at most k units, deadlock is impossible if there are at least \(n(k - 1) + 1\) units. In the worst case each process holds k - 1 units and waits for one more; one extra unit lets one process finish and release its resources.
\[ 3(2 - 1) + 1 = 4 \]
With 3 units, each process can hold one and wait forever for a second, which is a deadlock. Five or six units also avoid deadlock but are not the minimum.
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