Exceptions/Interrupts - University of Washington

Exceptions/Interrupts - University of Washington

Precise Interrupts Precise interrupts preserve the model that instructions execute in program-generated order, one at a time If an interrupt occurs, the processor can recover from it What happens on a precise interrupt: identify the instruction that caused the interrupt let the instructions before faulting instruction finish disable writes for faulting & subsequent instructions force trap instruction into pipeline trap routine save the state of the executing program correct the cause of the interrupt restore program state restart faulting & subsequent instructions Spring 2003

CSE P548 1 How Pipelines Complicate Interrupt Handling Its fairly simple to maintain precise interrupts in the R3000 integer pipeline one instruction fetched and executed each cycle instructions executed in fetch order Still, there are issues. Pipelines execute several instructions at once how do you determine which one caused the exception? Spring 2003

CSE P548 2 How Pipelines Complicate Interrupt Handling Simultaneous interrupts 2 stages cause an interrupt at the same time a solution: handle them in program order still precise Spring 2003 CSE P548 3

A 5-Stage Pipeline Spring 2003 CSE P548 4 How Pipelines Complicate Interrupt Handling Interrupts out of order wrt sequential instruction execution subsequent instruction causes an interrupt before a previous instruction interrupts still must be handled in program order for precise interrupts A solution: interrupt handled before the write stage interrupt recorded in a per-instruction bit vector which flows with

it down the pipeline interrupts for instruction in write stage are handled before it changes any state restart all instructions in the pipeline Spring 2003 CSE P548 5 How Pipelines Complicate Interrupt Handling Multicycle operations in separate pipelines some types floating point operations integer multiply & divide

can cause imprecise interrupts because operations dont necessarily complete in program-generated order example: divf FP exception multf not done add completed cannot restart interrupting & subsequent instructions because some have completed a completed instruction may have overwritten one its source operands Spring 2003 CSE P548

6 Spring 2003 CSE P548 7 How Pipelines Complicate Interrupt Handling Dealing with imprecise interrupts ignore the imprecise interrupt (IBM 360) precise mode/imprecise mode (Alphas?) trade-off: correctness vs. performance stall until no previous instruction will fault (Pentium Pro) buffer writes until instructions complete

future file or shadow register; today called register renaming history file (VAX) costs: additional registers & bypass logic to FUs Spring 2003 CSE P548 8 How Multicycle Operations Complicate Pipelining Current structural hazards: multiple writes in the same cycle when instructions finish in a different order than their fetch order track use of the write port & stall instructions in the decode stage if a conflict set the bit in a shift register that is the number of cycles until the

register file will be written shift left each cycle if this instructions bit is already set, stall adv: check for all structural hazards in 1 place disadv: shift register & write conflict logic detect the hazard just before it occurs stall before the common final stages adv: easier to prioritize among instructions involved in the hazard disadv: more complicated pipeline control because might need to check for structural hazards in multiple places Spring 2003 CSE P548

9 How Multicycle Operations Complicate Pipelining Spring 2003 CSE P548 10 ISA & Pipelines How instruction set architectures complicate pipelines: variable cycle instructions cause: more complicated hazard detection more forwarding logic more stalling

harder to implement precise interrupts complex addressing modes cause: WAR hazards from autoincrement same problems as above from multiple memory accesses self-modifying code causes pipeline flush on address match between instruction being written & instruction later in the pipeline Spring 2003 CSE P548 11

Recently Viewed Presentations



    Can you do these activities to keep your brain strong over the break? Color in a flower for each activity that you do. Read 20 minutes. Count to . 100 by 10's. Count to . 100 by 1's. Practice my...
  • Nematodes and Tree Fruits

    Nematodes and Tree Fruits

    Cause mechanical injury to cells and tissues Cause cell death Modify cell development Modify cell function Disrupt uptake of water and nutrients Alter photosynthate partitioning Create avenues of ingress Predispose plants to other stresses Signs and symptoms…..
  • Physics 111 Practice Problems - New Jersey Institute of ...

    Physics 111 Practice Problems - New Jersey Institute of ...

    Physics 111 Practice Problem Statements 10 Torque, Energy, Rolling SJ 8th Ed.: Chap 10.6 - 10.9 Torque Newton's Second Law for Rotation Energy Considerations in Rotational Motion Rolling Energy Methods Second Law Applications PROBLEM 11-47: The body in Fig. 11-37...
  • Harbor Security System Matthew Birkebak (mts54@wildcats.unh.edu) Timothy Brown

    Harbor Security System Matthew Birkebak ([email protected]) Timothy Brown

    Laser Line Generator or Powell Lens (Figure 4)- alters laser beam into a fan shape of nearly uniform light with 80% power of single beam. Laser Line Generator Housing (Figure 5) - Composed of 3-D printed housing made of PTFE...
  • Trauma: Engage, Educate & Empower - CBHNY

    Trauma: Engage, Educate & Empower - CBHNY

    Jessica Luquis MA LMHC: is a graduate from Sage Graduate School in New York. She is currently a Trauma Therapist and clinical supervisor for the trauma treatment program at St. Catherine's Center for Children. Ms.
  • Unit 8 Marketing Entertainment

    Unit 8 Marketing Entertainment

    Marketing Through Entertainment . Market entertainment and market THROUGH entertainment! Use agencies and promoters! work in entertainment industries, including music and sports, as an individual or organization in the business of marketing and promoting live events, such as concerts/gigs, sports...
  • Research Methods in Health Psychology Chapter 2 Science

    Research Methods in Health Psychology Chapter 2 Science

    Nomothetic - Of or relating to the study or discovery of general scientific laws. When we use nomothetic data we lose specificity to the individual but we gain in that we can now generalize to others. Levels of Analysis Behavioral/Psychological...
  • Screencasting


    Creating a Zinio account. Using Mango Languages. Finding Bestsellers in the Catalogue. Requesting a Meeting Room. Registering for a Puppet Show. Changing your PIN. Finding Obituaries online. Using the Digital Photo Collection. Think about tasks that someone may get stuck...