Вы находитесь на странице: 1из 21

Real Time Operating Systems

What are Real Time Systems

● RTOS, a real time system, involves both the


logical correctness of output and their
timeliness
● It must satisfy bounded response-time
constraints.
What is Real Time?

“A real time system is one in which the


correctness of the computations not only
depends upon the logical correctness of the
computation but also upon the time at which the
result is produced. If the timing constraints of
the system are not met, system failure is said to
have occurred.”
- Donald Gillies
RTOS Classification
● Hard real-time system
Failure to meet response-time constraints leads to
system failure
● Firm real-time system
With hard deadlines, but where a certain low
probability of missing a deadline can be tolerated
● Soft real-time system
Where performance is degraded but not destroyed
by failure to meet response time constraints
Hard vs. Soft Real Time

● Hard
● guaranteed worst-case response times
● absolutely, positively, first time every time
● Soft
● Kind of, sort of, usually
RTOS features
● It should be POSIX 1003.1b (formally 1003.4)
complaint
● Ability to schedule tasks in a manner to meet
time deadlines
● Small size and small overheads
What makes a good RTOS?


Multi-threaded and pre-emptible

Thread priority has to exist because no
deadline driven OS exists

Must support predictable thread
synchronization mechanisms

A system of priority inheritance must exist
...What makes a good RTOS?
● Predefined latencies
RTOS must have defined/calculated:
● task switching latency (context switch time)
● interrupt latency (time from interrupt to task run)
● Interrupt dispatch latency (time needed to go from
interrupt level to task level)
RTOS Kernel Functions
Scheduling algorithms...
For static real-time systems, task execution
time can be estimated prior to execution and
resulting task schedules can be determined off-
line
● Rate Monotonic (RM) scheduling
● Assigns different priorities to tasks proportional to
their frequency of occurrence
● It does not support run-time priority change
exposing changes of priority inversion
...Scheduling algorithms
● Earliest Deadline First (EDF)
it is used for both static and dynamic real time
scheduling
● Many variant of this scheme exist in RTOS
Example RTOS’s
● LynxOS
www.lynuxworks.com
● Vxworks
www.windriver.com
● RTLinux
www.fslabs.com
● RTAI (Real Time Application Interface)
www.rtai.org
● Micrium µc-OS II
http://www.ucos-ii.com/
● QNX Neutrino
http://www.qnx.com/
Hard real time RTOS: LynxOS
● POSIX compatible, multi-process, multi
threaded OS for complex real-time apps
● Micro-kernel based architecture with core size
28kb (Lynx OS 3.0). Core consist of scheduling,
interrupt dispatch and synchronization
● Optional support for TCP/IP streams, I/O and
file systems, sockets etc
● Single source tree for various processor archs
● Thread priority levels upto 512
● Thread switch latency 4 μs to 19 μs
...Hard real time RTOS: LynxOS
Used in :-
● Flight simulator of Airbus A380

● Telecom equipments like modems etc.


VxWorks
● Most widely adopted RTOS
● Available for all popular CPUs
● Upto 256 priority levels
● Microkernel based architecture
● Deterministic context switching
● Supports preemptive and round robin
scheduling
● Optional support for tcp/udp and BSD sockets
RTLinux
● Architecture supported
● i386, PPC, ARM.
● POSIX 1003.13 compliant
● 256 priority levels
● GPL license as well as proprietary licensed
● Current status
● Development stalled at v. 3.1 in 2001.
RTAI
● POSIX compliant
● A real-time extension for the Linux kernel
● Supported platforms
● i386, MIPS, PPC, ARM, m68k-nommu
● Multiprocessor support available for i386
● 255 executive kernel priority levels
● Patent mostly GPL2 but it's not clearly stated
● TCP/IP support is provided by RTNet module
Micrium µc-OS II
● Preemptive, real-time deterministic
● Multitasking kernel for microprocessors,
microcontrollers and DSPs
● Proprietary license, free for non commercial
use
● TCP/IP supported
● Supported architectures
i386, ARM (7,9, cortex-M3), ATMEL (AVR, AVR32)
etc
QNX
● POSIX compliant, proprietary license
● Micro kernel based architecture
● Supported platforms
● Intel 8088, x86, MIPS, PowerPC, ARM, Xscale etc
● TCP/IP module ported from NetBSD
● Device drivers are also ported from NetBSD
● Home page
www.qnx.com It's now owned by RIM
References
● RTLinux and RTAI Licenses
http://www.linuxfordevices.com/files/misc/ripoll-rtl-v-rtai.html
● Survay of RTOS
http://www.ece.stevens-
tech.edu/~ymeng/courses/CPE555/papers/rtos_paper .pdf
Real Time Operating System

Questions and Discussion

Вам также может понравиться