B. /usr/bin/prog is executed with a nice level of 5.
The -5 here indicates that the nice value is being increased by 5, which means that /usr/bin/prog will be less prioritized than other processes with lower nice values. The higher the nice value, the lower the CPU scheduling priority of the process. Remember that a negative nice value would require root privileges to apply, and it would mean a higher priority, not lower.
A. /usr/bin/prog is executed with a nice level of -5.
Explanation:
The nice command is used to execute a program with an adjusted scheduling priority (nice value). The nice value ranges from -20 to +19, where lower values indicate higher priority.
In the given command, nice -5 /usr/bin/prog, the value -5 is specified as the nice level. This means that the program /usr/bin/prog will be executed with a nice level of -5, indicating a higher priority compared to the default value (usually 0).
So, option A is correct: /usr/bin/prog is executed with a nice level of -5.
Isn't the default NICE level 0?
The first one is a nice value (niceness) which ranges from -20 (highest priority value) to 19 (lowest priority value) and the default is 0.
if the default nice level is 0 and we execute a nice -5, the result should be -5.
I'm I wrong? this is the second question i see about NICE levels and it seems everyone is assuming the default nice level to be 10 instead of 0. Can anyone clarify?
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
9866666
5 months, 1 week agoMPA3333
8 months, 1 week agoMPA3333
8 months, 1 week agoEliteAllen
11 months agoStrib
1 year, 5 months agoIvandrago
2 years, 11 months agovuk
3 years, 10 months agoBorbz
3 years, 9 months agoBorbz
3 years, 9 months agoFunkslinger
2 years, 9 months agoignou143
3 years, 12 months ago