Knowee
Questions
Features
Study Tools

Consider the following transactions with data items P and Q initialized to zero:T1: read (P) ;read (Q) ;if P = 0 then Q : = Q + 1 ;write (Q) ;T2: read (Q) ;read (P) ;if Q = 0 then P : = P + 1 ;write (P) ;Any non-serial interleaving of T1 and T2 for concurrent execution leads toA serializable scheduleA schedule that is not conflict serializableA conflict serializable scheduleA schedule for which a precedence graph cannot be drawn

Question

Consider the following transactions with data items P and Q initialized to zero:T1: read (P) ;read (Q) ;if P = 0 then Q : = Q + 1 ;write (Q) ;T2: read (Q) ;read (P) ;if Q = 0 then P : = P + 1 ;write (P) ;Any non-serial interleaving of T1 and T2 for concurrent execution leads toA serializable scheduleA schedule that is not conflict serializableA conflict serializable scheduleA schedule for which a precedence graph cannot be drawn

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

The given transactions T1 and T2 can lead to a schedule that is not conflict serializable.

Here's why:

Conflict serializability is a form of equivalence between schedules. Two schedules are conflict equivalent if they have the same set of transactions, and the order of any two conflicting operations is the same in both schedules.

In the given transactions, T1 and T2, both are reading and writing to data items P and Q. If we interleave these transactions, there can be a situation where T1 reads the initial value of P (which is 0), then T2 reads the initial value of Q (which is also 0). After that, T1 increments Q by 1 and writes it back. Then T2 increments P by 1 and writes it back.

In this case, the final state of the system is P=1, Q=1. However, if we execute T1 and T2 serially in the order T1->T2, the final state of the system would be P=0, Q=1. And if we execute them in the order T2->T1, the final state would be P=1, Q=0.

So, the interleaved execution does not match with any of the serial executions, hence it is not conflict serializable.

This problem has been solved

Similar Questions

A schedule S is conflict serializable if it is conflict equivalent to a _________ schedulea)serialb)recoverablec)strictd)non seriale)cascadeless

Let Ri(z) and Wi(z) denote read and write operations on a data element z by a transaction Tjr respectively. Consider the schedule S with four transactions. S: R4(x) * R2(x) * R3(x) * R1(y) * W1(y) * W2(x) * W3(y) * R4(y) Which one of the following serial schedules is conflict equivalent to S?T1 -> T3 -> T4 -> T2T1 -> T4 -> T3 -> T2T4 -> T1 -> T3 -> T2T3 -> T1 -> T4 -> T2

Consider the following transactions with data items P and Q initialized to zero:T1: read (P) ;read (Q) ;if P = 0 then Q : = Q + 1 ;write (Q) ;T2: read (Q) ;read (P) ;if Q = 0 then P : = P + 1 ;write (P) ;Any non-serial interleaving of T1 and T2 for concurrent execution leads to

In a schedule S having 4 transactions executed concurrently. The order of their operation is given below. Find out whether the given schedule is serializable or not?R1(A), R2(B), W2(A), W3(C), R4(C), R3(A), W3(B), R4(A), W2(B), W4(B), W3(A)Conflict SerializableView SerializableBoth (a) and (b)Not Serializable

Consider the three transactions T1, T2, and T3, and the schedules S1 and S2given below. State whether each schedule is serializable or not. If a schedule is serializable, write down the equivalent serial schedule(s). T1: r1 (X); r1 (Z); w1 (X); T2: r2 (Z); r2 (Y); w2 (Z); w2 (Y); T3: r3 (X); r3 (Y); w3 (Y); S1: r1 (X); r2 (Z); r1 (Z); r3 (X); r3 (Y); w1 (X); w3 (Y); r2 (Y); w2 (Z); w2 (Y); S2: r1 (X); r2 (Z); r3 (X); r1 (Z); r2 (Y); r3 (Y); w1 (X); w2 (Z); w3 (Y); w2 (Y);

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.