Here are my notes on priority fields. I will also talk about how data is transferred using the ps command (which, among other things, gets data from / proc / pid / stat).
task_struct.prio: 0-99 -> Realtime 100-140 -> Normal priority ps/stat "prio" field: task_struct.prio - MAX_RT_PRIO (100) (-100)-(-1) -> Realtime 0-40 -> Normal Priority stat "rt_priority" field: 0 -> normal 1-99 -> realtime stat "policy" field: 0 -> SCHED_OTHER (normal) 1 -> SCHED_FIFO 2 -> SCHED_RR (realtime)
Mikek source share