growing phase (acquire locks without releasing locks)
2pl basic 2
shrink phase (release locks without acquiring locks)
acquire all locks before execution begins (dead lock free)
release write locks only after commit/abort
release read and write locks only after commit/abort
2pl ordering all the items
order all the items needed and lock them according to that order (not practical)
deadlock prevention protocols with timestamp
wait-die and wound-wait
deadlock prevention protocols without timestamp
no waiting and cautious waiting
Can I lock an item? If not, am I older than the transaction holding that item? If so, I must die Otherwise I will wait
Can I lock an item? If not, am I older than the transaction holding that item? If so, I must kill you and continue.
I just abort myself and retry
is intelligent. I requested an item. Item is engaged in something else. I look at that item and see what transaction has it. If that transaction waiting, I abort and retry. If that transaction not waiting, I wait.
Any schedule that follows 2 phase locking is guaranteed to be ....