Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vectored interrupts

What is the difference between vectored and non vectored interrupts?

I thought all interrupts had to be vectored interrupts... After all don't all interrupts have a vector number and thus a vector with a specific ISR [interrupt service routine]

(ISR address would in the page table, at 4 * the vector # in device that generated interrupt; assuming a 32 bit address architecture)....

Thanks!

like image 425
rrazd Avatar asked Jun 29 '11 07:06

rrazd


2 Answers

See here:

  • Vectored interrupts: Device tells CPU that it needs attention, identifying itself via the interrupt
  • Polled interrupts: CPU has to poll multiple devices to see which one had requested attention
like image 126
user541686 Avatar answered Sep 27 '22 00:09

user541686


Whenever an interrupt occurs, the CPU needs to execute a Handler, which is basically a subroutine that handles the interrupt. Now how the CPU accesses this handler depends on the type of interrupt.

In case of Vectored interrupt, the vector number specifies the address of the Handler, hence the CPU jumps to the address and executes the handler.

On the other hand, non vectored interrupts are generally raised by I/O (slow) devices. In this case there is always a specific handler that needs to be executed, hence no need to pass a vector for the address of the handler

like image 36
AmanMohla Avatar answered Sep 27 '22 00:09

AmanMohla