Vectored interrupts
Asked Answered
S

4

5

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!

Speaker answered 29/6, 2011 at 7:30 Comment(0)
W
7

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
Whiteness answered 29/6, 2011 at 7:35 Comment(0)
P
3

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

Palladic answered 29/6, 2011 at 7:49 Comment(3)
You say "on the other hand non vectored interrupts are raised by I/O devices" -- BUT Aren't ALL interrupts (vectored and non vectored) raised by I/O devices? Can you please clarify? Otherwise +1 for a clear first 2 paragraphs! =)Speaker
A call to a subprogram is also an interrupt. e.g. If you would have programmed in any High Level Language and you call a function then that is also a kind of interrupt and it is a type of vectored interrupt where you know the address of the function to be invoked.Palladic
function call instructions to subroutines in the same program are not interrupts, just ordinary branches. (Unless you're talking about x86 call far through a call gate, then it's a system call not a function call).Divisionism
A
2

The important feature of a vectored interrupt is that the device itself provides the interrupt vector address.

With non-vectored interrupts, all devices using the same interrupt request routine will transfer control to the same location, and the interrupt service routine will have to figure out which of the possible devices is actually interrupting.

With a vectored interrupt, the device tells the interrupt mechanism what its vector address is. The vector address corresponds to a store location in which the OS (or device driver) has written the address of an appropriate interrupt service routine. Typically each device has its own vector address so the "which device is interrupting" decision is trivial.

The terminology is a little messed up, since the table of interrupt service routine addresses is frequently called the "interrupt vector table", but the term used for both vectored interrupts (interrupting device identifies a slot in the vector) and non-vectored interrupts (interrupt request line corresponds to a slot in the vector).

Automate answered 1/2, 2020 at 1:9 Comment(0)
D
-1

When the external device interrupts the CPU (interrupt request), CPU has to execute interrupt service routine for servicing that interrupt. If the internal control circuit of the processor produces a CALL to a predetermined memory location which is the starting address of interrupt service routine, then that address is called vector address and such interrupts are called vector interrupts.

Dedicate answered 3/2, 2015 at 9:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.