nerdexam
CompTIA

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.

GNU and Unix Commands

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)
  • A
    4% (2)
  • B
    91% (42)
  • C
    2% (1)
  • D
    2% (1)

Why each option

When invoked without an explicit value, the nice command applies a default niceness increment of 10 to the launched process.

A-10

-10 would increase scheduling priority (lower nice value means higher priority) and requires root privileges; it is not the default behavior of nice.

B10Correct

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.

C20

20 is the maximum niceness value representing the lowest possible scheduling priority and is not the default applied by nice.

D0

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

#nice#process priority#niceness#scheduling

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice