Process Priority
p_nice
User-settable weighting factor (-20, 20)
- Negative numbers give higher priority
p_estcpu
Per-process estimated CPU usage
- Incremented whenever timer interrupt found process running
- Decayed every second while process runnable
- Where load is the sampled average of length of the the run queue plus short-term sleep queue over last minute
- The higher the load, the less p_estcpu decreases
Run queue is determined by p_usrpri/4 where
- Clipped at 127
p_slptime
p_estcpu
is not updated when the thread is asleep
When the thread becomes runnable again