159k views
1 vote
Consider the following classes of schedules: serializable, conflict-serializable, view-serializable, recoverable, avoids-cascading-aborts, and strict. For each of the following schedules, state which of the preceding classes it belongs to. If you cannot decide whether a schedule belongs in a certain class based on the listed actions, explain briefly.

The actions are listed in the order they are scheduled and prefixed with the transaction name. If a commit or abort is not shown, the schedule is incomplete; assume that abort or commit must follow all the listed actions.

1. T1: R(X), T2: R(X), T1: W(X), T2: W(X)
2. T1: W(X), T2: R(Y), T1: R(Y), T2: R(X)
3. T1: R(X), T2: R(Y), T3: W(X), T2: R(X), T1: R(Y)
4. T1: R(X), T1: R(Y), T1: W(X), T2: R(Y), T3: W(Y), T1: W(X), T2: R(Y)
5. T1: R(X), T2: W(X), T1: W(X), T2: Abort, T1: Commit
6. T1: R(X), T2: W(X), T1: W(X), T2: Commit, T1: Commit
7. T1: W(X), T2: R(X), T1: W(X), T2: Abort, T1: Commit
8. T1: W(X), T2: R(X), T1: W(X), T2: Commit, T1: Commit
9. T1: W(X), T2: R(X), T1: W(X), T2: Commit, T1: Abort
10. T2: R(X), T3: W(X), T3: Commit, T1: W(Y), T1: Commit, T2: R(Y), T2: W(Z), T2: Commit
11. T1: R(X), T2: W(X), T2: Commit, T1: W(X), T1: Commit, T3: R(X), T3: Commit
12. T1: R(X), T2: W(X), T1: W(X), T3: R(X), T1: Commit, T2: Commit, T3: Commit

1 Answer

5 votes

Final answer:

Explanation of which class each schedule belongs to.

Step-by-step explanation:

1. T1: R(X), T2: R(X), T1: W(X), T2: W(X) - This schedule belongs to the serializable class, as it has a conflict of two write actions on the same data item.

2. T1: W(X), T2: R(Y), T1: R(Y), T2: R(X) - This schedule belongs to the view-serializable class, as it produces the same result as the serial schedule T1: W(X), T2: R(Y), T1: R(Y), T2: R(X).

3. T1: R(X), T2: R(Y), T3: W(X), T2: R(X), T1: R(Y) - This schedule belongs to the recoverable class, as it avoids cascading aborts.

4. T1: R(X), T1: R(Y), T1: W(X), T2: R(Y), T3: W(Y), T1: W(X), T2: R(Y) - This schedule belongs to the avoid-cascading-aborts class, as it avoids cascading aborts.

5. T1: R(X), T2: W(X), T1: W(X), T2: Abort, T1: Commit - This schedule belongs to the strict class, as it has strict 2PL property.

6. T1: R(X), T2: W(X), T1: W(X), T2: Commit, T1: Commit - This schedule belongs to the strict class, as it has strict 2PL property.

7. T1: W(X), T2: R(X), T1: W(X), T2: Abort, T1: Commit - This schedule belongs to the strict class, as it has strict 2PL property.

8. T1: W(X), T2: R(X), T1: W(X), T2: Commit, T1: Commit - This schedule belongs to the strict class, as it has strict 2PL property.

9. T1: W(X), T2: R(X), T1: W(X), T2: Commit, T1: Abort - This schedule belongs to the recoverable class, as it avoids cascading aborts.

10. T2: R(X), T3: W(X), T3: Commit, T1: W(Y), T1: Commit, T2: R(Y), T2: W(Z), T2: Commit - This schedule belongs to the serializable class, as it has a conflict of two write actions on the same data item.

11. T1: R(X), T2: W(X), T2: Commit, T1: W(X), T1: Commit, T3: R(X), T3: Commit - This schedule belongs to the view-serializable class, as it produces the same result as the serial schedule T1: R(X), T2: W(X), T1: W(X), T2: Commit, T1: Commit, T3: R(X), T3: Commit.

12. T1: R(X), T2: W(X), T1: W(X), T3: R(X), T1: Commit, T2: Commit, T3: Commit - This schedule belongs to the serializable class, as it has a conflict of two write actions on the same data item.

User Separius
by
9.1k points