Data Mgmt Lab_Part_55

Data Mgmt Lab_Part_55 - Overview of Transaction Management...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Overview of Transaction Management 163 1. Take the following two transactions as example: T1: Increment A, Decrement B, Read C; T2: Increment B, Decrement A, Read C If using only strict 2PL, all actions are versions of blind writes, they have to obtain exclusive locks on objects. Following strict 2PL, T1 gets an exclusive lock on A, if T2 now gets an exclusive lock on B, there will be a deadlock. Even if T1 is fast enough to have grabbed an exclusive lock on B first, T2 will now be blocked until T1 finishes. This has little concurrency. If I and D locks are used, since I and D are compatible, T1 obtains an I-Lock on A, and a D-Lock on B; T2 can still obtain an I-Lock on B, a D-Lock on A; both transactions can be interleaved to allow maximum concurrency. 2. The pairs of actions which conicts are: RW, WW, WR, IR, IW, DR, DW We know that strict 2PL orders the first 3 conicts pairs of actions to be the same as the order in some serial schedule. We can also show that even in the presence of I and D locks, strict 2PL also orders the latter 4 pairs of actions to be the same as the order in some serial schedule. Think of an I (or D)lock under these circumstances as an exclusive lock, since an I(D) lock is not compatible with S and X locks anyway (ie. cant get a S or X lock if another transaction has an I or D lock). So serializability is guaranteed.D lock)....
View Full Document

Page1 / 3

Data Mgmt Lab_Part_55 - Overview of Transaction Management...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online