当前位置: 技术问答>linux和unix
在LINUX下,怎样设置进程的优先级呀
来源: 互联网 发布时间:2015-01-06
本文导语: 同上 | nice命令 普通用户只能降低自己进程的优先级 函数调用 nice setpriority | If you are using X windows. Enter /etc/rc.d/rc5.d You can see that the filenames are started as 'k' or 's',...
同上
|
nice命令
普通用户只能降低自己进程的优先级
函数调用
nice
setpriority
普通用户只能降低自己进程的优先级
函数调用
nice
setpriority
|
If you are using X windows.
Enter /etc/rc.d/rc5.d
You can see that the filenames are started as 'k' or 's', meaning 'start' and 'kill'.
When you enter or exit a run-level, the system will kill the processes of the present run-level as the order of 'k' numbers ,then start the processes of the target run-level
as the order of 's' numbers.
So if you change the numbers in the filenames ,you can easily set the proirities or
privileges of your processes.
Be careful ! You can simply destroy your system by doing this !
Enter /etc/rc.d/rc5.d
You can see that the filenames are started as 'k' or 's', meaning 'start' and 'kill'.
When you enter or exit a run-level, the system will kill the processes of the present run-level as the order of 'k' numbers ,then start the processes of the target run-level
as the order of 's' numbers.
So if you change the numbers in the filenames ,you can easily set the proirities or
privileges of your processes.
Be careful ! You can simply destroy your system by doing this !