Figure 23.6 shows the log corresponding to a particular schedule at the point of a system crash for the four transactions T1, T2, T3, and T4 of Figure 19.4. Suppose that we use the immediate update protocol with checkpointing. Describe the recovery process from the system crash. Specify which transactions are rolled back, which operations in the log are redone and which (if any) are undone, and whether any cascading rollback takes place.
What will be an ideal response?
First, we note that this schedule is not recoverable, since transaction T4 has read the
value of B written by T2, and then T4 committed before T2 committed. Similarly,
transaction T4 has read the value of A written by T3, and then T4 committed before T3
committed. The [commit, T4] should not be allowed in the schedule if a recoverable
protocol is used, but should be postponed till after T2 and T3 commit. For this problem,
let us assume that we can roll back a committed transaction in a non-recoverable
schedule, such as the one shown in Figure 21.7.
By using the procedure RIU_M (recovery using immediate updates for a multiuser
environment), the following result is obtained:
From Step 1 of procedure RIU_M, T2 and T3 are the active transactions. T1 was
committed before the checkpoint and hence is not involved in the recovery.
From Step 2, the operations that are to be undone are:
[write_item,T2,D,25]
[write_item,T3,A,30]
[write_item,T2,B,12]
Note that the operations should be undone in the reverse of the order in which they were
written into the log. Now since T4 read item B that as written by T2 and read item A that
as written by T3, and since T2 and T3 will be rolled back, by the cascading rollback
rule, T4 must be also rolled back. Hence, the following T4 operations must also be
undone:
[write_item,T4,A,20]
[write_item,T4,B,15]
(Note that if the schedule was recoverable and T4 was committed, then from Step 3, the
operations that are to be redone would have been:
[write_item,T4,B,15]
[write_item,T4,A,20]
In our case of non-recoverable schedule, no operations need to be redone in this
example.)
At the point of system crash, transactions T2 and T3 are not committed yet. Hence, when
T2 is rolled back, transaction T4 should also be rolled back as T4 reads the values of
items B and A that were written by transactions T2 and T3. The write operations of T4
have to be undone in their correct order. Hence, the operations are undone in the
following order:
[write_item,T2,D,25]
[write_item,T4,A,20]
[write_item,T3,A,30]
[write_item,T4,B,15]
[write_item,T2,B,12]
You might also like to view...
_______________________ is a name-resolution service that translates domain names to IP addresses.
Fill in the blank(s) with the appropriate word(s).
Which of the followings is the correct CSS syntax?
a. body {color:#000000}; b. body {color=#000000}; c. body: color=#000000; d. {body: color:#000000};
You can select a different theme for your workbook. Click the ____ tab on the Ribbon. In the Themes group, click the Themes button to display a gallery of themes.
A. Page Layout B. Layout C. Format D. Page Format
Shell scripts do not require the execute permission in order to be run the same way binary programs are run.?
Answer the following statement true (T) or false (F)