Answer:
Check the explanation
Step-by-step explanation:
The following is a sequence of Undo — log records written by two transactions.
<START 1>; <F, A, 10>; <START U>; <U, B, 20>; <F, C, 30>; <U, D, 40>; <COMMIT U>; <T, E, 50>; <COMMIT T>; (a) < START U >;
If the system crashes after the log < START U >,
Then we have log records will be shown below.
<START U>;
<T, A, 10>;
<START T>;
SYSTEM CRASHED
The recovery manager sees the Undo - Redo log and inspect the both trans-actions T and U are not committed. Then those elements changed by both transactions are arranged to their old values.
- Transaction T changes the element A.
- Then the Element A is arranged to old value A=10.
- Transaction U did not change any existing element in the records.
- So, not anything to do with transaction U.
(B) < T, E, 50>;
If the system crashes after the log < T, E, 50>;
Then we have log records will be shown below .
START T>;
<T, A, 10>;
<START U>;
<U, B, 20>;
<T, C, 30>;
<U, D, 40>;
<COMMIT U>;
<T, E, 50>;
SYSTEM CRASHED
The recovery manager sees the Redo logs and inspect the transaction U is committed or not. Such changes made by transaction U are reached to disk.
• So much the recovery manager arranged the elements to their recent values changed by transaction U.
• Transaction U changed the elements B and its records <U, B, 20>with re-cent values.
• Transaction U changed the elements D and its records <U, D, 40>with recent values.
• The transaction T is not committed.
• Then the elements changed by transaction T are arranged to old values.
• Then element A is arranged to 10, C is arranged to 30 and E is arranged to 50.