454.1-09.Solution10

454.1-09.Solution10 - CMPT-454 Spring 2009 Instructor:...

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

View Full Document Right Arrow Icon
Spring 2009 Instructor: Martin Ester TA: Bahareh Bina Solution Assignment 10 Total marks: 100 (10 % of the assignments) Due date: April 6, 2009 Problem 10.1 (40 marks) Consider the following schedules of transactions T1, T2 and T3. Insert shared and exclusive lock actions as well as unlock actions and modify the schedule where necessary. Place a shared or exclusive lock immediately before the read or write action that requires it. Place the necessary unlocks at the end of a transaction. If a deadlock occurs, abort the participating transaction that started last, release all its locks and re-start that transaction after all the other participating transactions have committed. Show the complete schedules satisfying the 2PL protocol. a) r1(A) r2(B) r3(C) r1(B) r2(C) r3(D) w1(A) w2(B) w3(C) w1(A) T1 T2 T3 sl-1(A) r1(A) sl-2(B) r2(B) sl-3(C) r3(C) sl-1(B) r1(B) sl-2(C) r2(C) T2 has to wait until T1 returns the S lock on B sl-3(D) r3(D) T3 has to wait until T2 returns the S lock on C xl-1(A) w1(A) w1(A) u1(A) u1(B) xl-2(B) w2(B) u2(B) u2(C) xl-3(C) w3(C) u3(C)
Background image of page 1

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

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

Page1 / 4

454.1-09.Solution10 - CMPT-454 Spring 2009 Instructor:...

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