Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Real-Time Operating Systems

Similar presentations


Presentation on theme: "Introduction to Real-Time Operating Systems"— Presentation transcript:

1 Introduction to Real-Time Operating Systems
David Burnett wtf?

2 Schedule RTOS Background Designing an RTOS Designing with an RTOS
Solving Problems Real-Time Products

3 Background: What’s a “Real Time” System?
When correctness of results depend on content and time Hard or Soft: indicates how forgiving the system is

4 What makes an OS Real-Time?
Predictable (possibly deterministic behavior), that’s all Not necessarily fast Byproduct: mediocre throughputs

5 How do they work? Tasks are scheduled by OS according to fixed priority (typically) Tasks can’t directly interact; they use messages or shared memory & semaphores to communicate

6 Designing an RTOS: Typical Features
Many POSIX Specs Exist No virtual memory (swap file) Shared memory capabilities High-resolution timer(s) Real-time signals/QoS

7 Designing an RTOS: End Goal
Have known switching & scheduling overhead Avoid common problems like priority inversion and deadlock

8 Designing an RTOS: Common Problems
Priority inversion High-level task stalled due to low-level using shared resources, then a medium-level task holding up the low-level one Solution: Priority inheritance – give low-level task high-level priority Mars Pathfinder had this problem

9 Designing an RTOS: Common Problems (con’t)
Deadlock Two semaphores locked out of order by two tasks and circularly block each other Solution: “Instant Inheritance” implementation of Priority Ceiling Protocol – semaphores possibly needed by higher processes become priority tokens

10 Designing with an RTOS: What do you need?
Task information Priorities for each task Worst-case runtime Best-case period Interference information Deadline Monotonic Analysis (DMA) calculations

11 Designing with an RTOS: Interference via DMA
Finding maximum interference value requires several bits of information: How often & for how long higher tasks will step in How often & for how long lower tasks will use higher semaphores to step in How often & for how long the OS scheduler will check on things (depends on number of tasks) How long the task switcher takes

12 Designing with an RTOS: Interference via DMA(con’t)
Add everything up: acceptable? Yes: that’s nice. No: find a faster OS or CPU, clean your code, etc.

13 Solving Problems Logs Time Machines Memory Conservation

14 Real-Time Products VxWorks Support for equal priority
Uses both priority-based preemption or round-robin scheduling Basic set of task communication No memory protection Includes pSOS support

15 Real-Time Products QNX Small memory footprint
Uses S/R/R task messaging Dynamically start & stop filesystems, network, serial, etc. Bootable from ROM VxWorks-compatible

16 Real-Time Products QNX4 QNX6 (aka Nucleus) Runs on x86 hardware
Support for tons of peripherals QNX6 (aka Nucleus) Runs on a variety of architectures, optionally without an MMU Increasing peripheral support Tiny memory footprint “Photon” window manager

17 Real-Time Products Linux Is Linux Runs on anything, even toasters
Hardware support for anything Isn’t technically real-time, but can be

18 Real-Time Products Compared to something like QNX:
Lacks easy ROM booting Lacks driver priority control Can emulate S/R/R message style Patches can make kernel preemptible and improve timer resolution, so that’s nice

19 Real-Time Products Lots of details about the following RTOSes available at: Linux RTLinux RTAI RTEMS QNX VxWorks LynxOS And that’s not all!

20 Conclusion Buying an RTOS is worth it

21 As Always, There’s More Information Available
More RTOS Details Embedded Design DMA Article

22 Other Sources


Download ppt "Introduction to Real-Time Operating Systems"

Similar presentations


Ads by Google