1 Concurrency control Answer the following questions as dire
1. Concurrency control. Answer the following questions as directed.
Concurrency control is concerned with achieving a) durability, b) isolation, c) atomicity. ___________
If every transaction started by locking the entire database, and ended by releasing its lock, then which ACID property would be guaranteed? (enter A, C, I ,or D) _______________
(True/False) If a transaction can acquire a shared lock on data item A, then it can certainly acquire an exclusive lock on A. __________________
What kind of lock must be acquired if a transaction wants to perform a database write? _______________
(True/False) If one transaction holds a shared lock on data item A, can another transaction be granted a shared lock on A? _______________
If transaction T1 wants to acquire a lock on data item A, but it never granted the lock even though other locks are acquiring and releasing the lock, then transaction T1 is said to be _________________.
Define “locking protocol” in your own words ______________________________________________________________________________________________________________________________________________________.
(True/False) If transactions always acquire exclusive locks before they write, and always acquire shared locks before they read, then conflict serializability is guaranteed for every group of transactions. ____________
(True/False) Even if transactions always acquire exclusive locks before they write, and always acquire shared locks before they read, deadlock is still possible. ______________
What is the smallest number of transactions such that deadlock is possible? a) one b) two c) three ____________________
(True/False) Is the following schedule recoverable? ___________________
(True/False) Is the following transaction two-phase? ______________
In two-phase locking, the “lock point” of a transaction is a) the position of the last lock operation in the transaction, b) the position of the first lock operation of the transaction, c) the position of the first unlock position of the transaction __________
(True/False) When two-phase locking is used, deadlocks may occur _____________
Describe the advantage of two-phase locking with lock conversions over plain two-phase locking ______________________________________________________________________________________________________________________________________________________
(True/False) In a transaction that is legal under the two-phase locking protocol, can lock-S(B) occur after lock-X(A) (assuming no other problems) ? ______________
(True/False) Does the transaction below follow the rules for the tree protocol, given the database graph also shown? ______________
Solution
1. Concurrency control is concerned with achieving
a) durability
b) isolation
c) atomicity.
Answer :-
B.Isolation
2.If every transaction started by locking the entire database, and ended by releasing its lock, then which ACID property would be guaranteed ?
Answer :-
* Isolation
3, If a transaction can acquire a shared lock on data item A, then it can certainly acquire an exclusive lock on A
Answer :-
False.
Explanation :-
To claim an exclusive lock, a transaction must first acquire a shared lock.
4.What kind of lock must be acquired if a transaction wants to perform a database write ?
Answer :-
Exclusive Lock.
5.When two-phase locking is used, deadlocks may occur
Answer :-
True.

