Thus t i h9275 w t j t i h9275 u t j and t j h9275 w

Info icon This preview shows pages 6–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Thus, T i H9275 w T j T i H9275 u T j (and T j H9275 w T i T j H9275 u T i ). Now by induction: T i H9275 F ( T i , T j ) T j T i H9275 w T j and the result follows. Now, we prove thatthe given protocolensures serializabilityanddeadlock freedom by induction on the length of minimal cycle. a. m = 2 : The protocol ensures no minimal cycles as shown in the above Lemma 2 b. m > 2 : Assume by contradiction that T 0 H9275 T 1 H9275 T 2 ...... H9275 T m 1 H9275 T 0 is a minimal cycle of length m . We will con- sider two cases: i. F ( T i , T i + 1 )’s are not all distinct. It follows that, L ( T i ) intersectiontext L ( T j ) intersectiontext L ( T k ) negationslash= H9278 for 0 i j k m 1 A. Assume < i , j , k > = < i , i + 1 , i + 2 > . Then it easily follows that T i H9275 T i + 2 and (*) is not a minimal cycle. B. Assume < i , j , k > negationslash= < i , i + 1 , i + 2 > . If say | j i | > 1 then as either T i H9275 T j or T j H9275 T i and (*) is not a minimal cycle. If | j i | = 1 and | k j | > 1 then the proof is analogous.. ii. All F ( T i , T i + 1 )’s are distinct. Then for some i H9257 ( F ( T i , T i + 1 )) < H9257 ( F ( T i + 1 , T i + 2 )) (**) and H9257 ( F ( T i + 1 , T i + 2 )) > H9257 ( F ( T i + 2 , T i + 3 )) (***) By(**), E ( T i + 1 ) negationslash= F ( T i + 1 , T i + 2 ) andby(***), E ( T i + 2 ) negationslash= F ( T i + 1 , T i + 2 ). Thus, F ( T i + 1 , T i + 2 ) / ∈ { E ( T i + 1 ) , E ( T i + 2 ) } , a contradiction to Lemma 1. We have thus shown that the given protocol ensures serializability and deadlock freedom. 15.8 Answer: The proof is Silberschatz and Kedem, A Family of Locking Protocols for Database Systems that Are Modeled by Directed Graphs , IEEE Trans. on Software Engg. Vol. SE-8, No. 6, Nov 1982. The proof is rather complex; we omit details, which may be found in the above paper.
Image of page 6

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

View Full Document Right Arrow Icon
Practice Exercises 7 15.9 Answer: The access protection mechanism can be usedto implementpage level locking. Consider reads first. A process is allowed to read a page only after it read-locks the page. This is implemented by using mprotect to initially turn off read permissions to all pages, for the process. When the process tries to access an address in a page, a protection violation occurs. The handler associated with protection violation then requests a read lock on the page, and after the lock is acquired, it uses mprotect to allow read access to the page by the process, and finally allows the process to continue. Write access is handled similarly. 15.10 Answer: a. Serializability can be shown by observing that if two transactions have an I mode lock on the same item, the increment operations can be swapped, just like read operations. However, any pair of conflicting operations must be serialized in the order of the lock points of the corresponding transactions, as shown in Exercise 15.1. b. The increment lock mode being compatible with itself allows multi- ple incrementingtransactions to take the locksimultaneouslythereby improving the concurrency of the protocol. In the absence of this mode, an exclusive mode will have to be taken on a data item by each transaction that wants to increment the value of this data item.
Image of page 7
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern