/    /  DBMS- Check Points

Check Points

 

When a system crashes, then one should look into the log to determine those transactions that have to be redone and those that have to be undone.

 

The checkpoints are required for the following reasons. :

(a) The search process is time-consuming.

(b) Most of the transactions, according to our algorithm, have to be redone and have already written their updates into the database.

 

The functionality of checkpoints :

(a) Output onto stable storage all log records currently residing in main memory.

 

(b) Output to the disk all modified buffer blocks.

 

(c) Output onto stable storage a log of records of the shape <checkpoint L>, where L can be a list of transactions active at the time of the checkpoint.

The redo and undo operations need to be applied only to transactions in L and to all transactions that started execution after the <checkpoint L> record was written to the log.

a) For all the transactions Tk in T that have no <Tk commit> record or <Tk abort> record in the log, execute undo(Tk). 

b) For all transactions Tk in T such that either the record <Tk commit> or the record <Tk abort> appears in the log, execute redo(Tk).

 

Reference Link

Check Points