Academia.eduAcademia.edu

EXECUTIONS OF SCHEDULES S, AND S,  with a consistency constraint ‘‘A + B = 100.’’ Consider two transfer transactions: T; = (¢,,(4:= A — 1); ¢,.(B:= B+ 1)) and 7, = (4:(B:= B — 2); b2(A := A + 2)), where the symbol *‘é;;’” denotes step j of transaction i. In addition, consider a different implementation of transaction T), 7} = ((#(B := B — 2); t#(A := 100 — B)). Note that both transactions 7* and T, transfer two units from B to A and preserve the consistency constraint ‘‘A + B = 100’ when executing alone. Suppose that we are first given transactions T, and T,. To enhance the concurrency, one may use a nonserializable scheduling method which schedules these two transactions by associating the ‘‘lock’’ and ‘‘unlock’’ opera- tion pair with each step. That is, T; = (Lock A, t,1, Unlock A; Lock B, t;2, Unlock B), T, = (Lock B, ty, Unlock B; Lock A, t2, Unlock A). Later, suppose that someone modifies the implementation of 7, to 7} but retains the same locking protocol with the intuitive argument that transactions T, and 7* have the same number of steps, use the same commutative ‘‘add’’ and ‘‘subtract’’ operations, and perform the identical computation.  SHA ef al.: CONCURRENCY CONTROL AND FAILURE RECOVERY

Table 1 EXECUTIONS OF SCHEDULES S, AND S, with a consistency constraint ‘‘A + B = 100.’’ Consider two transfer transactions: T; = (¢,,(4:= A — 1); ¢,.(B:= B+ 1)) and 7, = (4:(B:= B — 2); b2(A := A + 2)), where the symbol *‘é;;’” denotes step j of transaction i. In addition, consider a different implementation of transaction T), 7} = ((#(B := B — 2); t#(A := 100 — B)). Note that both transactions 7* and T, transfer two units from B to A and preserve the consistency constraint ‘‘A + B = 100’ when executing alone. Suppose that we are first given transactions T, and T,. To enhance the concurrency, one may use a nonserializable scheduling method which schedules these two transactions by associating the ‘‘lock’’ and ‘‘unlock’’ opera- tion pair with each step. That is, T; = (Lock A, t,1, Unlock A; Lock B, t;2, Unlock B), T, = (Lock B, ty, Unlock B; Lock A, t2, Unlock A). Later, suppose that someone modifies the implementation of 7, to 7} but retains the same locking protocol with the intuitive argument that transactions T, and 7* have the same number of steps, use the same commutative ‘‘add’’ and ‘‘subtract’’ operations, and perform the identical computation. SHA ef al.: CONCURRENCY CONTROL AND FAILURE RECOVERY