Does running an interrupt handler create a new process, or is it part of an existing process?

872 views Asked by At

From the beginning of https://en.wikipedia.org/wiki/Interrupt, there are three different kinds of interrupts:

  • a hardware interrupt,

  • A software interrupt caused by an exceptional condition in the processor itself (often called a trap or exception)

  • A software interrupt caused by executing a special instruction in the instruction set. (For example system calls)

My question is that when a cpu switches to run an interrupt handler,

  1. is a new process created for running the interrupt handler?

  2. Or is the running of the interrupt handler part of an existing process, e.g.

    • in the first kind of interrupt, the process which requests some service from a hardware device and then waits for the hardware interrupt which indicates that the device operation finishes,
    • the process which causes an exception in the second kind of interrupt,
    • the process which makes the system call in the third kind of interrupt.
1

There are 1 answers

0
user3344003 On

is a new process created for running the interrupt handler?

The running process handles the interrupt in kernel mode.

Your three classes of interrupts conflate different, but related concepts, into one term "interrupt".

Fault and traps are EXCEPTIONS, not interrupts. They are usually handled in the same way as an interrupt but they occur synchronously with the instruction stream (interrupts are asynchronous) and (unlike interrupts) they cannot be blocked.

Usually a system call is a FAULT.