课程: Linux CentOS 7: Shells and Processes
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Process priority
- [Narrator] Linux process priorities are handled by a system called nice. Nice levels go from -1 to -19 for privileged users. The scale goes from 0 to 19 for nonprivileged users. The default nice lever is zero. When a process is started it has a default nice level. The nice level is the number that reflects how nice the process is to the CPU. The nicer a process is to the CPU, the less it interrupts it and the lower it's priority is. Because the process is getting fewer resources from the CPU, it also has lower priority. This means other processes will get more CPU time than it will. If the nice level is less than zero then it is less nice to the CPU and demands more resources from it. Thus having a higher priority for CPU time. In summary, the higher the nice number, the lower the CPU priority. The lower the nice number, the higher the CPU priority. Let's go to terminal to see how this works. If we want to start a…