What is the default nice level when a process is started using the nice command?
A.
-10
B.
10
C.
20
D.
0
The Answer Is:
B
This question includes an explanation.
Explanation:
The default nice level when a process is started using the nice command is 10. This means that the process will have a lower priority than the normal processes, which have a nice level of 0. The nice command allows the user to adjust the priority of a process at the time of its execution. The syntax of the nice command is:
nice [-n {nice value increment}] [command]
The -n option specifies the nice value increment, which can be a positive or negative integer in the range of -20 to 19. The command is the name of the program or script to be executed. If the -n option is omitted, the default nice value increment is 10. For example, the following command will run the program ackermann with a nice value of 10:
nice ./ackermann
To verify the nice value of a running process, we can use the ps or top commands and look at the NI column. For example, the following command will show the nice value of the ackermann process:
ps -el | grep ackermann
References:
[How to Set Process Priorities With nice and renice on Linux], Topic: The nice Command.
[Nice and Renice Command in Linux with Examples], Topic: Working with nice and renice Command.
101-500 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 60% Discount on All Products,
Use Coupon: "8w52ceb345"