Home > Archive > Linux/Unix > July 2003 > Nice/renice





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Nice/renice
jayjay22

2003-05-28, 10:32 pm

Just want to confirm my understanding of this.

Nice is used to set the priority of a process(s) when you start the process. The default value is 10. -20 is the higest value, 19 is the lowest value.

Renice is used to adjust the priority of a currently running process.

What I'm not sure is when you renice and specify a value, does that value become the new nice value, or does it adjust the nice value from it's current value by the number I specify.

For example, if the current nice value is 10, and I renice -10. Should the new value be 0, or -10.

Thanks
Jason
Papiya

2003-07-10, 2:19 pm

Read the nice and renice man pages . . . this is an issue that, unfortunately, varies from distro to distro. Usually when you renice, the number you renice to is not the number that you set the nice value to but the real nice value I think is set to the difference between the two values. Again, check the man pages for your distro, as there are differences.
Boulware5

2003-07-10, 7:43 pm

quote:
Originally posted by jayjay22
Just want to confirm my understanding of this.

Nice is used to set the priority of a process(s) when you start the process. The default value is 10. -20 is the higest value, 19 is the lowest value.

Renice is used to adjust the priority of a currently running process.

What I'm not sure is when you renice and specify a value, does that value become the new nice value, or does it adjust the nice value from it's current value by the number I specify.

For example, if the current nice value is 10, and I renice -10. Should the new value be 0, or -10.

Thanks
Jason



From my understanding and experience, renice adjusts the nice value from it's current value. So...

renice -10 5432

Would raise the priority of the job with PID of 5432 up 10 notches

However,

nice -n 10 program
would start "program" with a nice of 10.

Got it now?
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2009 examnotes.net