Cheap and Secure Web Hosting Provider : See Now

[Solved]: Is Everything a Hardware Interrupt?

, , No Comments
Problem Detail: 

Just need a little help understanding hardware interrupts.

As I understand (feel free to correct) a hardware interrupts occurs when hardware wants attention of the computer. In basic terms the hardware sends a message down the interrupt line which is then controlled by the PIC. The CPU receives the interrupt and carries out the instruction once it has completed the current one it is on.

Every time I've seen examples of interrupts they have been 'printer running out of paper', 'network adapter receiving data packet' etc. My question is, how is the process of the hardware interrupt any different from pressing a key on a keyboard or moving a mouse? Each of these actions requires attention from the CPU but as I understand they are never used as examples of interrupts. Are they interrupts? Does everything I do with an input device cause an interrupt?

Any clarification would be much appreciated.

Asked By : user1480135

Answered By : D.W.

In general, no, on modern platforms, not everything is a hardware interrupt -- though you could imagine a platform where it is.

On some platforms, hardware interrupts are used for all input events (including, yes, pressing a key on a keyboard or moving a mouse).

However, interrupts come with some performance implications. Therefore, in modern platforms, we often use a combination of interrupts and other I/O mechanisms. We might use interrupts for some input devices, but other input devices might use memory-mapped I/O. For instance, your Ethernet card might use memory-mapped I/O, to write incoming packets into a region of memory dedicated for this use. Memory-mapped I/O can be combined with interrupts or with polling.

You can find more on interrupts, polling, memory-mapped I/O, DMA, and related topics in a good operating systems textbook.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/37851

3.2K people like this

 Download Related Notes/Documents

0 comments:

Post a Comment

Let us know your responses and feedback