摘要: 可以通过改变进程的优先级来保证进程优先运行。在 Linux下,通过系统调用 nice()可以改变进程的优先级。nice()系统调用用来改变调用进程的优先级。函数声明如下:引用#include <unistd.h>int nice( int increment );getpriority() 和 setpriority() 两函数的声明:引用#include <sys/resource.h>int getpriority( int which, int two );int setpriority( int which, int who, int prio );getpri 阅读全文
posted @ 2011-03-15 23:10 夏大王 阅读(902) 评论(0) 推荐(0) 编辑