180 likes | 472 Views
Real Time Operating Systems. Group A2 Roland Hollis Rachit Gupta EJ Chambers. Guideline. Overview of Real Time Operating Systems Hard vs Soft POSIX Discussion about RTLinux How Real Time is it? In Depth about Real Time Operating Systems. What is a Real Time OS?.
E N D
Real Time Operating Systems Group A2 • Roland Hollis • Rachit Gupta • EJ Chambers
Guideline • Overview of Real Time Operating Systems • Hard vs Soft • POSIX • Discussion about RTLinux • How Real Time is it? • In Depth about Real Time Operating Systems
What is a Real Time OS? • "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 • System that has to perform its functions by responding to synchronous or asynchronous events within a specified amount of time.
Hard Real Time Meeting the deadline is absolutely critical E.g. Rocket controller Soft Real Time Occasionally allowed to miss deadlines E.g. Updating a video display Two Types of Real Time OS • So what happens in the case a Hard Real Time System does not meet a deadline? • Failure!
POSIX 1003.1 POSIX Standard 1003.1 defines “real-time” for operating systems as: • "Realtime in operating systems: the ability of the operating system to provide a required level of service in a bounded response time"
POSIX 1003.1 Con’t • It requires the following • Preemptive priority scheduling • Locking of virtual pages into memory • Real-time signals • Improved IPC • Improved timers • Linux only partially conforms to the above.
How RTLinux Works • Runs Linux kernel as lowest priority thread • Always preemptable • The Linux thread provides soft real time features and capabilities • RTLinux kernel provides hard real time tasks
Linux Thread • Executes only when no realtime tasks to run • Cannot really block interrupts, or prevent itself from being preempted. • Software emulation of interrupt hardware • Still is responsible for: • Booting System • Device Initialization • Blocking Dynamic Resource Allocation • Install components of RT system and keep RT system modular and extensible • Device Drivers, networking, file systems,
RTLinux Kernel • Designed to never wait for Linux to release any resources • Does not request memory, share spin locks, or synchronize on any data structures • Communication is non-blocking • Any thread willing to be blocked while waiting for a resource cannot have a RT constraint. • E.g. no malloc() or demalloc() • Provides direct access to the raw hardware.
Real Time Tasks • Execute with kernel level privileges • Have direct access to hardware • Maintain fixed allocations of memory for both code and data • Restricted from any Linux system calls or data structures • Floating point operations forbidden • Can communicate using RT-FIFOs
Mars Polar Lander • Non Realtime process read from a pipe controlled by a semaphore • A Real time process was blocked from writing to the pipe • Result?
Performance • Worst Case Interrupt Latency • 486/33MHz: 30 microseconds • Pentium 120: 20 microseconds
Conclusion • RT Linux has achieved hard real-time performance by making minimal changes to a freely available Operating System. • Provides an alternative to proprietary real-time systems which may be prohibitively expensive. • As Linux develops, RT Linux will also ride the wave of its development. • Unlike other RT systems, no separate support for RT Linux is needed since support for Linux is already widely available.
References • [1] Yodaiken, Viktor. The RTLinux Manifesto. Sept. 1997 • [2] Yodaiken, Viktor. RT – Linux Whitepaper. Oct. 1997. • http://www.dedicated-systems.com/encyc/publications/faq/rtfaq.htm • http://www.ddj.com/articles/1999/9911/9911b/9911b.htm?topic=unix
Real Time Operating Systems Any Questions?