1、JongHoon KimT1T2READ(A,t)READ(A,s)t:=t+100s:=s*2WRITE(A,t)WRITE(A,s)READ(B,t)READ(B,s)t:=t+100s:=s*2WRITE(B,t)WRITE(B,s)T1T2AB2525READ(A,t)t:=t+100WRITE(A,t)125READ(B,t)t:=t+100WRITE(B,t)125READ(A,s)s:=s*2WRITE(A,s)250READ(B,s)s:=s*2WRITE(B,s)250T1T2AB2525READ(A,s)s:=s*2WRITE(A,s)50READ(B,s)s:=s*2WR
2、ITE(B,s)50READ(A,t)t:=t+100WRITE(A,t)150READ(B,t)t:=t+100WRITE(B,t)150T1T2AB2525READ(A,t)t:=t+100WRITE(A,t)125READ(A,s)s:=s*2WRITE(A,s)250READ(B,t)t:=t+100WRITE(B,t)125READ(B,s)s:=s*2WRITE(B,s)250T1T2AB2525READ(A,t)t:=t+100WRITE(A,t)125READ(A,s)s:=s*2WRITE(A,s)250READ(B,s)s:=s*2WRITE(B,s)50READ(B,t)
3、t:=t+100WRITE(B,t)150T1T2AB2525READ(A,t)t:=t+100WRITE(A,t)125READ(A,s)s:=s*1WRITE(A,s)125READ(B,s)25s:=s*1WRITE(B,s)READ(B,t)t:=t+100WRITE(B,t)125T1T2READ(A,t)READ(A,s)t:=t+100s:=s*2WRITE(A,t)WRITE(A,s)READ(B,t)READ(B,s)t:=t+100s:=s*2WRITE(B,t)WRITE(B,s)T1T2READ(A,t)t:=t+100WRITE(A,t)READ(A,s)s:=s*2
4、WRITE(A,s)READ(B,t)t:=t+100WRITE(B,t)READ(B,s)s:=s*2WRITE(B,s)T T1 1T T2 21 12 23 31 12 23 3T1T2AB2525l1(A);r1(A);A:=A+100;w1(A);l1(B);u1(A);125l2(A);r2(A);A:=A*2;w2(a);u2(A);250l2(B);Deniedr1(B);B:=B+100;w1(B);u1(B);125l2(B);u2(A);r1(B);B:=B*2;w2(B);u2(B)250T1T2sl1(A);r1(A);sl2(A);r2(A);sl2(B);r2(B
5、);xl1(B)Deniedu2(A);u2(B);xl1(B);r1(B);w1(B);u1(A);u1(B);The compatibility matrix for shared and exclusive locksLock requestedLock heldT1T2sl1 (A);r1(A);sl2(A);r2(A);sl2(B);r2(B);sl1(B);r1(B);xl1(B)Deniedu2(A);u2(B);xl1(B);w1(B);u1(A);u2(B);Upgrading locks allow more concurrent operationUpgrading by
6、 two transactions can cause a deadlockT1T2sl1(A);sl2(A);xl1(A)Deniedxl2(A)DeniedCompatibility matrix for shared,exclusive and update locks.SXUSYesNoYesXNoNoNoUNoNoNoCollect execution using update locksT1T2ul1 (A);r1(A);ul2(A)Deniedxl1(A);w1(A);u1(A);ul2(A);r2(A);xl2(A);w2(A);u2(A);SXISYesNoNoXNoNoNo
7、INoNoYesT1SnoT2UnoT3yes To other T3 recordsAGroup Mode:UWaiting:yesList:Element InfoRelation ARelation B.Tuple ATuple BTuple C.Disk blockADisk blockB.DBDBDBR1tu1tu2tu3tu4T1(IS)T1(S),T2(S)RootRootRelationRelationTuplesTuplesR1tu1tu2tu3tu4T1(IS)T1(S),T2(IX)T2(X)RootRootRelationRelationTuplesTuplesTTTFFFFFFFTFTFTT