2,144 views
3 votes
3 votes

Which of the following is correct?

a. A schedule will be irrecoverable if a transaction reads a data item and commit after it is written by an uncommitted transaction.
b. A schedule will be irrecoverable if a transaction writes a data item and commit after it is read by an incommitted transaction.
c. Both of these
d. None of these

I know the definition of the recoverablity sounds like this:

A recoverable schedule is one where, for each pair of transactions Ti and Tj such that Tj reads a data item previously written by Ti, the commit operation of Ti appears before the commit operation of Tj.

If this is correct then the definition of irrecoverability should sound like this:

A irrecoverable schedule is one where, for each pair of transactions Ti and Tj such that Tj reads a data item previously written by Ti, the commit operation of Ti appears after the commit operation of Tj.

However the words of given options are not making me any sense in order to relate them to above definition. Whats going on here? 

3 Answers

Best answer
3 votes
3 votes

Option D is Ans Here.

If in a Schedule the Tx which done dirty read commits first and other Tx aborts then it is called irrecoverable schedule.[Cross Check with ur defination]

Another Example



option A & B both are deviating from above defination so D is Ans.

selected by
1 votes
1 votes

Irrecoverable Schedule: When Tj is reading the value updated by Ti and Tj is committed before commit of Ti, the schedule will be irrecoverable.
Recoverabilityofschedules2

Table 2 shows a schedule with two transactions, T1 reads and writes A and that value is read and written by T2. But later on, T1 fails. So we have to rollback T1. Since T2 has read the value written by T1, it should also be rollbacked. As it has not committed, we can rollback T2 as well. So it is recoverable with cascading rollback.
Recoverable with cascading rollback: If Tj is reading value updated by Ti and commit of Tj is delayed till commit of Ti , the schedule is called recoverable with cascading rollback.
Recoverability3

Table 3 shows a schedule with two transactions, T1 reads and writes A and commits and that value is read by T2. But if T1 fails before commit, no other transaction has read its value, so there is no need to rollback other transaction. So this is a cascadeless recoverable schedule.

Related questions

1 votes
1 votes
3 answers
1
DebRC asked Nov 2, 2021
738 views
Suppose,T1: W(X), T2: R(X), T1: W(X), T2: Commit, T1: AbortHere we can see T2 is getting committed before T1 aborts, so it is clearly an Irrecoverable schedule but is it ...
1 votes
1 votes
3 answers
2
learncp asked Sep 18, 2015
1,508 views
Suppose we have a schedule containing two transactions  as shown-$\begin{bmatrix} T1 & T2 \\ R(A) & \\ W(A) & \\ & R(A) \\  & W(A) \\ R(B)& \\ W(B)& \\ & R(B) \\  & W(...
3 votes
3 votes
2 answers
4
reena_kandari asked Jul 22, 2017
7,598 views
How to check if a schedule is allowed in 2PL or not?S1:R2(A)W1(B)W1(C)R3(B)R2(B)R1(A)R2(C)W3(A)S2:W2(A)W1(A)W3(A)W2(B)W1(B)W3(B)