Question: Does the following transactions follow the 2PL (two Phase Locking) protocol? And explain your answer, if No rewrite the new Transactions after enforcing 2PL protocol?
Does the following transactions follow the 2PL (two Phase Locking) protocol? And explain your answer, if No rewrite the new Transactions after enforcing 2PL protocol?
T1 T2
read_lock (Y); read_lock (X);
read_item (Y); read_item (X);
unlock (Y); unlock (X);
write_lock (X); Write_lock (Y);
read_item (X); read_item (Y);
X:=X+Y; Y:=X+Y;
write_item (X); write_item (Y);
unlock (X); unlock (Y);
Q2 -
(a). What is meant by Roll-back and Roll-Forward?
(b). Discuss the analysis phase and REDO phase?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
