My INSURER PTE LTD - Insurtech Innovation Award 2024
Rtos slides
1. Outline
Introduction
Requirements
Scheduling
Existing RTOS
Real Time Operating Systems (RTOS)
Presentation at the Seminar “Embedded System Architecture”
at the University of Innsbruck”
Christian Baumann
November 12, 2009
Christian Baumann Real Time Operating Systems (RTOS)
2. Outline
Introduction
Requirements
Scheduling
Existing RTOS
Introduction
Requirements
Scheduling
Static scheduling
Dynamic scheduling
Interrupt handling
Existing RTOS
Christian Baumann Real Time Operating Systems (RTOS)
3. Outline
Introduction
Requirements
Scheduling
Existing RTOS
Difference to ordinary OS
Time constraints
Precedence of processes often is important
Christian Baumann Real Time Operating Systems (RTOS)
4. Outline
Introduction
Requirements
Scheduling
Existing RTOS
Classification of real time systems [1]
Hard, e.g. nuclear reactor control system
Firm, e.g. food processing plant control system
Soft, e.g. real time animations of visual displays
Christian Baumann Real Time Operating Systems (RTOS)
5. Outline
Introduction
Requirements
Scheduling
Existing RTOS
Requirements [3]
Multi-tasking and preemptable
Dynamic deadline identification
Predictable synchronization
Sufficient Priority Levels
Predefined latencies
Task switching latency
Interrupt latency
Interrupt dispatch latency
Christian Baumann Real Time Operating Systems (RTOS)
6. Outline
Introduction Static scheduling
Requirements Dynamic scheduling
Scheduling Interrupt handling
Existing RTOS
Scheduling
Static scheduling: complete schedule is computed before
execution
Dynamic scheduling: uses priorities assigned to the processes
to dynamically decide the next executed process
Christian Baumann Real Time Operating Systems (RTOS)
7. Outline
Introduction Static scheduling
Requirements Dynamic scheduling
Scheduling Interrupt handling
Existing RTOS
Static scheduling
As-soon-as-possible (ASAP) scheduling: Processes are
executed at the earliest possible time
As-late-as-possible (ALAP) scheduling: Given an overall
latency constraint, it is equally possible to schedule processes
at the latest opportunity
Christian Baumann Real Time Operating Systems (RTOS)
8. Outline
Introduction Static scheduling
Requirements Dynamic scheduling
Scheduling Interrupt handling
Existing RTOS
List scheduling
Figure: List scheduling [4]
Christian Baumann Real Time Operating Systems (RTOS)
9. Outline
Introduction Static scheduling
Requirements Dynamic scheduling
Scheduling Interrupt handling
Existing RTOS
Dynamic scheduling
Rate-monotonic scheduling (RMS) or rate-monotonic analysis
(RMA)
Static priorities
Priorities are assigned in order of process periods
Process with the shortest period gets the highest priority
The feasibility condition of a system of processes using RMS is:
n
Ci √
n
≤ n( 2 − 1) (1)
Ti
i=1
√
lim n( n 2 − 1) ≈ 0.69
n→∞
Christian Baumann Real Time Operating Systems (RTOS)
10. Outline
Introduction Static scheduling
Requirements Dynamic scheduling
Scheduling Interrupt handling
Existing RTOS
Dynamic scheduling
Earliest deadline first scheduling (EDF)
Dynamic priorities
It has been showed that if a set of processes can be scheduled
by any algorithm, then it can be scheduled by EDF
The feasibility condition of a system of processes using EDF is:
n
Ci
≤1 (2)
Ti
i=1
Christian Baumann Real Time Operating Systems (RTOS)
11. Outline
Introduction Static scheduling
Requirements Dynamic scheduling
Scheduling Interrupt handling
Existing RTOS
Priority inversion
Figure: Priority inversion [4]
Christian Baumann Real Time Operating Systems (RTOS)
12. Outline
Introduction Static scheduling
Requirements Dynamic scheduling
Scheduling Interrupt handling
Existing RTOS
Solutions
Priority inheritance protocol: causes the process to execute a
critical section with the highest priority of any process that
shares the section
Priority ceiling protocol: the shared resources are assigned
priorities. Each resource gets a priority one higher than the
highest priority of the process that shares the resource. The
process that executes in the critical section inherits the
priority of the resource during execution.
Christian Baumann Real Time Operating Systems (RTOS)
13. Outline
Introduction Static scheduling
Requirements Dynamic scheduling
Scheduling Interrupt handling
Existing RTOS
Interrupt handling
The goal is to spend as little time as possible in the interrupt
handler. Otherwise the interrupt system could subvert the
scheduler.
Interrupt system provides its own priorities , determined by
hardware
Priorities are higher than the priorities of user level system
Interrupt hander are splint into:
Interrupt service routine (ISR)
Interrupt service thread (IST)
Christian Baumann Real Time Operating Systems (RTOS)
14. Outline
Introduction
Requirements
Scheduling
Existing RTOS
eCos [2]
Free, open source
Development host: Linux, Windows
Configuration tool to adapt RTOS (e.g. memory footprint,
scheduler
Two different schedulers:
Both support priority based scheduling with 32 priority levels
Bitmap scheduler: is somewhat more efficient and only allows
one thread per priority level
Multilevel queue (MLQ) scheduler: allows multiple threads to
run at the same priority
Christian Baumann Real Time Operating Systems (RTOS)
15. Outline
Introduction
Requirements
Scheduling
Existing RTOS
Windows CE [3]
Commercial RTOS, developed by Microsoft in the late 1990
Needs under a megabyte of memory
3 main development platforms (Windows Mobile, Windows
SmartPhone and Portable Media Center)
The scheduler supports priority based scheduling with up to
256 priority levels and round robin scheduling.
Priority inversion protocol
Fibers: is a unit of execution that must be manually scheduled
by the application
Equipment adaption layer
Christian Baumann Real Time Operating Systems (RTOS)
16. Outline
Introduction
Requirements
Scheduling
Existing RTOS
References
W. Ceneno and P. Laplante.
An overview of real-time operating systems.
JALA, pages 40–45, February 2007.
Anthony J. Massa.
Embedded Software Development with eCos.
Prentice Hall, 2003.
Ph.D. S. Baskiyar and N. Meghanathan.
A survey of contemporary real-time operating systems.
Informatica, 29:233–240, 2005.
Wayne Wolf.
High-Performance Embedded Computing.
Morgan Kaufmann Publishers, 2006.
Christian Baumann Real Time Operating Systems (RTOS)
17. Outline
Introduction
Requirements
Scheduling
Existing RTOS
Questions?
Thank you for your attention.
Questions?
Christian Baumann Real Time Operating Systems (RTOS)