Awesome q2a theme
0 votes
60 views
Can $conservative$ $2PL$ be $NON-RECOVERABLE?$
according to me they can be, but in some places i find them to be mentioned as recoverable..

which is true?
in Databases by (537 points) | 60 views
0
+4

I think conservative 2PL can definitely produce non-recoverable (cascading) schedules.

For the simple reason that there is no restriction on when the locks are released. It only dictates that all necessary locks are obtained before start of transaction, but places no restriction on when they are released.

If a transaction releases a X-Lock immediately after writing (but before committing), another transaction can surely acquire an S-Lock and perform a dirty read. Then proceed to commit before the first transaction, ending up with a non-recoverable schedule.

Here's an example:

$T_1$ $T_2$
Lock-X(A)
(all necessary locks acquired before start)
 
Write(A)  
Unlock-X(A)  
  Lock-S(A)
  Read(A)
  ...
  Unlock-S(A)
  Commit
....  
Commit  
0
Ya..that is the reason I also though the same, thanks for confirming
0

@shashin

All the best.. :)

+1

@Debapaul All the best... :)

+1
All the very best people - stay in control of your nerves and give it your best !

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
8,998 questions
3,130 answers
14,378 comments
95,816 users