16. When the mouse initiates a hardware interrupt to the CPU, how does the CPU know where to find a program to service the mouse? ?
- Spock (rhp)Lv 72 months ago
there is a dedicated interrupt point in the operating system that the mouse hardware interrupt transfers control to. that is itself a pointer to the stack of programs currently resident in the machine and the one corresponding to the location of the mouse then receives the interrupt
- Robert JLv 72 months ago
In an full operating system (such as Windows OSX or Linux etc.,) the device driver registers itself against any relevant interrupt(s), so the OS routes interrupts to it for the device it handles.
In an embedded system, interrupt routing is usually hard-coded by the programmer to suit the hardware design.