ece475-l6 - ECE 475/CS 416 Computer Architecture - Advanced...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 ECE 475/CS 416 Computer Architecture - Advanced Pipelining Edward Suh C omputer S ystems L aboratory suh@csl.cornell.edu ECE 475/CS 416 — Computer Architecture, Fall 2007, Suh 2 Review ± Pipelining concept • Improves throughput by breaking up long combinational paths (and increasing clock frequency) ± 5-stage processor pipeline • IF, ID, EX, MEM, WB ± Hazards: data, control, structural ± Strategies to handle hazards • Stall (interlock) • Bypass (forwarding) • Speculate • Expose to software
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 ECE 475/CS 416 — Computer Architecture, Fall 2007, Suh 3 Exceptions ± Exceptions: interrupt instruction execution unexpectedly ± Harder to handle in pipelines since there is more overlap • may have five instructions in flight when exception is raised ± Common exceptions: • I/O device interrupt • OS call • Arithmetic overflow, FP anomaly • Page fault • Misaligned memory access • Memory protection violation • Illegal instruction • Power failure ECE 475/CS 416 — Computer Architecture, Fall 2007, Suh 4 A Taxonomy of Exceptions ± Synchronous vs. asynchronous synchronous : trap/syscall, ALU exception – requires precise state at that instruction asynchronous : I/O, timer interrupt – requires precise state at some point (soon) ± User- vs. hardware-triggered user : trap/syscall hardware : interrupt, exception ± Maskable vs. nonmaskable (NMI) maskable : allows selective disabling of interrupt handling – useful in nonre-entrant I/O handlers • nonmaskable: critical stuff, can’t be disabled
Background image of page 2
3 ECE 475/CS 416 — Computer Architecture, Fall 2007, Suh 5 A Taxonomy of Exceptions ± Within vs. between instructions within – typ. does not allow instruction to finish ± must be restartable – within+asynchronous typ. catastrophic (e.g., power failure) ± Resume vs. terminate resume – program continues execution after exception is handled terminate – program execution is aborted (easier to implement) Challenge: Re-startable exceptions within instructions ECE 475/CS 416 — Computer Architecture, Fall 2007, Suh 6 Restartable Exceptions ± Exceptions that must restart interrupted instruction arithmetic overflow page fault (virtual memory) some I/O etc. ± Another program (OS handler) must be invoked to: • Save state • Correct exceptional condition • Restore state • Handler needs to know – Exception location and cause – Where to resume ± Invisible to original program
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 ECE 475/CS 416 — Computer Architecture, Fall 2007, Suh 7 Precise Exception It must appear as if an interrupt is taken between two instructions (say I i and I i+1 ) • the effect of all instructions up to and including I i is totally complete • no effect of any instruction after I i has taken place The interrupt handler either aborts the program or restarts it at I i+1 .
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 18

ece475-l6 - ECE 475/CS 416 Computer Architecture - Advanced...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online