search
Log In
1 vote
508 views

in Databases 508 views

3 Answers

1 vote

yes it is allowed in 2PL.

0
How can T1 acquire locks on A & B when T2 hasnt released them yet? They are exclusive locks I believe? Is it possible?
0 votes

Yes. its possible to execute the schedule in 2PL.

T1 T2 T3
 

X(A)

W(A)

X(B)

U(A)

 

X(A)

W(A)

   
 

W(B)

U(B)

 

X(B)

U(A)

   
   

X(A)

W(A)

W(B)

U(B)

   
   

X(B)

W(B)

U(A)

U(B)

Since schedule is allowed to execute in 2PL then schedule is conflict serializable schedule & conflict serial schedule is the lock point order(lock point is red colored).this way, Equivalent conflict serial schedule is T2 -> T1 -> T3


edited by
1
There is no read operation please check
0
Yes. Actually i have mistakenly written R(A) to release lock. I must write U(A) in place of R(A).thanks for notice

I have uodated the answer. Please check.
1
Nice explanation thanx u
0 votes

In this I have shared a table having all types of lock classified as serializable recoverable deadlock-free.

Related questions

0 votes
1 answer
1
217 views
How can 2PL protocol ( simple one ) ensure conflict serializability even though it cannot ensure freedom from deadlock ? I mean ,if a schedule is conflict serializable it has a conflict equivalent to a serial schedule and serial schedules won't have deadlocks .Right ?
asked Mar 30, 2019 in Databases ashunimbz 217 views
0 votes
1 answer
2
588 views
Can 2PL have Read Write conflict? Consider following schedule with two transaction T1 T2 L_S(A) Read(A) L_X(A)---------------------------is T2 allowed to acquire exclusive lock on A? Write(A) L_S(A) ----------------------------------------------T1 already has this lock Read(A) Commit RollBack Will this schedule allowed by 2PL
asked Jan 29, 2019 in Databases mehul vaidya 588 views
0 votes
0 answers
3
43 views
Do we consider Shared lock for deciding whether transaction in given schedule following 2PL or not? or in simple words can transaction which follows 2PL use Shared lock after it has unlocked some item. It can definitely not use Exclusive lock .
asked Jan 21, 2019 in Databases mehul vaidya 43 views
1 vote
0 answers
4
178 views
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 178 views
...