21 Real-Time Operating Systems

Total Page:16

File Type:pdf, Size:1020Kb

21 Real-Time Operating Systems 21 Real-Time Operating Systems This section is devoted to real-time operating systems (RTOS) for supporting applica- tions with real-time requirements. In these applications, most real-time requirements are derived form the physics of the environment that is being controlled or monitored and this implies that most real-time systems are embedded computer systems, and that an RTOS has to provide facilities for supporting embedded applications. There are many commercial products that can be categorized as an RTOS, even though there is a wide range of products, from very small real-time kernels for small embedded ap- plications with a memory footprint in the few kilobytes range, to the large multipur- pose systems controlling a very complex real-time system. Despite this broad range of systems, an RTOS always has the property of being able to provide the required level of service with bounded response times. In the past and even today, many real-time applications were built without an oper- ating system. They were usually simple applications with a simple cyclic scheduler and some interrupt driven routines, and with all the I/O drivers written directly by the application developer. However, with the cost and power of computers today, real- time applications are much more complex, and require full concurrency support, ad- vanced scheduling services, networking, advanced memory management, time man- agement, and in some cases even graphical user interfaces and file systems for secon- dary storage. These are the services typically provided by operating systems, and this has made their use more important in real-time systems. It is expected that this ten- dency will continue in the future. In this section we will present a cross section of the most important commercial RTOS’s available today, and we will also discuss the standards that play a major role in operating systems for real-time embedded applications. Some of these standards are recognized by international bodies, while others are industry standards. In both cases, they belong to a community of users and developers, and not to individual companies. The role of standards in operating systems in general is very important as it pro- vides portability of applications from one platform to another. With the constant evo- lution of hardware it is very important to be able to port an application that was de- veloped for a particular platform into new hardware platforms. The programmers are also easily transferred between platforms because the standard imposes a particular model of the system’s application program interface. In addition, standards open the door to the possibility of having several OS providers for a single application or com- pany, which promotes competition among vendors and increases quality and value. There are few real-time operating system standards that specify or facilitate port- ability at the binary code level. The reason is that in real-time systems there are many kinds of processor architectures, from very small embedded systems to very large processors handling large amounts of data. Binary code portability is usually only practical for families of processors with the same programming architecture. There- fore, current operating system standards mostly specify portability at the source code Artist FP5 Consortium: Embedded Systems Design, LNCS 3436, 258 – 286, 2005. © Springer-Verlag Berlin Heidelberg 2005 21.1 Landscape 259 level, requiring the application developer to recompile the application for every dif- ferent platform. Portability in real-time systems is not complete with current technology. The inter- face between the software and the hardware devices, mostly encapsulated inside the device drivers, is usually non-portable. And in embedded real-time systems it is usual to access special hardware that requires custom-developed drivers. In many systems this can be a significant part of the overall software development. Still, the majority of the application is usually outside the device drivers and can be made portable if de- veloped to comply to one of the standards. Another source of non portability is that in real-time systems the port from one platform to another does not imply that the timing behaviour will be unaffected; tim- ing requirements may or may not be met in the new platform (even if it is a faster platform) and the real-time analysis must be reevaluated as part of the migration proc- ess. An evaluation of the timing behaviour of the new platform can be done before the migration, to minimize the risk. In this section, after presenting a landscape of existing RTOS and operating system standards, we discuss their limitations and illustrate the new trends in this area. 21.1 Landscape Although there are a large variety of real-time operating systems varying in sizes, level of provided services, and efficiency, there are some common elements that can be found in most of them [BG-EC] [BG-DS] [FAQ], giving an answer to: what makes an OS real-time? • An RTOS usually provides support for concurrent programming via processes or threads or both. Processes usually provide protection through separate address spaces, while threads can cooperate more easily by sharing the same address space, but with no protection. • Real-time scheduling services are provided because this is one of the keys to ob- taining a predictable timing behaviour. Most current RTOS’s provide the notion of a scheduling priority, usually fixed, as for the moment there are few systems pro- viding deadline-driven or other dynamic-priority scheduling. • Although some RTOS’s designed for high-integrity applications use non preemp- tive scheduling, most support preemption because it leads to smaller latencies and a higher degree of utilization of the resources. • The OS has to support predictable synchronization mechanisms, both for events or signal and wait services, as well as for mutual exclusion. In the later case some way of preventing priority inversion is required because otherwise very improb- able but also very long delays may occur. The common mechanism used to pre- vent priority inversion is the use of some priority inheritance protocol in the mu- tual exclusion synchronization services. Priority inversions must also be avoided in the internal kernel implementation; among other things this requires the use of priority queues instead of regular FIFO queues in those OS services where proc- esses or threads may be queued waiting for some resource. • The OS has to provide time management services with sufficient precision and resolution to make it possible for the application to meet its timing requirements. 260 21 Real-Time Operating Systems • OS behaviour should be predictable, and so metrics of the response time bounds of the services that are used in real-time loops should be clearly given by the RTOS manufacturer or obtained by the application developer. These metrics include the interrupt latency (i.e., time from interrupt to task run), the worst case execution time of the system calls used in real-time loops, and the maximum time during which interrupts are masked or disabled by the OS and by any driver. The real-time operating systems presented in this section largely fit into this charac- terization. An RTOS is generally chosen not only for its real-time characteristics, but also for the middleware that is integrated in the RTOS, such as file system, communication stack, for its portability to different platforms (i.e., the board support packages that are provided), and for the associated cross-development environment. A commercial RTOS is usually marketed as the run-time component of an embed- ded development platform, which also includes a comprehensive suite of (cross-) development tools and utilities and a range of communications options for the target connection to the host, in an Integrated Development Environment (IDE). Moreover, the vendor generally provides development support. For each successful open source RTOS there is also at least one commercial distributor that provides development tools and development support. For many embedded-systems companies, the availability of development tools and support is a major requirement for choosing a particular RTOS. The quality of the overall package deal, including service and pricing strategy is often decisive in choos- ing a particular RTOS. Not all operating systems presented in this landscape satisfy the RTOS criteria given above and/or the RTOS definition in the Introduction. To get a clearer view of the landscape, we distinguish a number of subclasses. We first present the landscape on the operating system standards, then some major commercially available RTOS, then some LINUX variants, some other open source RTOS, and finally, some typi- cally embedded operating systems that are not real-time. Before going into the de- tailed descriptions of the RTOS, the development and timing analysis tools will be addressed first. Tools In this section, a general description is given of the development tools that make up the Integrated Development Environment (IDE), and of timing-analysis tools that, in some cases, are included in or can be attached to the IDE. Development Tools In addition to the general programming tools, such as (graphical) editors, compilers, source code browsers, high-level debuggers, and version control systems there are a number of tools specifically aiming cross development, and run time analysis. Ad- vanced tools in this domain not only address development and analysis of the own application code, but also third-party code and the integration with the OS. Memory analyzers show memory usage and reveal memory leaks before they cause a system failure. Performance profilers reveal code performance bottlenecks and show where a CPU is spending its cycles, providing a detailed function-by-function analysis. Real- 21.1 Landscape 261 time monitors allow the programmer to view any set of variables, while the program is running. Execution tracers display the function calls and function calling parame- ters of a running program, as well as return values and execution time.
Recommended publications
  • A Comparative Study: RTOS and Its Application
    International Journal of Computer Trends and Technology (IJCTT) – Volume 20 Number 1 – Feb 2015 A Comparative Study: RTOS and Its Application Gaurav Rai#1, Sachin Kumar *2, 1,2Department of Electronics & Communication Engineering, Amity University Amity University Uttar Pradesh, Lucknow India Abstract— Over past few decades the idea and need of compatible Real time operating systems has emerged as one of the key factors in the development of Real time operating systems, because of the abundance of incompatible real-time operating systems in the market, each targeted towards a specific segment of the industry. There is a need therefore to draw the similarities and differences between these operating systems, so that a real-time system developer can make an intelligent choice for the application at hand. The primary role of an operating system is to manage resources so as to meet the demands of target applications. Traditional timesharing operating systems target application environments that demand fairness and high resource utilization. Real-time applications on the other hand demand timeliness and predictability, the design of a real-time operating system (RTOS) is essentially a balance between Fig1: High-level view of an RTOS, its kernel, and other components found in providing a reasonably rich feature set for application embedded systems. [2] development and deployment and, not sacrificing predictability and timeliness. This paper briefly discusses and describes various This paper briefly discusses and describes various features features of XENOMAI and RTAI in relation to compatibility, of XENOMAI and RTAI in relation to compatibility, features, features, multitasking and resource management. multitasking and resource management.
    [Show full text]
  • Constructing a Multi-OS Platform with Minimal Engineering Cost
    Constructing a Multi-OS Platform with Minimal Engineering Cost Yuki Kinebuchi1, Takushi Morita1,KazuoMakijima1, Midori Sugaya2, and Tatsuo Nakajima1 1 Department of Computer Science, Waseda University {yukikine,morita t,makijima,tatsuo}@dcl.info.waseda.ac.jp 2 Dependable Embedded OS Center, Japan Science and Technology Agency (JST) [email protected] Abstract. Constructing an embedded device with a real-time and a general-purpose operating system has attracted attention as a promising approach to let the device balance real-time responsiveness and rich func- tionalities. This paper introduces our methodology for constructing such multi-OS platform with minimal engineering cost by assuming asymmet- ric OS combinations unique to embedded systems. Our methodology con- sists of two parts. One is a simple hypervisor for multiplexing resources to be shared between operating systems. The other is modifying operat- ing systems to allow them to be aware of each other. We constructed an experimental system executing TOPPERS and Linux simultaneously on a hardware equipped with an SH-4A processor. The modification to each operating system kernel limited to a few dozen lines of code and do not introduce any overhead that would compromise real-time responsiveness or system throughput. 1 Introduction Software for embedded systems used to be small and simple, but nowadays it is dominating a large part of the system implementation for providing rich func- tionalities. For instance, modern cell-phones consist of control software (such as a radio transmitter device controller) and rich applications (such as a web browser, a video player, a mailer, etc.). Thus, development with traditional embedded real-time OSes (RTOSes) are unsuited for modern devices.
    [Show full text]
  • T-Engine Design Guidelines Ver
    T-Engine Design Guidelines Ver. 1.00.01 TEF010-S007-01.00.01/en June 2009 TEF010-S007-01.00.01/en 1 T-Engine Design Guidelines / Ver. 1.00.01 CONTENTS ■ Chapter 1 Overview of T-Engine specifications .................................................................................................... 3 1.1. Significance of the T-Engine project and standardization of hardware specifications ................................... 3 1.2. T-Engine system structure............................................................................................................................. 14 ■ Chapter 2 CPU-board design methods ................................................................................................................. 19 2.1. CPU .............................................................................................................................................................. 19 2.2. Memory (flash, RAM).................................................................................................................................. 20 ■ Chapter 3 CPU-board implementation................................................................................................................. 21 ■ Chapter 4 CPU-board interface circuitry design .................................................................................................. 22 4.1. Expansion bus connector design................................................................................................................... 22 4.2. Serial interface.............................................................................................................................................
    [Show full text]
  • Μitron4.0 Specification (Ver
    µITRON4.0 Specification Ver. 4.00.00 ITRON Committee, TRON ASSOCIATION Supervised by Ken Sakamura Edited by Hiroaki Takada Copyright (C) 1999, 2002 by TRON ASSOCIATION, JAPAN µITRON4.0 Specification (Ver. 4.00.00) The copyright of this specification document belongs to the ITRON Committee of the TRON Association. The ITRON Committee of the TRON Association grants the permission to copy the whole or a part of this specification document and to redistribute it intact without charge or with a distribution fee. However, when a part of this specification document is redistributed, it must clearly state (1) that it is a part of the µITRON4.0 Specification document, (2) which part it was taken, and (3) the method to obtain the whole specifi- cation document. See Section 6.1 for more information on the conditions for using this specification and this specification document. Any questions regarding this specification and this specification document should be directed to the following: ITRON Committee, TRON Association Katsuta Building 5F 3-39, Mita 1-chome, Minato-ku, Tokyo 108-0073, JAPAN TEL: +81-3-3454-3191 FAX: +81-3-3454-3224 § TRON is the abbreviation of “The Real-time Operating system Nucleus.” § ITRON is the abbreviation of “Industrial TRON.” § µITRON is the abbreviation of “Micro Industrial TRON.” § BTRON is the abbreviation of “Business TRON.” § CTRON is the abbreviation of “Central and Communication TRON.” § TRON, ITRON, µITRON, BTRON, and CTRON do not refer to any specific product or products. µITRON4.0 Specification Ver. 4.00.00 A Word from the Project Leader Fifteen years have passed since the ITRON Sub-Project started as a part of the TRON Project: a real-time operating system specification for embedded equipment control.
    [Show full text]
  • Real-Time Operating Systems: an Ongoing Review
    Real-Time Operating Systems: An Ongoing Review Ramesh Yerraballi Dept. of Computer Science and Engineering University of Texas at Arlington Abstract ded applications from Lynx Real-Time Systems Inc. It is scalable, fully re-entrant, preemptible, and ROMable [2]. Real-time operating systems have evolved over the years ITRON: An open RTOS specification for embedded sys- Ê Ç from being simple executives using cyclic scheduling to tems resulting from the TRON ( Ì he eal-Time perating the current feature-rich operating environments. The stan- System Æ ucleus) project. Participant companies that have dardization of POSIX 1003.1, ISO/IEC 9945-1 (real-time implemented the specification include, Fujitsu, Hitachi, extensions to POSIX) has contributed significantly to this Mitsubhishi, Miyazaki, Morson, Erg Co., Firmware Sys- evolution, however, the specification leaves plenty of room tems, NEC, Sony Corp., Three Ace Computer Corp., and for individual implementations to both interpret and spe- Toshiba [10]. cialize their RTOSs. Accordingly, there has been a pro- OSE: A commercial RTOS from Enea Data Systems that liferation of both commercial and free RTOSs, notably, the boasts to have bridged the gap between applications and the ITRON OS, the OSEK-VDX OS specification, commercial kernel by providing a rich set of features inside the kernel. RTOSs like VxWorks, VRTX, LynxOS, OSE and QNX, and It’s message based architecture allows for efficient IPC and free RTOSs like RT-Linux (RTAI), and Windows CE.The synchronization [5]. goal of the work reported in this paper is to draw the OSEK-VDX: The “Open Systems in Automotive Net- real-time systems practitioner and researcher’s attention works” RTOS specification that has been adopted by the to these choices and bring out the similarities and differ- following organizations in their embedded systems: Adam ences among them.
    [Show full text]
  • Questionnaire on RTOS Use Trends and ITRON Project
    Questionnaire on RTOS Use Trends and ITRON Project 1. Please enter your name, company, position, address, telephone number, email address. (1-1) Name [ ] (1-2) Company and position [ ] (1-3) Address [ ] (1-4) Telephone number [ ] (1-5) Email address [ ] 2. What kind of work do you do? Please choose one of the following. If more than one of the following apply, please choose your primary work. ( ) Planning, management ( ) Design, development ( ) Inspection, quality control ( ) Sales engineering, sales support ( ) Other [ ] 3. We would like to know about at most three recent embedded systems projects you (or your company) have developed recently. For the first project, please answer the following five questions by entering your answers under System 1. If you are answering about more than one system, enter responses for the second and third system under System 2 and System 3 respectively. * If more than one microcontrollers or microprocessors are used in one project, answer for one of them, or answer for each of them considering each one as a separate project. (3-1) What is the application field? * For the application fields, please see the separate table on the last page. System 1 System 2 System 3 ( ) ( ) ( ) Home appliance ( ) ( ) ( ) Audio/visual equipment ( ) ( ) ( ) Entertainment, education ( ) ( ) ( ) Personal information appliance ( ) ( ) ( ) Personal computer peripheral, office equipment ( ) ( ) ( ) Communication equipment (terminal) ( ) ( ) ( ) Communication equipment (network equipment) ( ) ( ) ( ) Transportation-related ( ) (
    [Show full text]
  • Operating Systems for Low-End Devices in the Internet of Things: a Survey Oliver Hahm, Emmanuel Baccelli, Hauke Petersen, Nicolas Tsiftes
    Operating Systems for Low-End Devices in the Internet of Things: a Survey Oliver Hahm, Emmanuel Baccelli, Hauke Petersen, Nicolas Tsiftes To cite this version: Oliver Hahm, Emmanuel Baccelli, Hauke Petersen, Nicolas Tsiftes. Operating Systems for Low-End Devices in the Internet of Things: a Survey. IEEE internet of things journal, IEEE, 2016, 3 (5), pp.720-734. 10.1109/JIOT.2015.2505901. hal-01245551 HAL Id: hal-01245551 https://hal.inria.fr/hal-01245551 Submitted on 17 Dec 2015 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. 1 Operating Systems for Low-End Devices in the Internet of Things: a Survey Oliver Hahm, Emmanuel Baccelli, Hauke Petersen, and Nicolas Tsiftes Abstract—The Internet of Things (IoT) is projected to soon Recently, the Internet Engineering Task Force (IETF) standard- interconnect tens of billions of new devices, in large part also ized a classification [8] of such devices in three subcategories1 connected to the Internet. IoT devices include both high-end based on memory capacity2. devices which can use traditional go-to operating systems (OS) such as Linux, and low-end devices which cannot, due to stringent • Class 0 devices have the smallest resources (<<10 kB resource constraints, e.g.
    [Show full text]
  • Development of Embedded EPICS and Its Application to Accelerator Control System
    Development of Embedded EPICS and its Application to Accelerator Control System Geyang Jiang DOCTOR OF PHYLOSOPHY Department of Accelerator Science School of Mathematical and Physical Science The Graduate University for Advanced Studies 2005 1 Development of Embedded EPICS and its Application to Accelerator Control System Geyang Jiang No. 022203 Department of Accelerator Science School of Mathematical and Physical Science The Graduate University for Advanced Studies 2 Abstract This thesis is on investigation and implementation of embedded EPICS controllers by the use of micro-ITRON to overcome many disadvantages caused by the advent of Ethernet-based device controllers. At present almost all accelerator control systems are kind of DCS (Distributed Control Systems) on the basis of so called the standard model. In the standard model, the control system consists of three layers: the presentation layer, the device control layer and the interface layer. Another trend of accelerator control systems at present is to use a free toolkit for its middle-ware. Among a few toolkits, EPICS (Experimental Physics and Industrial Control System) is the most widely used. EPICS was first developed in 1991. EPICS’s open, free and full DCS-based features have made it to be adopted in many control systems of scientific facilities, such as accelerators, telescopes, and large high-energy experiments. EPICS is designed on the basis of the standard model. The first two layers, namely, the presentation layer and the device control layer, are divided functionally, but connected with each other through a high-speed network such as FDDI. The presentation layer which is called OPI (Operator Interface) layer in the EPICS terminology is typically composed of several workstations and X-terminals that are used as operator consoles.
    [Show full text]
  • Tasks, Threads and Processes, Confused?
    TASKS, THREADS AND PROCESSES, CONFUSED? Niall Cooling Feabhas Ltd. www.feabhas.com Copyright © Feabhas Ltd. 1995-2010 FeabhaS TASKS, THREADS AND PROCESSES, CONFUSED? Copyright © Feabhas Ltd. 1995-2010 Introduction With the growth of the use of commercial off-the-shelf real-time operating systems, the terms task, thread and process are widely used in magazines, conference papers and marketing literature. Everyone using these terms has a very clear idea of their meaning. However, this paper intends to demonstrate that these seemingly innocuous terms are ambiguous and their exact meaning is dependent on the authors programming background. Drive towards concurrent programming The programming language “C” has undoubtedly become the most popular language for developing embedded systems over the last decade. It is a sequential language, in that code developed follows the basic structure of most standard programming languages; sequence, selection (if, case) and iteration (while, for). There is no inherent support within the language to build parts of the program that can execute concurrently. Modern embedded systems have a growing requirement to service and respond to numerous asynchronous and synchronous inputs. Developing a sequential program that can meet real- time requirements is incredibly difficult (and quite an art). A simpler programming model than one large sequential C program, is to separate the code into multiple programs, each of which is written as a block of smaller sequential code. Each “sub-program” has a clearly defined task1 (i.e. detecting, servicing and reacting to a given input). Breaking the program up into a set of tasks doesn’t address the issue of allowing them to run concurrently.
    [Show full text]