Deadlock
Deadlock occurs when two transactions are waiting
for a lock on an item held by the other.
Example:
T1: Lw(A) R(A) Lw(B) ......
T2: Lw(B) R(B) Lw(A) .....
|
How to deal with deadlock?
- prevent it happening in the first place
- let it happen, detect it, recover from it
|