Date: Sun, 13 Jun 2004 22:42:58 +1000
This is a question out of Database System Concepts by Silberchatz.
Consider the following two transactions, T1 and T2
if A=1 then B:=B-1
if B=1 then A:=A-1
Initial values are A=B=1 and the consistency condition is (A=1) OR (B=1)
The question: is there a concurrent execution of T1 and T2 that produces a serializable schedule? Prove your answer.
Now to me this is confusing ... you'd only have to ensure the T1 reads(A) before T2 writes(A) or T2 reads(B) before T2 writes(B). No other operations seem to conflict. What's the answer to this?
David Received on Sun Jun 13 2004 - 14:42:58 CEST