5. Show that the two-phase locking protocol ensures conflict serializability,and that transactions can be serialized according to their lock points. Answer



Download 447.03 Kb.
View original pdf
Page6/13
Date08.04.2022
Size447.03 Kb.
#58573
1   2   3   4   5   6   7   8   9   ...   13
nanopdf.com 151-show-that-the-two-phase-locking-protocol-ensures-conflict
Answer: TO BE SOLVED
15.17 Devise a timestamp-based protocol that avoids the phantom phenomenon.
Answer: In the text, we considered two approaches to dealing with the phantom phenomenon bymeans of locking. The coarser granularity approach obviously works for timestamps as well. The B+-tree index based approach can be adapted to timestamping by treating index buckets as data items with timestamps associated with them, and requiring that all read accesses use an index. We now show that this simple method works. Suppose a transaction Ti
wants to access all tuples with a particular range of search-key values, using a B+- tree index on that search-key. Ti will need to read all the buckets in that index which have key values in that range. It can be seen that any delete or insert of a tuple with a key-value in the same range will need to write one of the index buckets read by Ti. Thus the logical conflict is converted to a conflict on an index bucket, and the phantom phenomenon is avoided.
15.18 Suppose that we use the tree protocol of Section 15.1.5 to manage concurrent access to a B+-tree. Since a split may occur on an insert that affects the root, it appears that an insert operation cannot release any locks until it has completed the entire operation. Under what circumstances is it possible to release a lock earlier

Download 447.03 Kb.

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




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

    Main page