简体   繁体   中英

How does niceness level affect process scheduling in CentOS 5 (kernel 2.6.18)?

How does niceness level affect process scheduling in CentOS 5 (kernel 2.6.18)? Is there any deterministic mapping between the niceness level and the CPU percentage assigned to one process? If I want to check CentOS 5 Process Scheduling algorithm, where can I find the source code of the scheduler? Or is there any tutorial explain this?

Thanks!

There cannot be a deterministic relation between niceness level and CPU percentage, because the scheduling of processes (or tasks, ie processes or threads) is obviously dependent upon their overall activity (so the activity of a process A impacts the scheduling of another process B).

Likewise, in a crowd walking thru a gate you cannot relate the speed of an individual member to the gate flow. You could study thermodynamics to learn much more.

If there is a relation, it is probabilistic, and a statistical approach would be better (but very very complex to formulate and to solve).

The scheduler is inside the kernel source. The kernel tree has a Documentation/scheduler/ directory and several kernel/sched*.c files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM