3

I've recently been learning about interrupt vectors, partly from this Wikipedia page.

I've understood that different processors will have different types of interrupts, and the interrupt vector table stores the information about where code evaluation should move to when each type of interrupt occurs. As far as I'm aware I have understood this well, please let me know if there's something I'm missing.

What I don't understand is, why is this information referred to as a vector? To me it seems that we are storing the information of a pointer to a memory address for each type of interrupt, so I would more naturally call this an 'interrupt pointer table'.

I'm coming from a background in mathematical physics, so to me 'vector' generally refers to a physical quantity with magnitude and direction, or an element of a vector space (or both). Does the 'vector' part of the 'interrupt vector' have some interpretation as a vector in one of these two senses? I can see that you could imagine an arrow pointing to a certain memory address as a vector, but if you went with this reasoning then all pointers would be vectors.

Jojo
  • 133
  • 4

1 Answers1

2

Vector has different meanings depending on the context. I would say that, in this case, the word vector is used because it enables "directing" the IRQs to the right handler. You could define vector to be the entry in the IVT that enables directing the IRQs. They are more like vectors of transmission or vectors that enable transmission rather than the vectors known in the physics world.

Also, I don't know about other types of processors but x86 family of processors refer to IVT when in Real Mode (emulated 16 bits mode) and IDT when in protected mode (32 bits) and in long mode (64 bits). IDT stands for interrupt descriptor table. This allows programmers of these modes to differentiate between the Real Mode table and the protected/long mode table.

I agree though that the use of descriptor instead of vector is better.

user123
  • 1,142
  • 5
  • 5