Transaction and Concurrency Control - DPP 01
Transaction and Concurrency Control - DPP 01
Answer Key
Q1 24 Q6 B
Q2 1260 Q7 A
Q3 C Q8 C
Q4 6 Q9 B,D
Q5 B Q10 C,D
Q2 Text Solution:
9!
No of concurrent schedules = = 1260
4! 3! 2!
Q3 Text Solution:
W1 (B) → R2 (B)
Uncommited dirty read by T2
So, T2 rollbacks.
W2 (C) → R3 (C)
Uncommited dirty read by T3
So, T3 roll backs. Same set of transactions,
Same precedence graph,
Q4 Text Solution:
But not conflict equivalent, as one can not be
W1 (B) → R2 (B)
converted into another.
Uncommited dirty read by T2 Hence, statement II is incorrect.
Before this W1 (A) and W2 (B) can be ordered
Q6 Text Solution:
in 2 ways. In option B we have W3(B) → R2(B), so T2 is
Now for remaining part there are 3
doing uncommitted dirty read operation and
possibilities :
thus it should commit after T3.
W1 (B) R1 (C) C1
Q7 Text Solution:
(i) W1 (B) R2(B) C2 R1 (c) C1 (a)
2×3=6
(c)
(d)
Q8 Text Solution:
Q9 Text Solution:
Cycle
Not conflict serializable
Initial read
B: T2
Updated read
T2 → T 1
T2 → T 3 (c) W2 (A) → W1 (A)
Final write (d) R3 (C) → W2 (C)
B : T3