Professional Documents
Culture Documents
2. Check the following schedule S for Conflict serializability and give the serial equivalent
schedule in case it is a conflict serializable one.
a. S: r1(A); r2(A); r3(A); w1(A); r2(C); r2(B); w2(B); w1(C);
b. S: r1(A); r2(A); r3(A); w1(A); r2(C); r2(B); w2(B); w1(C); w2(A)
3. Discuss the different deadlock prevention, detection and recovery schemes of lock based
concurrency control with suitable examples for each technique. Also state the advantages
and disadvantages for each procedure to handle deadlock.
4. Convert the given transactions T1 and T2 or their concurrent execution using strict two
phase locking and comment on occurrence of a schedule with deadlock from the modified
transactions.
T1: T2:
read(A) read(B)
if (A > 50) B = B+20
A = A-50 write(B)
write(A) read(A)
read(B) A = A-20
B = B +50 write(A)
write(B)
end
5. Check whether the following partial schedule is valid under timestamp ordering protocol
with and without Thomas write rule. Assume initial timestamps of data items to be 0.
S: r3(A); r2(A); r1(B); w1(A); r2(C); r2(B); w2(B); w1(C); r1(A); c1; c2; c3