timestamps

timestamps - Prove your answer by showing the read and...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Operation X Y Z Result R W R W R W R2(Z) Reads R2(Y) Reads W2(Y) Writes R3(Y) Reads R3(Z) Reads R1(X) Reads W1(X) Writes W3(Y) Writes W3(Z) Writes R2(X) Reads R1(Y) REJECT Fill in the timestamps in the above table to show why R1(X) fails. Reject conditions: For Read(X) in Ti: Reject if TS(Ti) < write_TS(X) For Write(X) in Ti: Reject if TS(Ti) < read_TS(X) Assume TS (Ti) = i
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Operation X Y Z Result R W R W R W R2(Z) 2 Reads R2(Y) 2 Reads W2(Y) 2 2 Writes R3(Y) 3 Reads R3(Z) 3 Reads R1(X) 1 Reads W1(X) 1 Writes W3(Y) 3 Writes W3(Z) 3 Writes R2(X) 2 Reads R1(Y) REJECT Reject because 1< write_TS (Y) (equal to 3)
Background image of page 2
R3(Y) R3(Z) R1(X) W1(X) W3(Y) W3(Z) R2(Z) R1(Y) W1(Y) R2(Y) W2(Y) R2(X) W2(X) a) Is the above schedule serializable? If yes (or no), draw a precedence graph to explain your answer. If yes, what is the serialization order? b) If it is serializable, is it accepted by the timestamp protocol?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Prove your answer by showing the read and write timestamps of each variable during transaction execution. c) If it is serializable, is it accepted by the 2PL protocol? Prove your answer by showing where lock and unlock statements should be inserted. T 1 T 2 T 3 &lt; T 1 &lt; T 2 X, Y T 3 Y Y, Z Not allowed in TS (Obvious by serialization order of T3 &lt; T1 &lt; T2) Operation X Y Z R W R W R W R3(Y) 3 R3(Z) 3 R1(X) 1 W1(X) 1 W3(Y) 3 W3(Z) 3 R2(Z) Rejected Accepted by 2PL T1 T2 T3 LX(Y) LX(Z) R(Y) R(Z) LX(X) R(X) W(X) W(Y) W(Z) UN(Y)(unlock) UN(Z)(unlock) LS(Z) R(Z) LX(Y) R(Y) W(Y) UN(Y)(unlock) UN(X)(unlock) LX(Y) R(Y) W(Y) LX(X) R(X) W(X) UN(Y)(unlock) UN(X)(unlock) UN(Z)(unlock)...
View Full Document

This note was uploaded on 02/27/2011 for the course CSE 412 taught by Professor Davulcu,h during the Spring '08 term at ASU.

Page1 / 6

timestamps - Prove your answer by showing the read and...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online