Concurrency

Question 1
Consider the transactions Tl, T2, T3 and the schedules Sl and S2 given below.
T1: r1(x); r1(z); w1(z)
T2 : r2(y); r2(z); w2(z)
T3 : r3(y); r3(x); w3(y)
S1: r1(x); r3(y); r3(x); r2(y); r2(z); w3(y); w3(z);r1(z); w1(x); w1(z)
S2 : r1(x); r3(y); r2(y); r3(x); r1(z); r2(z), w3(y);w1 (x); w2(z); w1(z)
Which one Of the following statements about the schedules is TRUE ?
A
Only S1 is conflict-serializable
B
Only S2 is conflict-serializable
C
Both S1 and S2 are conflict-serializable
D
Neither S1 nor S2 is conflict-serializable
Question 1 Explanation: 
To determine which of the schedules, S1 or S2, are conflict-serializable, we need to analyze the dependencies and conflicts between the transactions in each schedule.
A schedule is conflict-serializable if we can reorder the operations such that the resulting schedule is serial (i.e., no interleaving of transactions, just one transaction after another), and no conflict is violated.
r1(x) and r3(x) are conflicting (both read and write on x).
r1(z) and r2(z) are conflicting (both read and write on z).
w1(x) and w3(x) are conflicting (both write on x).
w1(z) and w2(z) are conflicting (both write on z).
So, S1 is conflict-serializable.
There is 1 question to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access