Immediate Update Problem - To Work in Class


The following list represents the log entries for four transactions: T1, T2, T3, and T4 at the point of a system crash.  Suppose that the immediate update protocol with checkpointing has been used.  Describe the recovery process from the point of the system crash.  Describe how recovery occurs in this situation.  Suppose the initial values of variables are X=30, Y=10, A=20, B=50.  Is this a recoverable schedule?  What are the values of each of these variables after recovery takes place?  Is there a cascading rollback?  At the end of your recovery, in giving the values of variables, assume only undo and redo has occurred, but no failed transactions have been rerun as yet.  

 

Note: the form of the write statements in the log is: [write_item, transaction_num, variable, old_value, new_value]

 

Start of log...

[start_transaction, T2]

[read_item, T2, X]

[start_transaction, T3]

[write_item, T2, X, 30, 40]

[read_item, T2, Y]

[read_item, T3, X]

[write_item, T2, Y, 10, 20]

[read_item, T3, Y]

[commit, T2]

[start_transaction, T1]

[start_transaction, T4]

[read_item, T1, A]

[write_item, T1, A, 20, 30]

[checkpoint, L= {T4, T3, T1}

[read_item, T3, A]

[read_item, T4, B]

[write_item, T3, A, 30, 35]

[write_item, T4, B, 50, 60]

[commit, T4]

[read_item, T1, B]

[write_item, T1, B, 60, 70]

<................................... system crash


Return to Melody's Home Page.