Linux Priorities + Nice (confused)
Real-time scheduling offers priorities 1 (low) to 99 (high). Non-realtime has default of 0, thus lower than lowest RT priority.
Nice value applies to only non-RT processes. The larger the nice value is, the nicer a process is. Am I correct so far?
I'm mainly interested in RT processes now. I see online discussion talking about use of /proc/PID/stat to get priority value, which has a range of -2 to -100 for RT.
This is what confused me - how do we map -2 to -100 into 1 to 99? Is -100 considered the lowest priority thus would map to 1, and -2 would map to 99 [essentially adding 101 to the negative range and we'd get to the proper +ve range]?
Finally, does anyone else find this confusing? I mean, would it be more straightforward if Linux defines say two classes - RT and non-RT, and have 1 single range to describe all priorities?
|