Question

1) How can the processor recognize the device requesting the interrupt?

2) Given that different devices are likely to require different ISR, how can the processor obtain the starting address in each case?

3) Should a device be allowed to interrupt the processor while another interrupt is being serviced?

4) How should two or more simultaneous interrupt requests be handled?

Was it helpful?

Solution

1) How can the processor recognize the device requesting the interrupt?

The CPU has several interrupt lines, and if you need more devices than there are lines there's an "interrupt controller" chip (sometimes called a PIC) which will multiplex several devices and which the CPU can interrogate.

2) Given the different devices are likely to require different ISR How can the pressor obtain the starting address in each case?

That's difficult. It may be by convention (same type of device always on the same line); or it may be configured, e.g. in the BIOS setup.

3) Should a device be allowed to interrupt the processor while amother interrupt is being services?

When there's an interrupt, further interrupts are disabled. However the interrupt service routine (i.e. the device-specific code which the CPU is executing) may, if it's willing, reenable interrupts if it's willing to be interrupted.

4) How should two or more simultanement interrupt requests be handled?

Each interrupt has a priority: the higher-priority interrupt is handled first.

OTHER TIPS

The concept of defining the priority among devices so as to know which one is to be serviced first in case of simultaneous requests is called priority interrupt system. This could be done with either software or hardware methods.

SOFTWARE METHOD – POLLING In this method, all interrupts are serviced by branching to the same service program. This program then checks with each device if it is the one generating the interrupt. The order of checking is determined by the priority that has to be set. The device having the highest priority is checked first and then devices are checked in descending order of priority.

HARDWARE METHOD – DAISY CHAINING The daisy-chaining method involves connecting all the devices that can request an interrupt in a serial manner. This configuration is governed by the priority of the devices. The device with the highest priority is placed first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top