nerdexam
CompTIA

LX0-103 · Question #128

What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?

The correct answer is B. 19. Regular (non-root) users can only lower process priority by setting a nice value between 0 and 19, making 19 the maximum allowed value.

GNU and Unix Commands

Question

What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?

Options

  • A9
  • B19
  • C49
  • D99

How the community answered

(19 responses)
  • A
    5% (1)
  • B
    89% (17)
  • C
    5% (1)

Why each option

Regular (non-root) users can only lower process priority by setting a nice value between 0 and 19, making 19 the maximum allowed value.

A9

9 is a valid nice value a regular user can set, but it is not the maximum - users can go up to 19.

B19Correct

Nice values range from -20 (highest CPU priority) to 19 (lowest CPU priority). Regular users are restricted by the kernel to only increase the nice value (reduce priority), and they can set it as high as 19. Only the root user can assign negative nice values to increase a process's scheduling priority above the default of 0.

C49

49 exceeds the valid nice range entirely; the scale only goes up to 19.

D99

99 exceeds the valid nice range entirely; the scale only goes up to 19.

Concept tested: Process nice value limits for unprivileged users

Source: https://man7.org/linux/man-pages/man1/nice.1.html

Topics

#nice command#process priority#niceness value#process scheduling

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice