Linux Administration
medium

Pregunta de Linux Administration #019e3987

Enunciado de la Pregunta
Linux Administration
#nice
#nice-value
#process-priority
#scheduling
Medio

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.

Correcto
C

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

D

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

Explicación Oficial / Explicaciones de la Comunidad

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.