Trouble understanding serializability

From: Stevens <>
Date: Sun, 13 Jun 2004 22:42:58 +1000
Message-ID: <40cc4bd3$0$11523$>

This is a question out of Database System Concepts by Silberchatz.

Consider the following two transactions, T1 and T2

T1: read(A)

    if A=1 then B:=B-1

T2: read(B)

    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

Original text of this message