What is 'PRI' and 'NI' column in 'ps -eaf' output ?

How does these parameter affect the processing and scheduling of the process? Can I get a example to understand it in better way ?
beer9Asked:
Who is Participating?
 
LinuxNtwrkngConnect With a Mentor Commented:
PRI = priority
NI= nice

Nice and priority are inversely related.  The higher the nice value, the lower the priority the process will execute with.
0
 
beer9Author Commented:
what are the range for priority a process can have ?

for nice i think it should be -20 to +20.
0
 
LinuxNtwrkngCommented:
Priority ranges from 0 to 127

Lower the number, the higher the priority
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
LinuxNtwrkngCommented:
Oh.. and you were right about the nice range
0
 
omarfaridConnect With a Mentor Commented:
the operating system allocate resources (cpu in particular) and pick the next process to occupy the cpu based on the priority. The process priority is changing and this is done by OS. The higher the priority the more cpu the process will get. the nice value influence the priority of a process. The user root can set priority of any process as well as the nice value. The owner can only lower the priority of his processes.
0
 
LinuxNtwrkngCommented:
Unless you have further questions about this, please close the question.

Thanks
0
 
beer9Author Commented:
Excellent!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.