Exercise 17.4 Consider the following sequences of actions, listed in the order they are submitted to the DBMS:
2PL | S-2PL | C-2PL | Opt CC | TS w/o TWR | TS w/ TWR | Multiv. | |
1 | N | N | N | N | N | N | N |
2 | Y | N | N | Y | Y | Y | Y |
3 | N | N | N | Y | N | N | Y |
4 | N | N | N | Y | N | N | Y |
5 | N | N | N | Y | N | Y | Y |
6 | N | N | N | N | N | Y | Y |
7 | N | N | N | Y | N | N | N |
8 | N | N | N | N | N | N | N |
9 | N | N | N | Y | N | N | N |
10 | N | N | N | N | Y | Y | Y |
11 | N | N | N | N | N | Y | N |
12 | N | N | N | N | N | Y | Y |
Table 17.1
■ 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.
2. Strict 2PL with deadlock detection. (Show the waits-for graph in case of deadlock.)
3. Conservative (and Strict, i.e., with locks held until end-of-transaction) 2PL.
4. Optimistic concurrency control.
5. Timestamp concurrency control with buffering of reads and writes (to ensure re-coverability) and the Thomas Write Rule.
6. Multiversion concurrency control.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.