Question 3: (20 points) Sequence S1 : T1:R(X), T2:W(X), T2:W(Y), T3:W(Y), T1:W(Y
ID: 3869441 • Letter: Q
Question
Question 3: (20 points)
Sequence S1: T1:R(X), T2:W(X), T2:W(Y), T3:W(Y), T1:W(Y), T1:Commit, T2:Commit, T3:Commit
Sequence S2: T1:R(X), T2:W(Y), T2:W(X), T3:W(Y), T1:W(Y), T1:Commit, T2:Commit, T3:Commit
For each sequence and for each of the following concurrency control mechanisms, describe how the concurrency control mechanism handles the sequence.
Assume that the timestamp of transaction Ti is i. For lock-based concurrency control mechanisms, add lock and unlock requests to the previous sequence of actions as per the locking protocol. The DBMS processes actions in the order shown. If a transaction is blocked, assume that all its actions are queued until it is resumed; the DBMS continues with the next action (according to the listed sequence) of an unblocked transaction.
1. Strict 2PL with timestamps used for deadlock prevention (using Wait-Die policy).
2. Strict 2PL with deadlock detection. (Show the waits-for graph in case of deadlock.)
3. Optimistic concurrency control.
4. Timestamp concurrency control with buffering of reads and writes (to ensure recoverability) and the Thomas Write Rule.
5. Multiversion timestamp concurrency control.
Question 4: (16 points) Briefly answer the following questions:
1. What are the properties required of LSNs?
2. What are the fields in an update log record? Explain the use of each field.
3. What are redoable log records?
4. What are the differences between update log records and CLRs?
Explanation / Answer
1. What are the properties required of LSNs?
2. What are the fields in an update log record? Explain the use of each field.
3. What are redoable log records?
To REDO an action
4. What are the differences between update log records and CLRs?
CLR log record (Compensation Log Record)
Update log record
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.