When an interrupt occurs, an operating system
View worked solution
Answer: D
When an interrupt occurs, the operating system temporarily suspends the execution of the currently running process, saves its context, and executes the corresponding Interrupt Service Routine (ISR).
Let us evaluate the given options to find the correct behavior:
- Option A is incorrect: The operating system cannot ignore interrupts (except for masked interrupts, but generally, interrupts must be handled to manage hardware and system events).
- Option B is incorrect: The state of the interrupted process is not always changed. For instance, after servicing a simple clock interrupt that just updates the system time, the CPU may resume the same process in the
Runningstate without any state transition. - Option C is incorrect: The OS does not always resume the interrupted process. If the interrupt was a timer interrupt signaling that the process's time slice has expired, or if a higher-priority process has become ready, the scheduler will select a different process to run.
- Option D is correct: Depending on the nature of the interrupt (such as a page fault or an I/O request), the OS may change the state of the interrupted process to
Blocked(orWaiting) and schedule another ready process to run.
Free practice · Your answers on this page are not saved.
