I have been trying to understand the linux nice and priority system, from my understanding a processes NI or nice level is essentially how friendly it is to other processes in terms of fair use of system resources such as the CPU in particular, and that the Nice scale ranges from -20 to 19 where -20 is a less nice as it has a bigger share of the CPU etc.
However I don't quite understand the priority side of this, in particular the ranges for real time processes and user processes and what I'm supposed to do with the PR scale which ranges from 0-99 and 100-139, my questions are:
- what does process priority mean?
- how can I use the PR scale of 0-99 and 100-139?
- how can I calculate a processes PR level?
- what are 'real-time' processes and 'user processes'?
- why are the Priority scales of 0-99 and 100-139 used and how can they be used in regards to process priority?