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?
This section is not available anymore. Please use the main Exam Page.LFCS Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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
10 months, 2 weeks agoMPA3333
1 year, 1 month agoMPA3333
1 year, 1 month agoEliteAllen
1 year, 4 months agoStrib
1 year, 10 months agoIvandrago
3 years, 4 months agovuk
4 years, 3 months agoBorbz
4 years, 2 months agoBorbz
4 years, 2 months agoFunkslinger
3 years, 2 months agoignou143
4 years, 5 months ago