Real-time scheduling class
Linux supports soft real-time tasks and they are scheduled by the real-time scheduling class. rt
processes are assigned static priorities and are unchanged dynamically by the kernel. As real-time tasks aim at deterministic runs and desire control over when and how long they are to be scheduled, they are always given preference over normal tasks (SCHED_NORMAL
). Unlike CFS, which uses rb tree
as its sub-runqueue, the rt
scheduler, which is less complicated, uses a simple linked list
per priority value (1 to 99). Linux applies two real-time policies, rr
and fifo
, when scheduling static priority processes; these are indicated by the policy
element of struct task_struct
.
SCHED_FIFO
(1): This uses the first in, first out method to schedule soft real-time processesSCHED_RR
(2): This is the round-robin policy used to schedule soft real-time processes
FIFO
FIFO is a scheduling mechanism applied to processes with priorities higher than 0 (0 is assigned to normal processes)...