What is special about a negative nice value?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

What is special about a negative nice value?

Explanation:
A negative nice value means you’re asking the scheduler to treat the process with higher priority. Linux uses a niceness scale from -20 (highest priority) to 19 (lowest). Lowering niceness (giving it a negative value) increases the process’s CPU time share, i.e., raises its priority. That kind of change is privileged: regular users can only increase niceness (make it less favorable). To set a negative value, you typically need elevated privileges such as sudo or root. That’s why the statement about requiring sudo is the correct one.

A negative nice value means you’re asking the scheduler to treat the process with higher priority. Linux uses a niceness scale from -20 (highest priority) to 19 (lowest). Lowering niceness (giving it a negative value) increases the process’s CPU time share, i.e., raises its priority. That kind of change is privileged: regular users can only increase niceness (make it less favorable). To set a negative value, you typically need elevated privileges such as sudo or root. That’s why the statement about requiring sudo is the correct one.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy