Below is an example with five disks. The full solution consists of the three parts mentioned above, each being a recursive procedure call. On a stack based machine, like our IJVM machine, these procedures would create new frames on top of the stack, leaving the most recent, or current frame, at the top. The code that cleans up the procedure upon exit. 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.