Solved

What is the relation of nice and priority in Linux?

Posted on 2011-09-23
1
326 Views
Last Modified: 2012-05-12
Hello, I would to understand the relationship of nice and priority in Linux, as per my current knowledge the nice value range is 19 to -20, where -20 is the highest number to set for high priority CPU scheduling. Could someone please explain me how is the priority number is affected by the nice value? Thanks!
0
Comment
Question by:beer9
1 Comment
 
LVL 9

Accepted Solution

by:
_3mp3ror_ earned 500 total points
ID: 36590800
The nice command allows programs to be started at a lower or higher than normal scheduling priority.
This allows you to control which processes the kernel should favor when dividing processor time among running programs.
Processes with the lowest nice number are executed with the highest priority and vice versa.

On most systems, priority levels for normal users range from 0 to 19, with 0 being the highest priority and 19 being the lowest priority. The root user can create processes with a range of -20 (highest) to 19 (lowest).
Most programs start with a nice level of 0 by default. Critical system services usually have a negative nice level so that they are always given preference over user programs.

This quote  is from a realy good book which is free btw. If you are new to linux commands I highly recommend it.
http://dontfearthecommandline.blogspot.com/
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now