# CSE444

You should be able to do all of the following problems for the final exam. So, you can use this as a study guide to test your understanding of transaction processing.

To Turn In: Select 3 of the 8 problems to write up and turn in for the final homework.

Due: Wednesday, December 10

1. Find all conflicts in the following schedule:
2. S: r2(X); r1(X); w1(X); r1(Y); w2(X); c2; w1(Y); c1;

3. In the following schedule, tell which transactions read from other transactions:
4. S: r1(X); r2(Y); w1(X); r3(X); w2(Y); c2; w3(X); c3; r1(Y); w1(Y); c1;

Is this schedule recoverable?

5. Are the following 2 schedules conflict equivalent?
6. S1: r1(X); r2(Y); w2(Y); r1(Y); w1(X); w1(Y); r2(X); w2(X); c2; c1;

S2: r2(Y); r3(Z); w3(Z); w2(Y); r1(X); w1(X); r1(Y); w1(Y); r2(X); w2(X); c2; c1; c3;

7. Is this schedule conflict serializable?
8. S: r1(X); r2(Y); w1(X); r3(X); w2(Y); c2; w3(X); c3; r1(Y); w1(Y); c1;

9. Does the following schedule follow the 2 phase locking protocol?
10.  T1 T2 Read_lock(Y) Read_item(Y) Unlock(Y) Read_lock(X) Write_lock(Y) Y = Y + X Write_item(Y) Unlock(Y) Unlock(X) Write_lock(X) Read_item(X) X = X * Y Write_item(X) Unlock(X)

11. Give an example of a schedule with a deadlock.
12.

13. Give an example of a schedule in which the basic Timestamp ordering algorithm would cause a transaction to abort.
14. Given a schedule with locks, what technique would you use to detect deadlocks?