Conceptually, there is a list of runnable processes associated with each static priority level. These lists can contain both SCHED_FIFO
and SCHED_RR
processes - the two scheduling policies share the same set of static priorities.
When selecting a process to run, the scheduler takes the process at the head of the non-empty list with the highest static priority, regardless of the scheduling policy of that process.
The scheduling policies affect how the processes move within those lists. For SCHED_FIFO
, once a process reaches the head of the list for a given priority it will stay there until it blocks or yields. For SCHED_RR
, a runnable process that has exceeded its maximum time quantum will be moved to the end of the list for its static priority.