in Databases retagged by
116 views
0 votes
0 votes

Does Conservative 2 Phase Locking Protocol ensures no Deadlock?

Please describe your answer.

in Databases retagged by
116 views

4 Comments

@Kabir5454

Can you please answer?

0
0
Yes in conservative 2PL there are no deadlocks .

Conservative 2PL requires a transaction to lock all the items it accesses before the transaction begin execution by pre-declaring it’s read set and write set .(From navathe)

If at least one of the required data items cannot be obtained then none of the items are locked. Rather, the transaction waits and then tries again to lock all the items it needs.

So it does not just hold an items and wait for another item which somehow does not satisfy hold and wait for deadlock and making this deadlock free.
0
0

@Kabir5454
So, as Rigorous 2PL and Strict 2PL also hold all the locks at the beginning, in these two protocols also Deadlock Free is ensured. Am I right?

0
0
No in strict and rigorous 2PL there is growing and shrinking phase which conservative 2PL doesn’t have.

In strict 2PL transaction does not release any exclusive lock until it is committed or aborted but it can release the shared lock.

In rigorous 2PL transaction does not release any locks until it is committed or aborted .

There can be deadlock possible in both the cases as it is dynamic 2PL locking mechanism where as conservative 2PL is static one.
0
0

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1