I looked up the CPU scheduler source code built into the kernel.https://github.com/torvalds/linux/tree/master/kernel/sched
But I have a question.There are mixed opinions on the cpu scheduler on the Internet.
- I saw an opinion that CPU scheduler is a process.
Question: If so, when ps-ef on Linux, the scheduler process should be visible. It was difficult to find the PID and name of the scheduler process.The PID for the CPU scheduler process is not on the internet either. However, the PID 0 SWAPPER process is called SCHED, but in Linux, PID 0 functions as an idle process.
- I saw an opinion that CPU scheduler is not a process.CPU scheduler is a passive source code built into the kernel, and user processes frequently enter the kernel and rotate the source code.
Question: How does the user process execute the kernel's scheduler source code on its own?What if you created a user program without adding a system call using the scheduler of the kernel?How does the user process self-rotate the scheduler in the kernel without such code?