Ironclad provides several schedulers that individual processes can set for use using the see get/set_scheduler syscalls.
Four schedulers are provided, two of them Real Time (RT) capable, two of them non-RT.
The non-RT ones are:
SCHED_OTHER
Default scheduling algorithm for every process created before being moved to a specific policy. The operating system reserves the right to change the algorithm used for this option, thus, users should not rely on any specifics about it.
SCHED_IDLE
For use with largely inactive processes (like daemons, or services). Just like
SCHED_OTHER
, we reserve the right to change the specifics.
The RT ones are:
SCHED_FIFO
The process will run in a first-in-first-out basis. Instead of niceness, this
policy uses priority, governed by the sched_param
argument of
set_scheduler
. Processes will be run until completion. To then go to the
next available RT process with higher priority, or, if none available,
non-RT tasks.
SCHED_RR
Similar to SCHED_FIFO
. Processes of equal priority will be run in a
round-robin fashion until time is freed by completion or explicit yielding or
sleeping.
All RT policies have implicitly higher priority than non-RT ones, meaning that the OS will interrupt other tasks in order to fulfill the requirements of RT tasks regardless of other factors, like system responsibity or stability. Thus, be sure you know what you are doing when using RT policies!
The range of priorities accepted by sched_param
is comprised of the
range between get_min_priority
and get_max_priority
.
see get_min/max_priority.