- Scheduling Algorithms.
FreeRTOS-Kernel supports the following 3 scheduling algorithms:
- Prioritized Preemptive Scheduling with Time Slicing
- Prioritized Preemptive Scheduling without Time Slicing
- Co-operative Scheduling
The required FreeRTOSConfig.h settings are:
#define configUSE_PREEMPTION 0
When the co-operative scheduling is used, a context switch will only occur when the Running task enters the Blocked state, or the Running task explicitly yields (manually requests a re-schedule) by calling taskYIELD(). Tasks are never preempted, so time slicing cannot be used.
-
Execute the following commands from the root of the repository to build:
rm -rf build mkdir build cd build cmake -B . -S ../source/ -DTUTORIAL=8 make
-
Execute the following command to run the binary:
./freertos_example
-
Understand the output.