Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Databases System. The complete book: Exercise 18.3.3 For each of the following s

ID: 3824264 • Letter: D

Question

Databases System. The complete book: Exercise 18.3.3 For each of the following schedules:

a) r1(A); r2 (A); r3 (B); w1>i(A); r2 (C); r2 (B); w2 (B); W1(C);

b) r1(A); W1(B); r2(B): w2 (C); r3 (C); w3 (A);

d) r1(A); r2 (A); w1(B); w2 (B); r1 (B ); r2(B); w2 (C); w1(D).

Assume that each transaction takes a lock on each database element immediately before it reads or writes the element, and that each transaction releases its locks immediately after the last time it accesses an element. Question: Tell what the locking scheduler would do with each of these schedules; i.e., what requests would get delayed, and when would they be allowed to resume?

Explanation / Answer

Ans::The 2nd request, r2(A), can't be granted because of the lock held by T1. T2 is therefore delayed till when the fourth step of the sequence, w1(A), when that T1 releases its lock on A. No other delays are necessary, that the sequence of scheduled actions would be: r1(A); r3(B); w1(A); r2(A); r2(C); r2(B); w2(B); w1(C). // Thank you//