AtomicityRecoveryIsolationSerializability:Action GraphLocks:Isolation:Two-phase locking (2 PL)MIT OpenCourseWarehttp://ocw.mit.edu 6.033 Computer System Engineering Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.AtomicityRec.sectorIsolationVer. hist.ABORT(undo)RecoverabilityLogging(WAL)Cache DBLogfailuresAppRecovery1) Undo2) Redo1) Scan log backwards2) Winners = C + A3) Losers:4) Redo C winners + undo losers.Isolation 1) read x 2) write x 3) write y 4) write ySerializability:Trace’s conflict arrow in same order as some serial order of actionsT1T4T3T2T1T1T4T3T2T2T3T3T1T2T4T2Locks:acq lxr1(x)rel lxacq lyw1(y)rel lyacq lxw2(x)acq lyw2(y)rel lxrel lyacq (lock of x)rel ( ” )1234Isolation:acq lxacq lySimple lockingTwo-phase locking (2 PL)acq lxr xacq lyr yNo release before ALL acquiresCorrectT2T1T3Tkx1x2xkrel l1acq l1rel l2acq l2acq lk-1rel lkacq
View Full Document