in Databases
435 views
0 votes
0 votes

https://gateoverflow.in/39703/gate2016-1-51

In this question What if the transactions T1 and T2 are scheduled in this manner

X1(A)X1(B)X2(C)X2(D)S1(C)S2(A)….

will this schedule cause deadlock according to the implementation of the above question ?

here X1(P) is exclusive lock on data variable P by transaction T1 and S1(P) is shared lock on P by transaction T1.

in Databases
435 views

4 Comments

edited by
Yes.. I think this would to deadlock
0
0
no
0
0

@flash12 Transaction 1 has acquired an exclusive lock on A & B were as Transaction 2 has acquired exclusive lock on C & D. Now T1 wants to acquire shared on C but as this was locked by T2 earlier it won't be given similarly T2 wants to acquire shared lock on A but there as an exclusive lock earlier now both are waiting for each other indefinitely  so won't this be a dead lock ? can you please clear me with this..

 

 

0
0

have the same doubt as @Hemanth_13 

@flash12 Could you please clear this doubt of ours?

0
0

Please log in or register to answer this question.

Related questions