What is the difference between an Interrupt and a Trap (or Exception)? Give an example of when each would occur.

Last updated 5 July 2026

  • An interrupt is asynchronous and raised by external hardware, independent of the current instruction (e.g. a network packet arriving or a timer firing).

  • A trap (exception) is synchronous and caused by the executing instruction, so it recurs if re-run (e.g. division by zero, page fault, or a system call).

  • Some traps are deliberate (system calls), while faults and aborts are involuntary error conditions.

  • https://growthequityinterviewguide.com/firms/b-capital
  • https://www.interviewbit.com/sre-interview-questions/
All Operating Systems interview questions