in Databases
105 views
0 votes
0 votes
Does Conservative 2PL ensures Recoverability ? If Yes then Does it ensures Cascadeless or Strict recoverable schedule ?
in Databases
105 views

2 Answers

1 vote
1 vote
Best answer
No conservative 2PL doen’t ensure recoverability always.

 

Conservative 2PL – It requires a transaction to lock all the items it accesses before the transaction begins execution.The locks can be released at any point of time, need not after the commit operation.

Just consider this eg:

T1                T2

L_X(A)         

W(A)

U(A)

                 L_X(A)

                 R(A)

                 U(A)

                commit

commit

→ This is clearly an irrecoverable schedule.
selected by

4 Comments

Do you have any reference that shows Conservative 2PL can release lock anytime means that it can release lock after commit also as well as before commit also ?
0
0

@joshipratik232 just search in any standard resource and you will get it.

1
1

@joshipratik232

https://gateoverflow.in/241964/dbms-transaction

You can see this also.

If we are obtaining locks before Transaction starts, and releasing it after the commit operation then it is both Conservative and Rigorous 2PL.

This line is interesting.

2
2
Ok, got it. Thank you
0
0
1 vote
1 vote
Conservative 2PL ensures recoverability but has cascading rollback, hence they are not cascadeless.

Related questions