In the book The Design of the Unix Operating System by Maurice it is mentioned that interrupts are serviced in the context of the running process as it doesn't spawns a new process to service interrupts.
So, in Unix a processor is doing exactly one of the two things: 1. In user-space, executing user code in a process 2. In kernel-space, in process context, executing on behalf of a specific process.
But, in many operating systems, including Linux, the interrupt handlers do not run in a process context. Instead, they run in a special interrupt context that is not associated with any process.This special context exists solely to let an interrupt handler quickly respond to an interrupt, and then exit.
So, in Linux a processor is doing exactly one of the three things: 1. In user-space, executing user code in a process 2. In kernel-space, in process context, executing on behalf of a specific process. 3. In kernel-space, in interrupt context, not associated with a process, handling an interrupt.
I want to understand why this change in design? Wouldn't it be faster if we service interrupts in the context of the running process?