6-Interrupts, Traps & Exceptions

6-Interrupts, Traps & Exceptions - Interrupts, Traps,...

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

View Full Document Right Arrow Icon
Tathagata Bhattacharjee 1 Interrupts , Traps , Exceptions & Busses Presenter Tathagata Bhattacharjee
Background image of page 1

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 2 Objectives After this session you would be able to appreciate: Hardware Interrupts, Software Interrupt Trap Interrupt Cycle Exceptions Handling Interrupts and Exceptions Busses
Background image of page 2
Tathagata Bhattacharjee 3 Introduction to Interrupts Interrupts are a mechanism by which other modules (e.g. I/O) may interrupt normal sequence of processing Four general classes of interrupts Program - e.g. overflow, division by zero Timer, internal timer I/O - from I/O controller Hardware failure, e.g. memory error
Background image of page 3

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 4 Particularly useful when one module is much slower than another, e.g. disk access (milliseconds) vs. CPU (microseconds or faster)
Background image of page 4
Tathagata Bhattacharjee 5 Interrupt An asynchronous hardware signal that is detected by the processor. An interrupt usually indicates that a peripheral device needs service. An interrupt causes the processor to save the current state, to branch to a fixed location, and to resume execution at that location.
Background image of page 5

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 6 Hardware Interrupts – Any type of hardware event such as a keyboard press or reception of an Ethernet packet. Software Interrupt – Typically used when a user program needs to make a system call to the operating system, such as for I/O
Background image of page 6
Tathagata Bhattacharjee 7 Trap – Issued by the CPU when it detects that something is wrong or needs special attention Examples : Stack overflow, divide by zero, attempt to access protected memory
Background image of page 7

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 8 Interrupt – an asynchronous event – device generated Traps and exceptions – synchronous events – caused by software actions Operating systems • interrupt, trap and exception handlers are entry points to the OS – when there are no user programs the OS does its own work, or idles in a loop or wait instruction
Background image of page 8
Tathagata Bhattacharjee 9 Exception : signal marking that something “out of the ordinary” has happened and needs to be handled Interrupt : asynchronous exception Trap : synchronous exception
Background image of page 9

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 10 Polling Processor waiting for I/O is called “Polling” Polling I/O device puts information in a status register processor retrieves information check the status periodically
Background image of page 10
Tathagata Bhattacharjee 11 In electronic communication, 'polling' is the continuous checking of other programs or devices by one program or device to see what state they are in, usually to see whether they are still connected or want to communicate.
Background image of page 11

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 12 Cost of Polling Assume for a processor with a 1GHz clock it takes 400 clock cycles for a polling operation (call polling routine, accessing the device, and returning). Determine % of processor time for polling Mouse: polled 30 times/sec so as not to miss user movement Floppy disk: transfers data in 2-Byte units and has a data rate of 50 KB/second.
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 76

6-Interrupts, Traps & Exceptions - Interrupts, Traps,...

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

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