In our discussion thus far, we have assumed that the flow of control within a program proceeds from instruction to successive instruction, except when explicitly altered by a branch or procedure call instruction. There are, however, two kinds of events that can cause the flow of execution to be altered apart from an explicit instruction in the currently running program. When a disk controller has been asked to transfer a block of data between memory and the disk, it will issue an interrupt request when the transfer is complete. Many types of terminal controllers will issue an interrupt request every time a key is struck on the terminal they control.
Faults are exceptions that prevent the instruction that is executing from completing.
Traps are exceptions that indicate that the instruction that caused them completed with some kind of error. Illegal instructions or invalid addressing modes - usually the result of bad code or attempting to execute data. Division by zero. Interrupts arise from conditions outside the currently running program. Thus, if the same program is run again, it is very unlikely that the same interrupt will occur at the same point in the program.