I am having a problem with one of my exam review question:
For the two transactions:
if A=0 then B=B+1
if B=0 then A=A+1
How can I add locks and unlocks to T1 and T2 so that it will produce a non-serial and deadlock-free schedule...if we follow the two-phase locking protocol?