The Gateway to Computer Science Excellence
0 votes
56 views

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 by Active (3.2k points) | 56 views
0
Yes.. I think this would to deadlock
0
no
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

have the same doubt as @Hemanth_13 

@flash12 Could you please clear this doubt of ours?

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
50,737 questions
57,321 answers
198,391 comments
105,142 users