Discussion
Consider a system with seven processes A through G and six resources R through W. Resource ownership is as follows :
Process A holds R and wants T
Process B holds nothing but wants T
Process C holds nothing but wants S
Process D holds U and wants S and T
Process E holds T and wants V
Process F holds W and wants S
Process G holds V and wants U
Are there any processes deadlocked ?
Answer: C
Yes, D, E and G are deadlocked.
Follow who waits for whom. D holds U and wants T; T is held by E. E wants V, held by G. G wants U, held by D. This gives the cycle D, E, G, D, and since each resource has a single instance, the three are deadlocked.
A and B also want T, so they are blocked waiting for E, but they are not part of the cycle. C and F want S, which nobody holds, so they can proceed. So the processes involved in the deadlock are D, E and G, which rules out 'no process' and the sets containing A, B, C or F.
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