Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scheduling

The scheduler assigns work to resources that complete the work. In the following Real-time operating System (RTOS) scheduler will be discussed.

Scheduling Concepts

To provide concurrency, different scheduling concepts, essentially distinct into cooperative- and pre-emptive. More information on Algorithms.

Cooperative Scheduling

In cooperatively designed Multitasking concepts a context switch is performed when a task suspends itself via taskYIELD().

...

In poorly designed systems a Task can consume all CPU time for itself (e.g. extensive calculations, busy waiting, etc.) which causes a System Freeze. This is why most systems are designed pre-emptive.

Pre-emptive Scheduling

The freeRTOS Kernel can temporarily interrupt a task with the Intention of resuming later. In the meantime the freeRTOS Kernel can give the processor capacity to another Task. This method is called context switching and the System that carries out the Interrupt is called scheduler.

The time a process is allowed to use the CPU core is called "time slice" and is critical to balance system performance vs process responsiveness.

...