There is a similar question to mine here: https://stackoverflow.com/questions/43819072/does-the-kernel-stop-running-on-its-own-when-the-os-is-fully-loaded, but it has conflicting answers (so please do not mark this question as a duplicate).
Back to my question. I know that when the computer is powered on, the BIOS starts running, and the BIOS will run the boot loader, and the boot loader will run the kernel.
Now the kernel starts running as a normal program (by "normal program" I mean that the kernel is not just a group of functions that other programs calls, but rather it is also a program that runs on its own). Now the kernel will perform tasks such as:
- Initializes hardware as well as kernel data structures.
- Switch to protected mode.
- Initialize Interrupt Descriptor Table.
- etc. (this article lists a lot more tasks that the kernel does).
After the kernel finishes these tasks, the OS becomes loaded and the user can start using it.
My question is: now that the OS is loaded, does the kernel continue to run as a normal program, or will it stop running in this way and only run when an interrupt happens?