You are on page 1of 1

VELLORE INSTITUTE OF TECHNOLOGY, VELLORE

SCHOOL OF COMPUTER SCIENCE AND ENGINEERING


CSE2004 DATABASE MANAGEMENT SYSTEMS
FALL 2021-22 SLOT B1 AND B2
DIGITAL ASSIGNMENT 2
Instructions:
1. The answers can be scan of handwritten (preferable) or typed with computer generated
diagrams
2. Submit your own answers

Answer the following questions (5 x 4 = 20)


1. Characterising schedule based on recoverability (non-recoverable, recoverable,
cascadeless, strict) – give the most specific character of the schedule stating the reasons
a. S: w1(Y); r2(X); c2; c1; r3(Y); c3;
b. S: w1(X); r2(X); c2; c1; r3(Y); c3;
c. S: w1(Y); r2(X); c2; w3(Y); c3; c1;

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

You might also like