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