Deadlock Prevention
Never grant a lock that can lead to deadlock
Often advocated in operating systems
Useless for TP, because it would require running transactions serially.
- Example to prevent the previous deadlock,rl1[x] rl2[y] wl2[x] wl1[y], the system can’t grant rl2[y]
Avoiding deadlock by resource ordering is unusable in general, since it overly constrains applications.
- But may help for certain high frequency deadlocks
Setting all locks when txn begins requires too much advance knowledge and reduces concurrency.