Problem Set Solutions/Interrupts Exceptions/Problem 8

The processor discussed in the previous problems can ensure that the correct register values are printed in the exception handler code from Problem 3. One way to do this is to keep an exception bit in each ROB entry, set this bit if the instruction raises an exception, and wait for that instruction to reach the point when it would normally commit. At that point, the processor should “clean up” and jump to the exception handler code. During this “clean-up”, what should the processor do with:

Instructions in the reservation stations? Solution: Delete them (mark all reservation stations as free).

Instructions in the ROB? Solution: Delete them (move the ROB head pointer to the first free/empty entry, which effectively frees all instructions left in the ROB).

Values in the RAT? Solution: Make each RAT entry point to the corresponding register, because the register values in the register file are exactly the values there should be at the point of the exception.