notes12_2pl_locking

notes12_2pl_locking - 1 Shivnath Babu Concurrency Control...

Info iconThis preview shows pages 1–9. 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

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight 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: 1 Shivnath Babu Concurrency Control (II) CS216: Data-Intensive Computing Systems 2 How to enforce serializable schedules? Option 1: run system, recording P(S); at end of day, check for P(S) cycles and declare if execution was good 3 Option 2: prevent P(S) cycles from occurring T 1 T 2 .. T n Scheduler DB How to enforce serializable schedules? 4 A locking protocol Two new actions: lock (exclusive): l i (A) unlock: u i (A) scheduler T 1 T 2 lock table 5 Rule #1: Well-formed transactions T i : l i (A) p i (A) u i (A) ... 6 Rule #2 Legal scheduler S = .. l i (A) ... u i (A) ... no l j (A) 7 What schedules are legal? What transactions are well-formed? S1 = l 1 (A)l 1 (B)r 1 (A)w 1 (B)l 2 (B)u 1 (A)u 1 (B) r 2 (B)w 2 (B)u 2 (B)l 3 (B)r 3 (B)u 3 (B) S2 = l 1 (A)r 1 (A)w 1 (B)u 1 (A)u 1 (B) l 2 (B)r 2 (B)w 2 (B)l 3 (B)r 3 (B)u 3 (B) S3 = l 1 (A)r 1 (A)u 1 (A)l 1 (B)w 1 (B)u 1 (B) l 2 (B)r 2 (B)w 2 (B)u 2 (B)l 3 (B)r 3 (B)u 3 (B) Exercise: 8 What schedules are legal? What schedules are legal?...
View Full Document

This document was uploaded on 01/17/2012.

Page1 / 23

notes12_2pl_locking - 1 Shivnath Babu Concurrency Control...

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

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