CS3402 Database Systems Tutorials
CS3402 Concurrency Control:
Question 1
Consider the following arrival order of operations to the scheduler. If the scheduler uses strict two phase locking to schedule the operations, modify the table below to show the new schedule.
Ta
Tb
Tc
Write(x)
Read(y)
Read(z)
Read(x)
Write(y)
Write(x)
Read(x)
Commit
Write(z)
Commit
Commit
Question 2
Consider the following schedule at a single server system.
(1) Add lock and unlock operations to the schedule if Conservative 2PL is adopted. (2) Add lock and unlock operations to the schedule if Strict 2PL is adopted.
(3) Which one (S2PL or C2PL) will you choose for scheduling the two transactions?
Question 3
The following table shows the schedule for transactions T1 and T2 with T1 having an ¡°older¡± time-stamp than T2.
(1) Assume that Strict Two Phase Locking is used for concurrency control. Define the wait- for-graph.
(2) Show the new schedule if the wait-die method is used.
(3) Show the new schedule if the wound-wait method is used.
T1
T2
Read(a)
Read(a)
Write(a)
Write(a)
T1
T2
Read(a)
Read(b)
Write(b)
Write(a)