Вы находитесь на странице: 1из 4

CONCURRENCY CONTROL 1) What is the objective of concurrency control ?

a) To ensure the serializability of transactions in a multiuser database b) To ensure the serializability of transactions in a singleuser database c) recover the deadlocks d) To manage the database Ans : a 2) Suppose a transaction T1 requests a lock of mode let suppose A on item Q on which transaction T2 currently holds a lock of let suppose mode B,and T1 grant the lock immediately then what kind of locks T1 and T2 are having on Q a) T2-shared, T1-exclusive b) T2-exlusive, T1-exclusive c) T2-shared, T1-shared d) T2-exlusive, T1-shared Ans: c 3) What does this figure represents

a) b) c) d)

A serializable schedule A simple transaction Tracsaction obeying two phase locking protocol A deadlock Ans : d

4) In which of the following figures transactions T1 and T2 following the Two Phase locking protocol

a) b) c) d)

Fig 1 Fig 2 Both a and b None of a or b Ans : d

5) What is lock point ? a) A point in a schedule where a transaction has obtained its firstlock b) End of the growing phase c) A point in a schedule where a transaction unlocks its all locks d) End of shrinking phase Ans: b 6) How can we avoid cascading rollbacks ? a) Using strict-two phase locking protocol b) Using rigorous two phase locking protocol c) Using two phase locking protocol d) Both a and b e) Both b and c f) All of above Ans: d

7) Name the optimistic concurrency control technique? a) Validation (Optimistic) Concurrency Control Techniques b) Two-Phase Locking Techniques for Concurrency Control c) Concurrency Control Based on Timestamp Ordering d) Multiversion Concurrency Control Techniques Ans: a 8) Consider the following locking protocol: All items are numbered, and once an item is unlocked, only higher-numbered items may be locked. Locks may be released at any time. Only X-locks are used. Is this protocol a) Guarantee serializability b) Does not Guarantee serializability c) This protocol is completely in correct d) None of above Ans: b 9) Which of the following is the preferred way to recover a database after a system failure? a) Rollback b) Rollforward c) Switch to duplicate database d) Reprocess transactions Ans: b 10) Which of the following fig is associated with deadlock?

a) b) c) d)

Fig 1 Fig 2 Both of these None of these Ans : a

11) Growing and shrinking phase is associated with which protocol ? a) Time-stamp based protocols b) Graph based protocols c) Validation based protocol

d) None of above Ans: d

12) What is the order of phases in validation based protocols ? a) Extract, read, write, validation b) Validation, read, write c) validation, extract, read, write d) read, validation, write 13) We have Six modes in multiple granularity, that are intention-shared, intention-exclusive, shared, shared-intention-exclusive, exclusive-intension-shared, exclusive. Which of these modes is of no use ? a) Exclusive-intension-shared b) Intension-exclusive c) Intension-shared d) Intension-exclusive-shared Ans: a

Вам также может понравиться