{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

K 1 let t i q s then t i 1 t i 1 q x as m 2 k 4 i 1

Info iconThis preview shows pages 4–7. Sign up to view the full content.

View Full Document Right Arrow Icon
k > 1: Let T i Q S , then { T i 1 , T i + 1 } Q X . As, m 2 k 4, i 1 negationslash= i + 1 (modulo m ). By the assumption of the given protocol’s definition, L ( T i 1 ) intersectiontext L ( T i + 1 ) negationslash= H9278 Thus, T i 1 T i + 1 or T i + 1 T i 1 ; in either case, the original cycle was not minimal (in the first case, T i can be deleted from the cycle, in the second case there is a cycle involving T i i , T i and T i + 1 . By contradiction, there can be no such cycle, and thus the new protocol ensures serializability.
Background image of page 4

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

View Full Document Right Arrow Icon
Practice Exercises 5 To show deadlock freedom, consider the waits for graph. If there is any edge from an update transaction T j to another update transaction T i , it is easy to see that T i locks the root before T j . Similarly if there is an edge from an update txn T j to any readonly transaction T k , which in turn can only wait for an update transaction T i , it can be seen that T i must have locked the root before T j . In other words, an older update transaction cannot wait (directly or indirectly) on a younger update transaction, and thus, there can be no cycle in the waits for graph. 15.7 Answer: The proof is in Kedem and Silberschatz, Controlling Concurrency Using Locking Protocols, Proc. Annual IEEE Symposium on Foundations of Computer Science, 1979. The proof is quite non-trivial, and you may skip the details if you wish. Consider, G ( V , A ) : the directed acyclic graph of the data items. T 0 , T 1 , T 2 , ....... , T m are the participating transactions. E ( T i ) is the first vertex locked by transaction T i . H9257 : V { 1,2,3, .... } such that for each u ,w V if < u ,w > A then H9257 ( u ) < H9257 ( w ) F ( T i , T j ) is that v L ( T i ) intersectiontext L ( T j ) for which H9257 ( v ) is minimal For each e V , define a relation H9275 e T × T such that T i H9275 e T j for e L ( T i ) intersectiontext L ( T j ) iff T i successfully locked e and T j either never (successfully) locked e or locked e , only after T i unlocked it. Define also, T i H9275 T j = ∃ e [ T i H9275 e T j ] a. Lemma 1 We first show that, for the given protocol, If L ( T i ) intersectiontext L ( T j ) negationslash= H9278 then F ( T i , T j ) ∈ { E ( T i ) , E ( T j ) } Assume by contradiction that, F ( T i , T j ) / ∈ { E ( T i ) , E ( T j ) } But then, by the locking protocol (as both T i and T j ) had to lock more than half of the predecessors of F ( T i , T j ) ), it follows that some predecessor of F ( T i , T j ) is in L ( T i ) intersectiontext L ( T j ) contradicting the definition of F ( T i , T j ). b. Lemma 2 Now we show that, T i H9275 u T j for all u L ( T i ) intersectiontext L ( T j ) iff T i H9275 F ( T i , T j ) T j . If u = F ( T i , T j ) then T i H9275 F ( T i , T j ) T j . is trivially true. If u negationslash= F ( T i , T j ), then u / ∈ { E ( T i ) , E ( T j ) } . It thus follows that some predecessor of w of u was successfully locked by both T i and T j and this u was
Background image of page 5
6 Chapter 15 Concurrency Control locked by T i and T j when they issued the instructions to lock u .
Background image of page 6

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

View Full Document Right Arrow Icon
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}