LX0-103 · Question #20
What is the default nice level when a process is started using the nice command?
The correct answer is B. 10. When invoked without an explicit value, the nice command applies a default niceness increment of 10 to the launched process.
Question
What is the default nice level when a process is started using the nice command?
Options
- A-10
- B10
- C20
- D0
How the community answered
(46 responses)- A4% (2)
- B91% (42)
- C2% (1)
- D2% (1)
Why each option
When invoked without an explicit value, the nice command applies a default niceness increment of 10 to the launched process.
-10 would increase scheduling priority (lower nice value means higher priority) and requires root privileges; it is not the default behavior of nice.
The nice command without a -n argument defaults to adding 10 to the process's niceness value. Since normal processes start at niceness 0, the resulting nice level is 10, which lowers the scheduling priority relative to standard processes. This default is defined by POSIX and implemented consistently across Linux distributions.
20 is the maximum niceness value representing the lowest possible scheduling priority and is not the default applied by nice.
0 is the baseline niceness of a normal process, not the default adjustment that nice applies - nice adds 10 on top of the inherited nice level.
Concept tested: Default niceness value of the nice command
Source: https://man7.org/linux/man-pages/man1/nice.1.html
Topics
Community Discussion
No community discussion yet for this question.