checkpoints are inserted in order to make the recovery process more simpler. instead of writing everything to the stable storage at the end, we issue checkpoint in different occassion. Once a check point is encountered all the dirty pages of all transaction ( committed and non committed ) is flushed to the stable storage. Also the transaction log is flushed to storage
Now if there is any need of any recovery, if we need to do a redo , then we need to do it only after the checkpoing
if it is an undo also we need to do it for before the check point (for transaction which were not committed at the time of checkpoint)
those transactions which were committed before checkpoint, there is no need to do anything.
please note in reality some transaction/ schecules may take a very long time to complete. so it is always better to use checkpoints