in Databases retagged by
3,136 views
2 votes
2 votes

in Databases retagged by
3.1k views

4 Comments

Wow nice question

Thanks saini
1
1
@magma @manas

i updated answer for other check that
0
0

@Rahul Jain25 

[1] Check precedence graph for Conflict Serializable.

[2] For Strict schedule, check that no Read/Write from/to an uncommitted transaction.

[3] For 2PL, try to assign the locks in a way, that follows 2PL property, i.e. acquiring locks and then releasing the locks. If there is any case, where this cannot be done, i.e. we need to release the lock before acquiring other, then there will be a deadlock in 2PL. Hence, it is not allowed under 2PL.

[4] For strict 2PL, the assignments of locks would follow the same way, except the fact that exclusive locks must not be released until transaction commits. So, here take the same diagram from point-3 and try to adjust the releasing of locks to obtain strict 2PL.

Hope this helps ! For above question, I guess it is 3 statements are right ? Only, strict recoverable is FALSE.

0
0

4 Answers

6 votes
6 votes

1)    here is no cycle in dependency graph so it is conflict serializable 

2)   it is 2pl see the graph shared lock taken on A in T1 before releasing the X lock of B and C

3) strict recoverable  means if someone write the data other can read and write after commit of that transaction

 

here $W_{1}\left ( B \right )$ and $R_{3}\left ( B \right )$ making it not strict

4)     it not strict 2pl because the X lock of B and C in T1 should be release after T1 commit    

edited by
2 votes
2 votes
What I think Is Since no cycle is formed it should be Conflict serialazable

Now for 2PL we should see that every transaction should get the required shared and exclusive lock in best case but here we cannot give the required lock to all of them without overlapping So,2PL fails here...

It is Recoverable schedule but not Strict

Am I correct????

1 comment

i think u r right
0
0
0 votes
0 votes

S1: TRUE. Because precedence graph is acyclic.

S2: TRUE. Allowed by 2PL.

T1 T2 T3
  S(A)  
   R(A)  
X(B)    
W(B)    
X(C)    
W(B)    
S(B)    
U(B)    
U(C)    
    S(B)
    R(B)
  S(B)  
  R(B)  
R(A)    
U(A)    
  S(C)  
  R(C)  
  U(C)  
  U(B)  
    X(A)
    W(A)

S3: FALSE.  Because following should be condition.

T1 T2
   W(A)  
   COMMIT  
    R(A)/W(A)

S4: False. Not allowed by strict 2PL

0 votes
0 votes

..................

Related questions