notes12_2pl_locking

Notes12_2pl_locking - CS216 DataIntensive Computing Systems Concurrency Control(II Shivnath Babu 1 How to enforce serializable schedules Option 1

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

View Full Document Right Arrow Icon
1 Shivnath Babu Concurrency Control (II) Concurrency Control (II) CS216: Data-Intensive  Computing Systems
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
3 Option 2:   prevent P(S) cycles from   occurring  T 1   T 2  …. . T n Scheduler DB How to enforce serializable  schedules?
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 A locking protocol Two new actions: lock (exclusive): l (A)    unlock: u i  (A) scheduler T 1      T 2 lock table
Background image of page 4
5 Rule #1:   Well-formed transactions T i :  … l i (A) … p i (A) … u i (A) . ..
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Rule #2     Legal scheduler S = ……. . l i (A) ………. .. u i (A) ……. ..  no l j (A)
Background image of page 6
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:
Background image of page 7

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

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

This document was uploaded on 01/17/2012.

Page1 / 23

Notes12_2pl_locking - CS216 DataIntensive Computing Systems Concurrency Control(II Shivnath Babu 1 How to enforce serializable schedules Option 1

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

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