1510 answer a serializability can be shown by

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

View Full Document Right Arrow Icon
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 con±icting 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- pleincrementingtransactionstotakethelocksimultaneouslythereby 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. An exclusive lock being incompatible with itselF adds to the lock waiting time and obstructs the overall progress oF the concurrent schedule. In general, increasing the true entries in the compatibility matrix increases the concurrency and improves the throughput. The prooF is in Korth, Locking Primitives in a Database System, JACM Vol. 30, 1983. 15.11 Answer: It would make no diFFerence. The write protocol is such that the most recent transaction to write an item is also the one with the largest timestamp to have done so. 15.12 Answer: IF a transaction needs to access a large a set oF items, multiple granularity locking requires Fewer locks, whereas iF only one item needs to be accessed, the single lock granularity system allows this with just one lock. Because all the desired data items are locked and unlocked together in the multiple granularity scheme, the locking overhead is low, but concurrency is also reduced. 15.13 Answer: In the concurrency control scheme oF Section 15.5 choosing Start ( T i ) as the timestamp oF T i gives a subset oF the schedules allowed by choosing Validation ( T i ) as the timestamp. Using Start ( T i ) means that whoever started frst must fnish frst. Clearly transactions could enter the validation phase in the same order in which they began executing,
Background image of page 7

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

View Full Document Right Arrow Icon
8 Chapter 15 Concurrency Control but this is overly restrictive. Since choosing Validation ( T i ) causes fewer nonconFicting transactions to restart, it gives the better response times. 15.14 Answer: Two-phase locking: Use for simple applications where a single granu- larity is acceptable. If there are large read-only transactions, multiver- sion protocols would do better. Also, if deadlocks must be avoided at all costs, the tree protocol would be preferable. Two-phase locking with multiple granularity locking: Use for an ap- plication mix where some applications access individual records and others access whole relations or substantial parts thereof. The draw- backs of 2PL mentioned above also apply to this one. The tree protocol: Use if all applications tend to access data items in
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page7 / 11

1510 Answer a Serializability can be shown by observing...

This preview shows document pages 7 - 9. Sign up to view the full document.

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