OS & Hardware

Which of the following is asynchronous, occurring at unpredictable times unrelated to the instruction being executed?

  1. AAn interrupt from a timer
  2. BA page fault from accessing a nonexistent page
  3. CAn exception from dividing by zero
Show answer and explanation

Answer: A. An interrupt from a timer

A timer interrupt arrives from external circuitry after a set time, regardless of which instruction is executing, so it is asynchronous. Page faults and division by zero are caused by executing a specific instruction and recur at the same place under the same conditions, making them synchronous exceptions. With synchronous exceptions, the handler must also decide whether to retry or skip the faulting instruction, another difference from interrupts.

  • A. Correct. It arrives externally, independent of instructions, so it is asynchronous.
  • B. A page fault is a synchronous exception caused by a specific instruction.
  • C. Division by zero is a synchronous exception caused by the divide instruction.
Practice this topic Back to topic

More OS & Hardware questions

  1. What is the usual sequence when a CPU accepts an interrupt?
  2. What is the role of an interrupt vector table?
  3. What should you keep in mind when temporarily disabling (masking) interrupts during a critical section?
  4. Why is interrupt handling split into a short part done immediately and the remainder done later in a normal context?
  5. What is the role of a page table?