OS & Hardware
What is the role of an interrupt vector table?
- ARecording how many times each type of interrupt has occurred
- BSpecifying the address where handling begins for each type of interrupt or exception
- CRecording the order in which processes will run next
Show answer and explanation
Answer: B. Specifying the address where handling begins for each type of interrupt or exception
When an interrupt or exception occurs, the CPU obtains a number (vector) for its cause, reads the handler's start address from the interrupt vector table and jumps there. The OS fills in the table at boot so that the timer, each device, page faults, system calls and so on can invoke separate handlers. Counting occurrences is a separate statistics mechanism, and the order of processes is managed by the OS scheduler.
- A. Counting occurrences is a separate statistics mechanism.
- B. Correct. It maps each cause to the start address of its handler.
- C. The order of processes is managed by the scheduler.