Question: Assume that objects a1, a2, and a3 are managed by a server. There are two operations provided by the server for operating the objects. read(a)

Assume that objects a1, a2, and a3 are managed by a server. There are two operations provided by the server for operating the objects.

read(a) returns the value of a

write(a, v) assigns v to a

Assume that the following two concurrent transactions T and U are performed on these objects.

T: read(a2); read(a1); write(a2, a2+85); write(a1, a1-32)

U: read(a2); write(a2, a2-34); read(a3); write(a3, a3-77)

Assume that the original values of a1, a2, and a3 are 124, 156, and 133 respectively.

(a) If the interleaving operations from T and U are serially equivalent to T before U, what are the values of a1, a2 and a3 after the two transactions have completed?

(b) For serial equivalence of T before U, give a possible order of interleaving operations from T and U.

(c) If the interleaving operations from T and U are serially equivalent to U before T, what are the values of a1, a2 and a3 after the two transactions have completed? (d) For serial equivalence of U before T, give a possible order of interleaving operations from T and U.

(e) Give an example of interleaving operations from T and U, which are not serially equivalent and cause the lost update problem.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!