Skip to main content

Transactions and Concurrency

Deadlock Handling

0:00
LearnStep 1/2

Deadlocks in DBMS

Deadlocks in Database Systems

Deadlock Example

Handling Strategies

1. Detection and Recovery

2. Prevention (Timestamps)

Wait-Die: Older waits, younger aborts

Wound-Wait: Older preempts, younger waits

3. Timeout

sql

Victim Selection Criteria

  • Amount of work done (rollback cost)
  • Time remaining to complete
  • Number of locks held
  • Priority