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
Can't preemptive
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
Bara-metal or RTOS
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.