Show that the two-phase locking protocol ensures conflict serializability,and



Download 98.23 Kb.
Page9/10
Date23.11.2021
Size98.23 Kb.
1   2   3   4   5   6   7   8   9   10

Answer:




    1. Outline the key similarities and differences between the timestamp based implementation of the first committer-wins version of snapshot isolation, described in Exercise 15.19, and the optimistic-concurrency-controlwithout- read-validation scheme, described in Section 15.9.3



Answer:




    1. Explain the phantom phenomenon. Why may this phenomenon lead to an incorrect concurrent execution despite the use of the two-phase locking protocol?


Answer: The phantom phenomenon arises when, due to an insertion or deletion, two transactions logically conflict despite not locking any data items in common. The insertion case is described in the book. Deletion can also lead to this phenomenon. Suppose Ti deletes a tuple from a relation while Tj scans the relation. If Ti deletes the tuple and then Tj reads the relation, Ti should be serialized before Tj . Yet there is no tuple that both Ti and Tj conflict on. An interpretation of 2PL as just locking the accessed tuples in a relation is incorrect.

There is also an index or a relation data that has information about the tuples in the relation. This information is read by any transaction that scans the relation, and modified by transactions that update, or insert into, or delete from the relation. Hence locking must also be performed on the index or relation data, and this will avoid the phantom phenomenon.




    1. Explain the reason for the use of degree-two consistency.What disadvantages does this approach have?




Download 98.23 Kb.

Share with your friends:
1   2   3   4   5   6   7   8   9   10




The database is protected by copyright ©ininet.org 2020
send message

    Main page