linux 进程优先级设置

注意:一下均是非实时进程的优先级的设置


nice(1): 以指定优先级运行程序

nice [OPTION] [COMMAND [ARG]...]

nice –n 1 ls

renice(8): 调整运行进程的优先级

renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]

renice +1 987 -u daemon root -p 32

 

API

nice(2): 改变进程优先级

int nice(int inc);

getpriority(2): 获取优先级

int getpriority(int which, int who);

setpriority(2): 设置优先级

int setpriority(int which, int who, int prio);


posted on 2013-05-11 12:31  胡永光  阅读(315)  评论(0编辑  收藏  举报

导航