task_struct的每个值有什么区别?
task_struct的每个值有什么区别?
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)