The Gateway to Computer Science Excellence
0 votes

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


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
Yes.. I think this would to deadlock

@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..




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
105,142 users