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,
is a new process created for running the interrupt handler?
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.