Consider a relaxation of two-phase locks in which read only transactions can release read locks early. Would a read only transaction have consistent retrievals? Would the objects become inconsistent? Illustrate your answer with the following transactions T and U at the server

T: x = read (i); y= read(j);

U: write(i, 55);write(j, 66);

in which initial values of ai and aj are 10 and 20.

There is no guarantee of consistent retrievals because overlapping transactions can alter the objects after they are unlocked.

The database does not become inconsistent.





In the above example T is read only and conflicts with U in access to ai and aj. ai is accessed by T before U and aj by U before T. The interleavings are not serially equivalent. The values observed by T are x=10, y= 66, and the values of the objects at the end are ai=55, aj= 66.



Serial executions give either (T before U) x=10, y=20, ai=55, aj=66; or (U before T) x=55, y=66, ai=55, aj=66). This confirms that retrievals are inconsistent but that the database does not become inconsistent.

Computer Science & Information Technology

You might also like to view...

Windows 7 allows for multiple gadgets to be on the desktop at the same time

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following is the online storage system affiliated with Microsoft?

A. iCloud B. Chrome C. OneDrive D. iOS

Computer Science & Information Technology