views:

194

answers:

1

1) How can the processor recognize the device requesting the interrupt? 2) Given the different devices are likely to require different ISR How can the pressor obtain the starting address in each case? 3) Should a device be allowed to interrupt the processor while amother interrupt is being services? 4) How should two or more simultanement interrupt requests be handled?

A: 

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.

ChrisW
In the long run, how do you think answering questions like this helps the questioner?
anon
http://stackoverflow.com/questions/1089725/java-area-class/1089755#1089755
ChrisW
I didn't know this was homework, and anyway I'm not supplying source code. How do you expect the OP to get this information: is it from lectures, or from a text book? FWIW I've never heard such a lecture / seen such a text book myself, and questions like these aren't necessarily easy to find answers to via Google.
ChrisW
what is your problem Neil i try to learn someting
emrah sarı
These answers may help the OP by supplying further terms which can be used in Google searches: "interrupt controller", "PIC", "BIOS setup configuration", "reenable interrupts", "interrupt priority".
ChrisW
The questioner admitted it was homework. And most schools and colleges have this thing called a library. Part of the point of being in secondary and tertiary education is to learn how to use resources like libraries. And I myself own at least three textbooks the cover this, and I'm not even remotely interested in hardware, so they can't be such rare beasts.
anon
And can I point out, I'm not the one doing the downvotes, I'm just commenting.
anon
@emrah Neil is a bit short with people sometimes. Anyway, on Stack Overflow, when you're asking homework questions, people prefer to know that you're at least trying to do your own homework: so instead of only asking the question, it's better to also say what your answer is, even if your answer is incomplete or incorrect. See for example http://catb.org/esr/faqs/smart-questions.html#examples
ChrisW
@Neil I don't mind your comments/questions.
ChrisW