database - DBS-2 phase locking -


does know, why these transactions t1 , t2 don't folow two-locking phase ? (it said because unlock(y) followed write_lock(x) in transaction t1 , same in t2 , why doesn't follow 2 phase locking, don't understand, explain me? )

thank you

t1

read_lock(y ); read_item(y ); unlock(y ); write_lock(x ); read_item(x ); x := x + y; write_item(x ); unlock(x );` 

t2

read_lock(x ); read_item(x ); unlock(x ); write_lock(y ); read_item(y ); y := x + y; write_item(y ); unlock(y ); 


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -