1 / 22

Introduction to Real-Time Operating Systems

Introduction to Real-Time Operating Systems. David Burnett. Schedule . RTOS Background Designing an RTOS Designing with an RTOS Solving Problems Real-Time Products. Background: What’s a “Real Time” System?. When correctness of results depend on content and time

lstrickland
Download Presentation

Introduction to Real-Time Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Real-Time Operating Systems David Burnett

  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 • 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: http://www.mnis.fr/en/support/doc/rtos/book1.html • 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 http://www.mnis.fr/en/support/doc/rtos/book1.html Embedded Design DMA Article http://www.ee.washington.edu/class/590/peckol/doc/upload/dma.pdf

  22. Other Sources http://developers.cogentrts.com/cogent/cogentdocs/gl-defs.html http://www.wordiq.com/definition/Real-time_operating_system http://www.embedded.com/story/OEG20011016S0120 http://www.amd.com/epd/desiging/fusionpartners/prodbytype/10.operating/41.rtos http://www.acceleratedtechnology.com/embedded/nuc_rtos.html http://www.qnx.com/ http://encyclopedia.thefreedictionary.com/pSOS http://www.mapusoft.com/latest_info/Port_from_pSOS.html http://www.elecdesign.com/Articles/ArticleID/3608/3608.html http://msdn.microsoft.com/embedded/ http://www.linuxworld.com.au/index.php/id;1032707288;fp;16;fpid;0 http://www.linuxdevices.com/articles/AT7794196024.html http://www.linuxgazette.com/node/view/115 http://www.ose.com/products/product.php?product_id=10

More Related