Regarding the command:
nice -5 /usr/bin/prog
Which of the following statements is correct?
A.
/usr/bin/prog is executed with a nice level of -5.
B.
/usr/bin/prog is executed with a nice level of 5.
C.
/usr/bin/prog is executed with a priority of -5.
D.
/usr/bin/prog is executed with a priority of 5.
the default nice value is zero, so why is the answer not A??
The default value is +10. And the answer is not A (is B) because writing nice -5 will set a level +5 in the process. Setting –5 will set -5 as nice value.
I tested with top process, try it with >nice –5 top.
Correct me if I’m wrong.
in addition,if you want to run a process with minus level you should use –number for example nice –5 myprog…if you write nice -5 myprog you have run the program with nice level of 5