interrupts Flashcards
What is an interrupt in a computer system?
An interrupt is a signal from a device controller or software that causes the CPU to suspend its current activities and execute an interrupt handler to respond to the event.
What are the two main types of interrupt lines in most CPUs?
- Nonmaskable interrupts (for critical events like memory errors)
- Maskable interrupts (which can be turned off during critical CPU tasks).
What is interrupt handling?
It involves saving the current state of the CPU, executing a designated routine (interrupt handler) ,then restoring the state to continue normal execution.
What hardware line does a CPU use to detect interrupts?
The interrupt-request line.
What is an interrupt vector?
A table containing memory addresses of interrupt handlers corresponding to different interrupt sources.
Why is vectored interrupting used?
It reduces the need to poll all devices by dispatching directly to the correct interrupt handler.
Why are interrupts preferred over polling for handling I/O operations?
Interrupts are more efficient as they allow the CPU to work on other tasks until notified by the device, whereas polling requires constant checking.
How are priorities assigned in interrupts?
Through interrupt priority levels, allowing the CPU to defer low-priority interrupts while responding to high-priority ones.
What is a nonmaskable interrupt used for?
To handle critical events such as unrecoverable memory errors.
What is interrupt chaining?
A method where each interrupt vector points to a list of handlers, checked one by one to service the request.
What are traps in the context of interrupts?
Software-generated interrupts used to request services from the operating system,such as handling page faults or system calls.
How do interrupts assist in virtual memory management?
They handle page faults by saving the process state, fetching the required page- and resuming execution.
What is the role of the first-level interrupt handler (FLIH)?
To save the context and queue the interrupt handling operation.
Why do modern operating systems use multilevel interrupts?
To handle varying levels of urgency between different events.