COMP9315 Final Exam |
The University of New South Wales COMP9315 DBMS Implementation Final Exam |
DBMS Implementation |
Consider the followng three transactions:
T1: T2: T3: read(X) read(Y) read(X) X = X + 1 Y = Y * 2 read(Y) write(X) read(X) X = X - Y read(Y) X = X + Y Y = Y - 3 Y = Y + 1 write(Y) write(X) write(Y) write(X) write(Y) commit commit commit
Consider also the following concurrent schedule on these three transactions:
T1: R(X) W(X) R(Y) W(Y) C | T2: R(Y) R(X) W(Y) W(X) | system T3: R(X) R(Y) | failure
Note that we have omitted the computation on X and Y from the schedule. You should assume that it occurs somwhere between the read and the write of the relevant variable. The line of | symbols indicates where a system failure occurred.
Making the following assumptions:
answer these questions:
Show all entries written to the log as the transactions progress in the given schedule
(include <start Ti>,
<abort Ti>, and
<commit Ti>, entries
as well as entries for updates)
Show how recovery takes place when the system restarts after the system failure
Instructions: