Consider the following partial Schedule S involving two transactions T1 and T2. Only the read and the write operations have been shown. The read operation on data item P is denoted by read(P) and the write operation on data item P is denoted by write(P) Time Instance Transaction-id T1 T2 1 read(A)   2 write(A)   3   read(C) 4   write(C) 5   read(B) 6   write(B) 7   read(A) 8   Commit 9 read(B)     Schedule S   Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?

Consider the following partial Schedule S involving two transactions T1 and T2. Only the read and the write operations have been shown. The read operation on data item P is denoted by read(P) and the write operation on data item P is denoted by write(P) Time Instance Transaction-id T1 T2 1 read(A)   2 write(A)   3   read(C) 4   write(C) 5   read(B) 6   write(B) 7   read(A) 8   Commit 9 read(B)     Schedule S   Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct? Correct Answer Schedule S is non-recoverable and cannot ensure transaction atomicity

Concept:

Recoverable schedule: A schedule is said to be recoverable in which for every transaction Ti and Tj , if Tj is reading a data item that is written by Ti then the commit operation of Ti must before the commit operation of Tj.

Aborting: Aborting means to disrupt the action by killing the current ongoing transaction.

Explanation:

Option 1: Incorrect

As, it is not giving any surety about T1, there is no commit in T1.  Rolling back of T2 may not be required in this.

Option 2: Correct

In given schedule, T2 is reading data item A that is written by T1 so it means commit of T1 must before the commit of T2, but here in this schedule it is not happening. So, this is non – recoverable schedule. In this after T1 fails, if we want to undo all the operations, still we cannot undo a committed transaction. So, it cannot ensure transaction atomicity.

Option 3: Incorrect

It is redoing all the operations of T2. But in this, it is reading data item A that is written by T1 and T1 is not committed. So, it results in dirty read problem.

Option 4: Incorrect

Since Schedule S is non – recoverable. So, it is incorrect. Also, it cannot ensure atomicity.

Related Questions

Each of the questions below consists of a question and three statements numbered I, II and III given below it. You have to decide whether the data provided in the statements are sufficient to answer the question. Read all the three statements and give answer. There are six letters E, I, P, G, N and O is PIGEON the word formed after performing the following operations using these six letters only? I. O is placed fourth to the right of P. G is not placed immediately next to either P or O. II. N is placed immediately next (either left or right) to O. E is placed immediately next (either left or right) to G. III. Both I and E are placed immediately next to G. The word does not begin with N. P is not placed immediately next to E.
Consider the following schedule S of transactions T1, T2, T3, T4: T1 T2 T3 T4   Reads(X)         Writes(X) Commit   Writes(X)  Commit         Writes(Y) Reads(Z) Commit           Reads(X) Reads(Y) Commit   Which one of the following statements is CORRECT?
Consider a schedule of transactions T1 and T2: T1 RA     RC   WD   WB Commit   T2   RB WB   RD   WC     Commit   Here, RX stands for “Read(X)” and WX stands for “Write(X)”. Which one of the following schedules is conflict equivalent to the above schedule?