Linux Administration
medium

Questão de Linux Administration #019e3987

Enunciado da Questão
Linux Administration
#nice
#nice-value
#process-priority
#scheduling
Médio

Regarding the command:

nice -5 /usr/bin/prog

Which of the following statements is correct?

A

/usr/bin/prog is executed with a nice level of -5.

B

/usr/bin/prog is executed with a nice level of 5.

Correta
C

/usr/bin/prog is executed with a priority of -5.

D

/usr/bin/prog is executed with a priority of 5.

Explicação Oficial / Explicações da Comunidade

The nice command in Linux is used to run a program with a modified scheduling priority. The nice value ranges from -20 (highest priority) to 19 (lowest priority). The command nice -5 /usr/bin/prog sets the nice value to 5, meaning the process runs with a lower priority than the default (which is 0). The syntax nice -n 5 or nice -5 both set the nice value to 5. Note that the argument after nice is the increment to the nice value; a positive number lowers priority, while a negative number raises priority (requires root privileges). Therefore, /usr/bin/prog is executed with a nice level of 5.