Linux kernel can be seen as one process

Is it possible to consider the Linux kernel as a single process with many threads? In addition, what defines the switch between memory management modules, scheduler, file system, etc. At the core.

+6
source share
1 answer

The Linux kernel cannot be seen as a process, as it is one of its process management responsibilities.

You can think of the kernel as a great interrupt handler. After the kernel provides the processor with a thread, the only way to get control back is through interrupts (or system calls, which are also interrupts). When an interrupt occurs, the kernel immediately gains control and processes the interrupt accordingly. At this stage, various parts of the core could be called.

The kernel is multi-threaded because it can handle various interrupts on different processors at the same time. On the other hand, there are kernel threads that are managed in the same way as user threads (there is no difference between the kernel and user threads for the scheduler).

+9
source

Source: https://habr.com/ru/post/949655/


All Articles