Lock Upgrades
Think about this scenario:
- T1 locks A in S mode, T2 requests X lock on A, T3 requests S lock on A. What should we do?
In contrast:
- T1 locks A in S mode, T2 requests X lock on A, T1 requests X lock on A. What should we do?
Allow such upgrades to supersede lock requests.
- Consider this scenario:
- S1(A), X2(A), X1(A): DEADLOCK!
BTW: Deadlock can occur even w/o upgrades:
- X1(A), X2(B), S1(B), S2(A)