[prev] 21 [next]

Deadlock (cont)

Handling deadlock involves forcing a transaction to "back off".
  • select process to "back off"
    • choose on basis of how far transaction has progressed, # locks held, ...
  • roll back the selected process
    • how far does this it need to be rolled back? (less roll-back is better)
    • worst-case scenario: abort one transaction
  • prevent starvation
    • need methods to ensure that same transaction isn't always chosen