another question about priority under Unix/Linux# Unix - 噫吁兮,危乎高哉
d*t
1 楼
I have a question about the scheduling policy used in Unix or Linux.
There are two system calls: setpriority() and nice(). The manual says both
can affect the priority. So I think their effect should be the same. But
when I run 'top' command, it displays PRI(priority) and NI(nice value), and
it seems there are no strong relationship between these two
values(processes with same nice value can have different priority,
and vice versa). Moreover, the priorities of the running processes keep
changing
There are two system calls: setpriority() and nice(). The manual says both
can affect the priority. So I think their effect should be the same. But
when I run 'top' command, it displays PRI(priority) and NI(nice value), and
it seems there are no strong relationship between these two
values(processes with same nice value can have different priority,
and vice versa). Moreover, the priorities of the running processes keep
changing