2. What is Deadlock?
• A deadlock is a condition where two or more transactions are waiting
indefinitely for one another to give up locks.
• Can halt the whole system.
Image Courtesy beginnersbook.com
3. Why Deadlock situation arises?
• Edward G. Coffman Jr. stated 4 conditions for deadlock occurrence
• Mutual exclusion
• Holt and Wait
• No preemption
• Circular wait
4. Dealing with Deadlock
There are two principle methods for dealing with deadlock problem:
• Deadlock Prevention
• Deadlock detection and recovery
6. Deadlock Detection:
• No precautions while granting
lock requests
• The lock manager periodically
checks if the wait-for graph has
cycles.
• If the system is deadlocked, the
lock manager chooses a victim
transaction from each cycle.