PPT Slide
Interesting that a number of operating systems choose to not bother with deadlock prevention/avoidance/recovery at all! This may explain machine hangs that occur now & then; the cost of any deadlock algorithm far outweighs the frequency of actual deadlocks.
Two-phase locking
- Common database method for record access that avoids deadlock.
- 1st phase = locking phase: process will attempt to lock a record or set of records for update; can only hold these set of locks (thus, no “Hold/Wait”).