506 views
0 votes
0 votes
The four conditions (mutual exclusion, hold and wait, no preemption and circular wait) are necessary for a resource deadlock to occur. Give an example to show that these conditions are not sufficient for a resource deadlock to occur. When are these conditions sufficient for a resource deadock to occur?

1 Answer

1 votes
1 votes

All four conditions are satisfied. But P2 completes execution P1 can get R3. Circular wait is gone. Further after P4 finish execution P3 can get R2, and hence all request are completed.

Image source: https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/7_Deadlocks.html

Related questions

0 votes
0 votes
0 answers
2
admin asked Oct 28, 2019
147 views
In Fig. 6-1 the resources are returned in the reverse order of their acquisition. Would giving them back in the other order be just as good?