in Databases retagged by
2,718 views
2 votes
2 votes

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
by
2.7k views

1 comment

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

3 Answers

9 votes
9 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.

1 vote
1 vote
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