How was the cpu scheduling of the process implemented?
Hello
I'd like to ask you about a library that implements CPU scheduling.
1. While studying scheduling-related system calls, I have a question.
1-1. I was wondering if developers put a system call in charge of CPU scheduling directly into the program file.
1-2. Or when compiler C compiles the program file, I was wondering if compiler would add a separate system call in charge of CPU scheduling.
1-3. The scheduling system call was implemented in the C library, so I couldn't see the scheduling system call with my eyes, but I was wondering if it was running.
Meanwhile, I got a hint from an internet document.
Scheduler-Related System Calls | The Linux Process Scheduler | InformIT
It said that the system call related to the scheduler will be implemented in Library C.
So when I looked at the library,
There were a lot of header files in one header file.
There were a lot of header files in those many header files.
Which library or header file implemented CPU scheduling?
Does the stdio.h file depend on the library, too?
When the compiler compiles the program source code, does it link the scheduling-related source code?
Thank you for reading it.
Thank you for your answer. I'd like to ask a question about this answer.
Thank you for your answer.
I'd like to ask a question about this answer.
1-1. I was wondering if developers put a system call in charge of CPU scheduling directly into the program file.
Yes.
If developers do not write a scheduling-related system call code in a program file, does the program's process not have CPU scheduling?
Professor, let me ask you one more question.
Professor, let me ask you one more question.
Thank you for teaching me that the CPU scheduler was a process, not a program source code in the kernel.
I've learned that CPU scheduler is not a separate process at school.
Until now, I learned that CPU scheduler is a passive program source code in the kernel.
And I learned that each process is frequently caught in an interrupt, enters kernel mode, and executes CPU scheduler code in the kernel on its own at school.
I have a question here.
Even if user processes are frequently interrupted and enter kernel mode due to hardware signals,
I didn't write the source code for the user process to execute the CPU scheduler source code in the kernel.
By the way, how do processes execute the source code of the CPU scheduler in the kernel?
That's why I asked this question.
I knew the CPU scheduler was built into the kernel, but it wasn't a passive source code, it was a separate process.
At school, I learned that CPU scheduler is not a separate process, but a source code built into the kernel.
Thank you for teaching me that the CPU scheduler was a process, not a program source code in the kernel.
Then, When entering PS-ef instructions into the shell,
what are the PID and CMD of the CPU scheduler process?