Linux is a cross-architecture kernel, often packaged in neat distributions. These distributions contain GNU software, which distributes the C standard library and common utilities.

soft real-time

Architecture

uses a FCFS and RR scheduler SCHED_FIFO, SCHED_RR priority range soft real-time 99 to 0 -100 to -1 normal niceness -20 to 19 0 to 39

priority -100 == real-time RT

Scheduling

Linux has a broad history of using different scheduling algorithms:

  • In Linux 2.4, it used a single scheduler for multiprocessor CPUs.
  • In Linux 2.6, it used a compromise scheduler between a global and per-CPU scheduler, with an complexity. The scheduler was able to re-balance per-CPU queues (taking a process from another CPU and assigning it to idle CPUs). It relied on “processor affinity” if a process wanted to be scheduled on the same core.
  • It currently relies on a completely fair scheduler, which permits good interactivity for foreground processes.
  • Linux also implements first-come-first-serve (FCFS) and round-robin (RR) scheduling, in SCHED_FIFO and SCHED_RR, respectively.

Soft real-time processes are always scheduled with the highest priority processes first. Normal processes have their priorities adjusted based on aging. Linux maintains a priority range (a Linux priority), between -100 and 39.

  • Soft real-time processes have a priority between 99 and 0. Their Linux priority is between -100 and -1.
  • Normal processes have a “niceness” between -20 and 19. Their Linux priority is between 0 and 39. The order these are described in matters.

Distributions