Log In
0 votes

Please explain. Use the below transaction.

in Databases 478 views
i am thinking is this transaction runs without deadlock under strict 2PL ?

If there is no deadlock ==> it avoid unrepeatable problem.

if deadlock is present ? then what to say ?

2 Answers

0 votes
Any 2 PL if does not cause deadlock will ensure conflict serializability.

Now every conflict serializable schedule is free from unrepeatable read problem.

So every strict schedule is free from unrepeatable read problem.

@OneZero thats alright. but see the schedule even after applying strict 2pl T1 is reading two different A values.




Is it possible to write the above code in 2PL form?

It will cause a deadlock while attempting to perform 2PL.

Once deadlock occurs, we can use deadlock handling methods to terminate a transaction 

When the transaction restarts we will have have a deadlock set of transactions on which we can apply strict 2 PL.

How can you conclude every conflict serailizable schedule is free from unrepeatable read problem?
0 votes

unrepeatable read happens when a transaction read the value of variable twice or more times and in between these reads other transaction change the value of variable causing different read values for first transaction.

so this whole case cant happen in 2PL because no transaction can come in between reads and take exclusive lock for write the value while there is share lock on variable

Related questions

1 vote
1 answer
We know, Conservative 2PL is another name of Strict 2PL. But According to Navathe book Conservative 2PL is deadlock free,but Strict 2PL can have deadlock. Then how both could be same??
asked Jan 27, 2018 in Databases srestha 1.8k views
0 votes
1 answer
456 views asked Jul 14, 2018 in Databases Na462 456 views
1 vote
0 answers
Is different 2 phase locking a subset of each other? For example, if the schedule is Strict 2PL then it will also be simple 2PL. Something like a 2PL is a subset of Strict 2PL is a subset of rigorous 2PL.
asked Jan 18, 2019 in Databases vinay chauhan 142 views
1 vote
1 answer
T1: W(X), T2: R(Y), T1: R(Y), T2: R(X) does 2PL protocol allows it? T1 T2 L-X(X) W(X) L-S(Y) R(Y) U(X) L-S(Y) R(Y) L-S(X) R(X) here T2 is granted lock on X as T1 enters shrinking phase as no exclusive locks are held on X is my solution correct?
asked Nov 25, 2018 in Databases aditi19 156 views