One of the most important characteristics of any computer is how short and fast the prolog and epilog can run. Slower execution leads to more expensive procedure calls. The first picture shows two procedures working one within the other. The second picture however shows two procedures working in parallel, functions like this are called coroutines . The Truth about Traps and Interrupts - Traps are synchronus with the program.
Interrupts are asynchronus.
Let's look at interrupts. Hardware Actions 1. The device controller asserts an interrupt line on the system bus to start the interrupt sequence. As soon as the CPU is prepared to handle the interrupt, it asserts an interrupt acknowledge signal on the bus. This number is called the interrupt vector 4.