Getting Started with Real-time Operating Systems
Video link: https://atollic.wistia.com/medias/gwgee6ev93
RTOS Introduction
microcontroller
- before , 4~16K RAM, 8MHz CPU
- now, 16~32K RAM
we can build really cool stuff.
Round-Robin Scheduling
- pros
- cons
- Adding new task will change the real-time attribute (need to tune again)
- not the best for RTOS
Round-Robin scheduling improvement
With interrupts, we can change the current task.
Cooperative Scheduling
-
Read system time
- Run task1? yes: Task1, no: check next task
- Run task2? yes: Task2, no: read system time
-
procs
- only need to check all task end with the deadline
- can have interrupt
- can have hard real-time
-
cons
Task Concurrency
- Sequential Tasks
- Task 1
- Task 2
- Task 3
- Task 1
- …
- Concurrent Tasks
- Task 1
- Task 3
- Task 1
- Task 2
- Task 1
- …
RTOS Characteristics
A Real-Time Operating System (RTOS) is an operating system designed to manage hardware resources of an embedded system with very precise timing and a high degree of reliability.
- Example 6 characteristics
- Reliability
- Predictability
- Performance
- Compactness
- Scalability
- Multi-Tasking
- 7 Reason to choose an RTOS
- Concurrency
- Preemption
- a task to be interrupt by higher priority to run on the CPU
- In bare-metal, using preemption will make code too complex.
- Available RAM
- Available flash
- Sync tools
- 3rd party software
- Ease of use
FreeRTOS

Task Fundamentals

Create Task
Task States

FreeRTOS Resource
