RTOS Fundamentals
RTOS Fundamentals
Real_Time_Operating_System
RTOS Scheduler
How the RTOS Scheduler Manages Task Execution ?
Time slicing : Ticks
B B
B B
Threads : Tasks
Task State
Ready State: When tasks are created, they enter the
ready state, indicating they are prepared to run
whenever the CPU is available.
- Running State: When a task is given CPU time, it enters the running state, but only one task can be
in this state at a time on a single-core system.
- Blocked State: Tasks can enter this state when waiting for specific events, like a timer delay using
vtaskdelay() or a semaphore. This task can’t be scheduled to run until the event is resolved and the
state is on ready.
Memory Allocation
Memory Management in RTOS: Static, Stack, Heap
Use Case 1 : Blinking LED
1 Task, Single core
See code
Use Case 2 : Receive UART & Echo
2 Tasks, Single core
Thank You