Consider the following schedule of transactions
R1(A) W1(A) R2(A) W2(B) W1(B) Commit1 Commit2
Which of the following properties are true for the above schedule and justify the reason for your answer
with explanation?
a) Conflict Serializable
b) View Serializable
c) Recoverable
SOLUTION TO THE ABOVE QUESTION
ANSWER
a) Conflict Serializable
ANSWER JUSTIFICATION.
This is because the given schedule can be converted to a serial schedule
by swapping non-conflicting pairs
Lets convert it to a serial schedule
S: R1(A), W1(A), R2(A), W2(B), W1(B)
we can get two transactions of schedule S as:
T1: R1(A), W1(A), W1(B)
T2: R2(A), W2(B)
Lets swap the non-conflicting pair R2(A) and W1(B)
therefore our schedule becomes
S1: R1(A), W1(A), W1(B), W2(B), R2(A)
S1 is a serial schedule in which all operations of T1 are performed before starting any operation of T2. Since S has been transformed into a serial schedule S1 by swapping non-conflicting operations of S, S is conflict serializable.
Comments
Leave a comment