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
S: r2(X); r1(X); w1(X); r1(Y); w2(X); c2; w1(Y); c1;
S: r1(X); r2(Y); w1(X); r3(X); w2(Y); c2; w3(X); c3; r1(Y); w1(Y); c1;
Is this schedule recoverable?
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;
S: r1(X); r2(Y); w1(X); r3(X); w2(Y); c2; w3(X); c3; r1(Y); w1(Y); c1;
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) |
|