As the program executes, the stack grows downward on entry to procedures and shrinks upward on procedure exit. When interrupts occur, key portions of the execution context are pushed onto the main stack – see Chapter 11 for further explanation. In a multi-threaded environment, the main stack is used during initialization and then, primarily as an interrupt stack. Each active thread is allocated its own stack within RAM as illustrated in Figure 16.1.