REAL-TIME SYSTEMS, ARCHITECTURE, SCHEDULING, AND APPLICATION Edited by Seyed Morteza Babamir Real-Time Systems, Architecture, Scheduling, and Application Edited by Seyed Morteza Babamir Published by InTech Janeza Trdine 9, 51000 Rijeka, Croatia Copyright © 2012 InTech All chapters are Open Access distributed under the Creative Commons Attribution 3.0 license, which allows users to download, copy and build upon published articles even for commercial purposes, as long as the author and publisher are properly credited, which ensures maximum dissemination and a wider impact of our publications. After this work has been published by InTech, authors have the right to republish it, in whole or part, in any publication of which they are the author, and to make other personal use of the work. Any republication, referencing or personal use of the work must explicitly identify the original source. As for readers, this license allows users to download, copy and build upon published chapters even for commercial purposes, as long as the author and publisher are properly credited, which ensures maximum dissemination and a wider impact of our publications. Notice Statements and opinions expressed in the chapters are these of the individual contributors and not necessarily those of the editors or publisher. No responsibility is accepted for the accuracy of information contained in the published chapters. The publisher assumes no responsibility for any damage or injury to persons or property arising out of the use of any materials, instructions, methods or ideas contained in the book. Publishing Process Manager Maja Bozicevic Technical Editor Teodora Smiljanic Cover Designer InTech Design Team First published April, 2012 Printed in Croatia A free online edition of this book is available at www.intechopen.com Additional hard copies can be obtained from orders@intechopen.com Real-Time Systems, Architecture, Scheduling, and Application, Edited by Seyed Morteza Babamir p. cm. ISBN 978-953-51-0510-7 Contents Preface IX Part 1 Architectures 1 Chapter 1 Networking Applications for Embedded Systems 3 Sorin Zoican Chapter 2 Dynamics of System Evolution 23 Ashirul Mubin, Rezwanur Rahman and Daniel Ray Chapter 3 Schedulability Analysis of Mode Changes with Arbitrary Deadlines 47 Paulo Martins, I. G. Hidalgo, M. A. Carvalho, A. de Angelis, V.Timóteo, R. Moraes, E. Ursini and Udo Fritzke Jr Chapter 4 An Efficient Hierarchical Scheduling Framework for the Automotive Domain 67 Mike Holenderski, Reinder J. Bril and Johan J. Lukkien Part 2 Specification and Verification 95 Chapter 5 Specification and Validation of Real-Time Systems Using UML Sequence Diagrams 97 Zbigniew Huzar and Anita Walkowiak Chapter 6 Construction of Real-Time Oracle Using Timed Automata 129 Seyed Morteza Babamir and Mehdi Borhani Dehkordi Part 3 Scheduling 147 Chapter 7 Handling Overload Conditions in Real-Time Systems 149 Giorgio C. Buttazzo VI Contents Chapter 8 Real-Time Concurrency Control Protocol Based on Accessing Temporal Data 173 Qilong Han Chapter 9 Quality of Service Scheduling in the Firm Real-Time Systems 191 Audrey Queudet-Marchand and Maryline Chetto Part 4 Real World Applications 211 Chapter 10 Linearly Time Efficiency in Unattended Wireless Sensor Networks 213 Faezeh Sadat Babamir and Fattaneh Bayat Babolghani Chapter 11 Real-Time Algorithms of Object Detection Using Classifiers 227 Roman Juránek, Pavel Zemˇcík and Michal Hradiš Chapter 12 Energy Consumption Analysis of Routing Protocols in Mobile Ad Hoc Networks 249 Ali Norouzi and A. Halim Zaim Chapter 13 Real-Time Motion Processing Estimation Methods in Embedded Systems 265 Guillermo Botella and Diego González Chapter 14 Real Time Radio Frequency Exposure for Bio-Physical Data Acquisition 293 Alessandra Paffi, Francesca Apollonio, Guglielmo d’Inzeo, Giorgio A. Lovisolo and Micaela Liberti Chapter 15 Real–Time Low–Latency Estimation of the Blinking and EOG Signals 313 Robert Krupi´nski and Przemysław Mazurek Preface Real-Time Systems are computing systems that must meet their temporal specification. In computer science, real-time or reactive computing is the study of hardware and software systems that are subject to a real-time constraint called deadline, which the system should respect it in its response to events. Real-time systems, in fact, must guarantee response within strict time constraints. Real-time systems often appear as critical systems such as mission critical ones. The anti-lock brakes system on a car, for instance, is a real-time computing system where the real-time constraint is the brakes release time to prevent the wheel from locking. Real-time software may use synchronous programming languages, real-time operating systems and real-time networks providing essential frameworks for constructing real-time software applications. Since correctness of a real-time operation depends not only on its logical correctness but also on the time in which the operation is carried out, real-time systems are classified by three types of deadlines: (1) Hard where missing a deadline leads to total system failure, (2) Firm where missing a deadline is tolerable, but it may degrade quality of system services and (3) Soft where deadlines are tolerable to be half extended. Therefore, the goal of a hard real-time system is to ensure that all deadlines are met; however, that of a soft real-time system is to ensure that a deadline is nearly met or a subset of deadlines is met. Maximizing the number of met deadlines or maximizing the number of met deadlines for high priority tasks and minimizing the lateness of tasks are the concerned goals in the soft real-time systems. Embedded systems like car engine control system, medical systems (such as heart pacemakers), industrial process controllers, video game systems and vector graphics are hard real- time systems having hard requirements. A car engine control system, for instance, is a hard real-time system where a delayed signal may cause engine failure or damage. Multitasking systems are another type of real-time systems where the scheduling policies are a matter of concern. Typical policies are Priority driven or Preemptive scheduling, Earliest Deadline First and Overlay scheduling, such as Adaptive Partition Scheduling. This book stresses architecture, scheduling, specification and verification and real world applications of real-time systems. It includes a cross-fertilization of ideas and concepts between the academic and industrial worlds. The book starts with a section X Preface (Chapters 1 to 4) on real-time architectures and continues with a section (Chapters 5 and 6) on specification and verification of real-time systems, a section on real-time scheduling algorithms (Chapters 7 to 9) and ends with a section (Chapters 10 to 15) on some real world application of real-time systems. Section 1 consisting of Chapters 1 to 4 deals with architectures of real-time systems. Chapter 1 presents realizing the networking applications by means of DSP microcomputer architecture (Blackfin microcomputer) supported by an operating system kernel (Visual DSP Kernel) and lightweight IP protocol stack (LWIP suite). Moreover, the chapter provides the frameworks for telecommunications applications development and for performance evaluation. A VoIP (Voice over IP) system, as a complex networking application example, is illustrated based on adaptive multi-rate codec. Chapter 2 discusses some development efforts to identify general terms and metrics that are necessary to track a system’s upcoming evolutionary phases. It presents higher-level analyses of these metrics by examples of several years of systems development track history and in multiple projects. Based on observations, it tries to derive a preliminary methodology to formulate system dynamics towards their evolution. Chapter 3 elaborates concept of mode and includes a number of current views of modes and addresses previous work on modes in real-time systems. It extends the current schedulability analysis associated with mode changes in static priority preemptive based scheduling. It derives analysis that includes tasks executing across a mode change with deadlines larger than their period. Chapter 4 addresses the problem of providing temporal isolation to components in an integrated system. Temporal isolation allows to develop and verify the components independently and concurrently and then to integrate them into a system. To provide true temporal isolation when components execute on a shared processor, this chapter tries to address this problem by means of a hierarchical scheduling framework (HSF). HSF provides the means for the integration of independently developed and analyzed components into a predictable real-time system. A component is defined by a set of tasks, a local scheduler and a server defining the component’s time budget (i.e. its share of the processing time) and its replenishment policy. Section 2 consisting of Chapters 5 and 6 discusses specification and verification issues in real-time systems. Chapter 5 deals with specification and verification in UML known as a semiformal language. The chapter presents a formal interpretation of a set of sequence diagrams with time constraints. The formal interpretation is used to constructing programming tools for supporting validation of systems behavior specification and prototyping of the systems. The chapter demonstrates how the set of scenarios specifying system behavior may be derived from the set of sequence diagrams and how this set may be analyzed against its consistency and completeness. . REAL-TIME SYSTEMS, ARCHITECTURE, SCHEDULING, AND APPLICATION Edited by Seyed Morteza Babamir Real-Time Systems, Architecture, Scheduling, and Application. stresses architecture, scheduling, specification and verification and real world applications of real-time systems. It includes a cross-fertilization of ideas and concepts between the academic and. evaluation boards. Real-Time Systems, Architecture, Scheduling, and Application 4 Making an embedded system for networking applications require detailed knowledge of hardware and software resources