3
I know that non-root users can renice a process up, but not renice a process priority down.
$ nice yes >/dev/null & p=$!
$ renice 15 -p $p
8414: old priority 10, new priority 15
$ renice 12 -p $p
renice: 8414: setpriority: Permission denied
$ kill $p
I understand that as a non-root user I should not have the ability to (re)nice a process into negative nice territory, or that root may have started a process on my behalf at a higher nice level.
The question is for what logical reason can a non-root user not renice their own processed downward, even if just no further down to the original priority in which it was instatiated?
Should we not consider nice values [-20,-1] to be system priorities vs. the user 'space' [0,19] I get what you're saying but I'm of the recent persuasion that user processes should be able to re-prioritize themselves or their children...at least from a base priority set by root? – Jé Queue – 2009-12-28T17:07:13.220
Yes but the root user may realize the base priority was too high and reprioritize all of a certain users processes (
renice -u user...
). I've seen my school's sysadmin do something similar to our processes when he was running batch jobs so it would finish faster. – John T – 2009-12-28T17:38:26.760