4

I was using the "top " command and I came across the nice value. I am aware of the priorities and how a nice value indicates the priority of a process. But I can't seem to figure out what the term "niced" or "un-niced" indicates.

3 Answers 3

4

Quoted from here.

Those terms simply refer to whether a process's default nice value has been changed. A "niced" process is one that has been run with the nice command (or whose niceness has been changed by renice) and an "un-niced" process is one that hasn't been run with nice. The default nice values for regular processes (those which haven't been run with nice command or whose niceness hasn't subsequently been changed by renice PID) is 0. So, "un-niced" processes are those with a nice value of 0 and "niced" processes are those with a nice value != 0.

4

"un-nice" isn't really well defined; we normally talk about the "niceness" of a process.

"Niceness" values range from -20 to +19 and default at zero.

Normal users can lower the priority of their process; increase the niceness value; eg nice -n 5 myprogram.

The root user can higher the priority of their process; reduce the niceness, and make them "un-nice"; eg nice -n -5 myprogram.

If a normal user tries to use a negative niceness then it's ignored.

1
  • I added an answer and there is a link to another resource in it. I had two different users giving a different explanation than yours which seems somewhat reasonable. Please consider that as well.
    – Alchemist
    Aug 15, 2016 at 7:17
2

Unniced processes are processes which haven't had their niceness level adjusted. Niced processes have had a niceness adjusted so that they allow other processes to get a greater share of CPU. (Real-time niceness allow the process to steal CPU from other processes. Setting a real-time niceness level for a CPU intensive process can freeze out other processes.)

The niceness of a process is a factor in calculating its priority. Process normally start with a niceness of 0. When running long-running, batch, or CPU intensive processes it is customary to set a niceness value to reduce it priority and be nice to other users.

Negative niceness values are intended for real-time processes as they will have a higher scheduling priority than normal processes. Multiple values allow administrators to set differing priorities for real-time processes.

Normal scheduling works on a round robin basis starting with the highest priority with processes waiting to be run. There may be priority based weighting so that lower priority tasks get some time slices even under full load.

2
  • I appreciate the answer but this doesn't answer the question of being niced or un-niced. It is specifically stated in the question.
    – Alchemist
    Aug 15, 2016 at 7:14
  • @Alchemist I believe the edit will answer your question.
    – BillThor
    Aug 15, 2016 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.