Embedded and Realtime Operating Systems The suitability of
Embedded and Real-time Operating Systems The suitability of Linux
Operating Systems • Before looking at embedded and real-time it would be good to review the role and position of the OS – Started after BIOS – Controls all application interaction with hardware – Generally is the kernel • Role of file system(s), libraries, and applications – Is always memory resident in kernel space – Interface is through system calls for user processes
Real-time requirements #1 • Real-time systems can be classed as hard and soft – Hard real-time systems must meet processing deadlines, data must/cannot be missed/ignored. The system is safety critical, i. e. medical systems, military systems. – Soft real-time systems have real-time data but can afford to miss some data, force re-transmissions and don’t need to be too strict about deadlines. For example audio or video streaming – Many systems are a mix of above – the data is realtime, but there are tolerances in the system. White goods equipment, engine management.
Real-time requirements #2 • There are 2 major requirements for real-time systems: latency and jitter – Latency is the amount of time required to service a real-time task. The task must be dealt with immediately, complete and cannot be interrupted by the operating system. For example a bar code read. – Jitter is periodic but crucial data. The data rate can be very short and unpredictable, so data could be lost. An example could be any sensor reading in a realtime environment. • A system could involve both of these requirements
Standards • The POSIX standard are for Portable Operating Systems. They are a set of graded standards for UNIX like OSs. They are supported by various governments (i. e. US), IEEE and ISO. • POSIX 1003. 1 d – Set of real-time extensions to UNIX like operating systems
Review of commercial real-time systems Operating System POSIX ? CPUs supported Latency average/Max microseconds VXWORKS Yes ARM, Pentium, PPC, M 68 K 1. 7 – 6. 8 WINCE. NET No ARM, Pentium, PPC, MIPS, SH 2. 4/5. 6 QNX Neutrino OS No ARM, Pentium, PPC, MIPS, SH 1. 6/4. 1 p. SOS System 3 Yes PPC, MIPS 1. 9/3. 8
Linux Version Range Period 0. 02 - 0. 99 October 1991 - March 1994 1. 0. 0 - 1. 3. 100 March 1994 - May 1996 2. 0. 0 - 2. 0. 39 June 1996 - January 2001 2. 1. 0 - 2. 1. 129 September 1996 - November 1998 2. 2. 0 - 2. 2. 22 January 1999 - September 2002 2. 3. 0 - 2. 3. 99 May 1999 - May 2000 2. 4. 0 - 2. 4. 27 January 2001 - September 2005 2. 5. 0 - 2. 5. 50 November 2001 - December 2002 2. 6. 0 - 2. 6. 11 March 2003 - September 2005
Real-time Linux? • From version 2. 5. 4 Robert Love introduced a patch that allowed pre-emption in the kernel. – This means that higher priority task can interrupt (preempt) lower priority ones. • This is now standard in the 2. 6 kernels • It allows Linux, as standard, to run soft real-time tasks (e. g. streaming video) with a latency of 1 millisecond (100 s MHz Pentiums).
Pre-emptable Linux Kernel
Micro kernels • The other versions of real-time Linux involve major patches to the existing systems • RTLinux and RTAI linux are both micro-kernel patches. • This means that the kernel is run as a low priority task from the micro-kernel • Thus the micro-kernel can interrupt the Linux kernel to run a real-time task. • These versions can run the POSIX 1003. 13 version of real-time.
Micro-kernel real-time architecture
Nano-kernels • This was developed by ADEOS as an open source real-time Linux – The micro kernel approach has been patented. • This system runs various tasks and operating systems from a micro-kernel – It is rather similar to VMWare
Nano kernel real-time architecture
Resource kernel • This is a modification to the standard kernel that allows high speed pre-emption. • The resource kernel allows tasks to request and control resources (memory, CPU cycles) that a normal kernel would not allow. • Can’t reach hard real-time latencies.
Resource kernel real-time architecture