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??
0
4
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.
4
0
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
2
0
giving a -5 nice level will give a 15 priority
nice default value is 10 but niceness of a programm running if you didn’t use nice is 0 that means his prioriy is 20
0
3