Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can someone tell me if the IRQ of a device is different to the Interrupt Priority level?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

An IRQ is an hardware interrupt request from a device. It is a hardware signal with alerts the CPU that external hardware wants it's attention. The interrupt usually causes the CPU to immediately stop what it was executing and jump to different code, usually an interrupt service routine that was registered earlier.

Then once the CPU is executing an interrupt service routine, what should happen when another interrupt request comes in while the CPU is processing a different interrupt? Interrupt priority level is what answers that question. The simplest priority seem, as pointed out in Wikipedia, is an interrupt disable setting. So while servicing an interrupt, all other interrupts will not interrupt the processor (they will no be lost, they will be serviced once the current service routine is finished). With more complex priority scheme, some interrupts will interrupt others.

For example, maybe the hard drive interrupt has a higher level than the keyboard, since the hard drive speed is important and no one is going to notice a < 1ms delay in processing a key press.

share|improve this answer
add comment

No, they're not the same.

The IRQ is a hardware interrupt signal used to tell the CPU that something needs its attention.

It's been a while but I don't think there was any priority implied by the different IRQ signals.

Interrupt priority will be assigned to software interrupts, meaning that some are considered more urgent than others.

share|improve this answer
    
so IRQ's themselves have no priority attached to them, but when handled by the PIC, they are prioritized by the PIC? –  Tony The Lion Jan 2 '10 at 11:57
    
Oh, we're talking about PIC processors. You tagged the question 'windows'. I don't know about PICs, but it seems to me that if handling the IRQs is handled by software, anything is possible. Sorry, I can't be more specific because I don't know what the software does. –  pavium Jan 2 '10 at 12:31
1  
I looked in Wikipedia, and found you meant Programmable Interrupt Controller. There was no mention of 'priority' in the article, so I must conclude that any prioritizing is indeed done by software. You can do anything with software, you know ;-D –  pavium Jan 2 '10 at 12:39
    
IRQ in the general PC sense means "interrupt request line". different IRQs meant different addresses, and allowed multiple devices to interrupt the processor without sharing an interrupt line. had nothing to do with priority. –  quack quixote Jan 2 '10 at 13:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.