Objective 6: Modify Process Execution Priorities
One of the features of Linux is that the administrator has the ability to prioritize process execution. This feature is handy when you have a high load machine and want to make sure special processes (like yours!) get more rights to use system resources than others. It also is useful if you have a process that's gone haywire and you want to debug the problem prior to killing it. On the flip side, you can bury non-essential processes giving them the lowest priority so they don't ever conflict with other processes. (Particularly useful when participating in experiments to search for extraterrestrial intelligence with SETI@home.)
Generally, on a day-to-day basis, you don't need to worry about execution priority because the kernel handles it automatically. Each process's priority level is constantly and dynamically raised and lowered by the kernel according to a number of parameters, such as how much system time it has already consumed and its status (perhaps waiting for I/O—such processes are favored by the kernel). Linux gives you the ability to bias the kernel's priority algorithm, favoring certain processes over others.
The priority of a process can be determined by examining the PRI column in the results produced from issuing either the top or ps -l commands. The values displayed are relative; the higher the priority number, the more CPU time the kernel offers to the process. The kernel does this by managing a queue of processes. ...
Get LPI Linux Certification in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.