in Databases retagged by
1,849 views
1 vote
1 vote

In conservative two phase locking protocol, a transaction

  1. Should release all the locks only at the beginning of transaction
  2. Should release exclusive locks only after the commit operation
  3. Should acquire all the exclusive locks at the beginning of transaction
  4. Should acquire all the locks at the beginning of transaction
in Databases retagged by
1.8k views

1 comment

c) Should acquire all the exclusive locks at beginning of transaction
0
0

3 Answers

8 votes
8 votes

To ensure the serializability, we need two-phase locking protocol (2PL).

2PL has four cases:

  • Simple or Basic
  • Conservative
  • Strict
  • Rigorous

In Conservative 2-PL we need to lock all the data items which the transaction required before the transaction starts. And for its conservative nature, this protocol is deadlock free but starvation can occur.

So, the ans. is (D) Should acquire all the locks only at beginning of transaction.   

edited by
1 vote
1 vote

Answer: D

For conservative 2PL should acquire all the locks at the begining and release all the locks at the ending.

0 votes
0 votes
The answer is D as in conservative 2-PL locking protocol, all the locks(shared and exclusive) are taken at the beginning of the transaction and released after the transaction commits.
Answer:

Related questions