edited by
14,441 views
62 votes
62 votes

Consider the partial Schedule $S$ involving two transactions $T1$ and $T2$. Only the $\textit{read}$ and the $\textit{write}$ operations have been shown. The $\textit{read}$ operation on data item $P$ is denoted by $\textit{read(P)}$ and $\textit{write}$ operation on data item $P$ is denoted by $\textit{write(P)}$.
$$\overset{\large{\text{Schedule S}}}{\begin{array}{c|ll}
\textbf{Time Instance}&    \rlap{\text{Transaction ID}}\\&\textbf{T1}&  \textbf{T2} \\\hline
1&     \text{read(A)}  \\ 
2&     \text{write(A)}\\   
3&     & \text{read(C)}     \\
4&     & \text{write(C)}     \\
5&     & \text{read(B)}  \\
6&     & \text{write(B)}     \\  
7&     & \text{read(A)}     \\
8&     & \text{commit}       \\
9&     \text{read(B)} \\
\end{array}}$$

Suppose that the transaction $T1$ fails immediately after time instance 9. Which of the following statements is correct?

  1. $T2$ must be aborted and then both $T1$ and $T2$ must be re-started to ensure transaction atomicity
  2. Schedule $S$ is non-recoverable and cannot ensure transaction atomicity
  3. Only $T2$ must be aborted and then re-started to ensure transaction atomicity
  4. Schedule $S$ is recoverable and can ensure transaction atomicity and nothing else needs to be done
edited by

5 Answers

–6 votes
–6 votes

According to me Ans is D

Because T2 is committed that means it's history is recorded in transaction log file to maintain ACID rules.

which also included "which value of A which was read by T2" and That value was written by T1.

As we know the read(A) of T1 [Initial value] and Write(A) of T1 extracted from T2 log file , 

therefore we can recover the S

Answer:

Related questions

51 votes
51 votes
4 answers
1