Data Structure Questions Worksheet
Data Structure Questions Worksheet
read_item(X);
X:= X+M;
if X > 90 then exit
else write_item(X);
Answer:
Answer:
Let there be three transactions T1, T2, and T3.
They are executed concurrently and produce
a schedule S.
3
IS 335 TUTORIAL-3
operation. Thus this serializable schedule is equivalent to r2(X);
r3(X); w3(X); r1(X); w1(X) serial schedule.
T3 T1 T2
5
IS 335 TUTORIAL-3
Schedule S2:
It is not a serializable schedule because
• T2 reads Y (r2(Y)), which is then read and modified by T3
(w3(Y))
• T3 reads Y (r3(Y)), which then modified before T2 modifies Y
(w2(Y)).
T1 z T2
Y Y
T3