Implementation of precise interrupts in pipelined processors
James E. Smith, Andrew R. Pleszkun · 1998
An interrupt is precise if the saved process state corresponds with the sequential model of program execution where one instruction completes before the next begins. In a pipelined processor, precise interrupts are difficult to achieve because an instruction may be initiated before its predecessors have been completed. This paper describes and evaluates solutions to the precise interrupt problem in pipelined processors. The precise interrupt problem is first described. Then five solutions are discussed in detail. The first forces instructions to complete and modify the process state in architectural order. The other four allow instructions to complete in any order, but additional hardware is used so that a precise state can be restored when an interrupt occurs. All the methods are discussed in the context of a parallel pipeline struclure. Simulation results based on the CR.AY-IS scalar architecture are used to show that, at best, the first solution results in a performance degradation of about 16~. The remaining four solutions offer similar performance, and three of them result in as litlle as a 3 % performance loss. Several extensions, including virtual memory and linear pipeline structures, are briefly discussed.