Kernel scheduler has an algorithm and therefore implemented as a sequence of instructions. You can think of it as some black-box function/routine.
I think it is Not really a long-running background process. In Linux, I believe it is an on-demand routine, but not run on behalf of any process.
Background — Many familiar on-demand kernel routines do run on behalf of an “owner process” —
- accessing a file or socket
- accessing some device such as NIC
- accessing memory
However, other on-demand kernel routines (often interrupt handlers) do not have an “owner process”. Here are some routines —
- reacting to timer interrupts
- reacting to low-level emergency hardware interrupts like …. ?
So the scheduler is a classic example. I think scheduler can get triggered by timer interrupts. See P 350 [[linux kernel]]