Tải bản đầy đủ (.pdf) (798 trang)

Handbook of real time and embedded systems

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (7.77 MB, 798 trang )


CRC-C6781 FM.tex

16/6/2007

14: 58

Page i

Handbook of
Real-Time and
Embedded Systems


CRC-C6781 FM.tex

16/6/2007

14: 58

Page ii

CHAPMAN & HALL/CRC
COMPUTER and INFORMATION SCIENCE SERIES
Series Editor: Sartaj Sahni
PUBLISHED TITLES

,
ADVERSARIAL REASONING: COMPUTATIONAL APPROACHES TO READING THE OPPONENT S MIND
Alexander Kott and William M. McEneaney
DISTRIBUTED SENSOR NETWORKS


S. Sitharama Iyengar and Richard R. Brooks
DISTRIBUTED SYSTEMS: AN ALGORITHMIC APPROACH
Sukumar Ghosh
FUNDEMENTALS OF NATURAL COMPUTING: BASIC CONCEPTS, ALGORITHMS, AND APPLICATIONS
Leandro Nunes de Castro
HANDBOOK OF ALGORITHMS FOR WIRELESS NETWORKING AND MOBILE COMPUTING
Azzedine Boukerche
HANDBOOK OF APPROXIMATION ALGORITHMS AND METAHEURISTICS
Teofilo F. Gonzalez
HANDBOOK OF BIOINSPIRED ALGORITHMS AND APPLICATIONS
Stephan Olariu and Albert Y. Zomaya
HANDBOOK OF COMPUTATIONAL MOLECULAR BIOLOGY
Srinivas Aluru
HANDBOOK OF DATA STRUCTURES AND APPLICATIONS
Dinesh P. Mehta and Sartaj Sahni
HANDBOOK OF DYNAMIC SYSTEM MODELING
Paul A. Fishwick
HANDBOOK OF REAL-TIME AND EMBEDDED SYSTEMS
Insup Lee, Joseph Y-T. Leung, and Sang H. Son
HANDBOOK OF SCHEDULING: ALGORITHMS, MODELS, AND PERFORMANCE ANALYSIS
Joseph Y.-T. Leung
THE PRACTICAL HANDBOOK OF INTERNET COMPUTING
Munindar P. Singh
SCALABLE AND SECURE INTERNET SERVICES AND ARCHITECTURE
Cheng-Zhong Xu
SPECULATIVE EXECUTION IN HIGH PERFORMANCE COMPUTER ARCHITECTURES
David Kaeli and Pen-Chung Yew


CRC-C6781 FM.tex


16/6/2007

14: 58

Page iii

Handbook of
Real-Time and
Embedded Systems

Edited by

Insup Lee
University of Pennsylvania
Philadelphia, U.S.A.

Joseph Y-T. Leung
New Jersey Institute of Technology
Newark, U.S.A.

Sang H. Son
University of Virginia
Charlottesville, U.S.A.


CRC-C6781 FM.tex

16/6/2007


14: 58

Page iv

Chapman & Hall/CRC
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2008 by Taylor & Francis Group, LLC
Chapman & Hall/CRC is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Printed in the United States of America on acid-free paper
10 9 8 7 6 5 4 3 2 1
International Standard Book Number-10: 1-58488-678-1 (Hardcover)
International Standard Book Number-13: 978-1-58488-678-5 (Hardcover)
This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted
with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to
publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of
all materials or for the consequences of their use.
No part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or
other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://
www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC) 222 Rosewood Drive, Danvers, MA 01923,
978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for
identification and explanation without intent to infringe.
Library of Congress Cataloging-in-Publication Data
Lee, Insup.
Handbook of real-time and embedded systems / Insup Lee, Joseph Y-T. Leung and Sang H. Son.
p. cm. -- (Chapman & Hall/CRC computer & information science series)

Includes bibliographical references and index.
ISBN-13: 978-1-58488-678-5 (alk. paper)
ISBN-10: 1-58488-678-1 (alk. paper)
1. Real-time data processing. 2. Embedded computer systems--Programming. I. Leung, Joseph Y-T.
II. Son, Sang H. III. Title. IV. Series.
QA76.54.L43 2007
004’.33--dc22
Visit the Taylor & Francis Web site at

and the CRC Press Web site at


2007002062


CRC-C6781 FM.tex

16/6/2007

14: 58

Page v

Dedication

To Kisung, David, and Paul.
To my wife Maria.
To Inhye, Daniel, and Yena.



CRC-C6781 FM.tex

16/6/2007

14: 58

Page vi


CRC-C6781 FM.tex

16/6/2007

14: 58

Page vii

Contents

Preface .......................................................................................................................................................... xv
Editors ........................................................................................................................................................ xvii
Contributors .............................................................................................................................................. xix

1

Insup Lee, Joseph Y-T. Leung and
Sang Hyuk Son ................................................................................................................................... 1-1
1.1
Introduction .......................................................................................................................... 1-1
1.2

Overview ............................................................................................................................... 1-2

I

Real-Time Scheduling and Resource Management

2

Real-Time Scheduling and Resource Management

Introduction and Overview

Giorgio C. Buttazzo ............................................................................................................................ 2-1
2.1
Introduction .......................................................................................................................... 2-1
2.2
Periodic Task Handling ........................................................................................................ 2-3
2.3
Handling Aperiodic Tasks .................................................................................................... 2-7
2.4
Handling Shared Resources .................................................................................................. 2-9
2.5
Overload Management ......................................................................................................... 2-12
2.6
Conclusions ........................................................................................................................... 2-14

3

Schedulability Analysis of Multiprocessor Sporadic Task Systems
Theodore P. Baker and Sanjoy K. Baruah .......................................................................................... 3-1

3.1
Introduction .......................................................................................................................... 3-1
3.2
Definitions and Models ........................................................................................................ 3-2
3.3
Dynamic Priority Scheduling ............................................................................................... 3-4
3.4
Fixed Job-Priority Scheduling .............................................................................................. 3-5
3.5
Fixed Task-Priority Scheduling ............................................................................................ 3-10
3.6
Relaxations of the Sporadic Model ...................................................................................... 3-13
3.7
Conclusion ............................................................................................................................ 3-15

4

Rate-Based Resource Allocation Methods
4.1
4.2
4.3
4.4

Kevin Jeffay ................................................ 4-1
Introduction .......................................................................................................................... 4-1
Traditional Static Priority Scheduling ................................................................................. 4-3
A Taxonomy of Rate-Based Allocation Models ................................................................... 4-4
Using Rate-Based Scheduling ............................................................................................... 4-9
vii



CRC-C6781 FM.tex

16/6/2007

14: 58

Page viii

viii

Contents

4.5
4.6

5

Hybrid Rate-Based Scheduling ............................................................................................ 4-12
Summary and Conclusions .................................................................................................. 4-13

Compositional Real-Time Schedulability Analysis
Insik Shin and Insup Lee .................................................................................................................... 5-1
5.1
Introduction .......................................................................................................................... 5-1
5.2
Compositional Real-Time Scheduling Framework ............................................................. 5-3
5.3
Workload Models .................................................................................................................. 5-6
5.4

Resource Models ................................................................................................................... 5-7
5.5
Schedulability Analysis ......................................................................................................... 5-9
5.6
Schedulable Workload Utilization Bounds .......................................................................... 5-12
5.7
Extension ............................................................................................................................... 5-16
5.8
Conclusions ........................................................................................................................... 5-18

6

Power-Aware Resource Management Techniques for Low-Power
Embedded Systems
Jihong Kim and Tajana Simunic Rosing .............................................. 6-1
6.1
6.2
6.3
6.4

7

Imprecise Computation Model: Total Weighted Error and Maximum
Weighted Error
Joseph Y-T. Leung ........................................................................................ 7-1
7.1
7.2
7.3
7.4


8

Introduction .......................................................................................................................... 6-1
Dynamic Voltage Scaling ...................................................................................................... 6-2
Dynamic Power Management .............................................................................................. 6-8
Conclusions ........................................................................................................................... 6-12

Introduction .......................................................................................................................... 7-1
Total Weighted Error ............................................................................................................ 7-3
Maximum Weighted Error ................................................................................................... 7-9
Concluding Remarks ............................................................................................................ 7-13

Imprecise Computation Model: Bicriteria and Other Related Problems
Joseph Y-T. Leung ............................................................................................................................... 8-1
8.1
Introduction .......................................................................................................................... 8-1
8.2
Total w-Weighted Error with Constraints ............................................................................ 8-2
8.3
Maximum w -Weighted Error with Constraints ................................................................. 8-3
8.4
0/1-Constraints ..................................................................................................................... 8-6
8.5
Conclusions ........................................................................................................................... 8-10

9

Stochastic Analysis of Priority-Driven Periodic Real-Time Systems
José Luis Díaz, Kanghee Kim, José María López,
Lucia Lo Bello, Daniel F. García, Chang-Gun Lee,

Sang Lyul Min and Orazio Mirabella ................................................................................................. 9-1
9.1
Introduction .......................................................................................................................... 9-1
9.2
Related Work ......................................................................................................................... 9-2
9.3
System Model ........................................................................................................................ 9-3
9.4
Stochastic Analysis Framework ............................................................................................ 9-4
9.5
Steady-State Backlog Analysis .............................................................................................. 9-12
9.6
Computational Complexity ................................................................................................. 9-15
9.7
Experimental Results ............................................................................................................ 9-17
9.8
Conclusions and Future Work ............................................................................................. 9-22


CRC-C6781 FM.tex

16/6/2007

14: 58

Page ix

ix

Contents


II Programming Languages, Paradigms, and Analysis for
Real-Time and Embedded Systems

10

Temporal Control in Real-Time Systems: Languages and Systems
Sebastian Fischmeister and Insup Lee ..........................................................................................
10.1 Introduction ....................................................................................................................
10.2 The Model .......................................................................................................................
10.3 The Example: A Stopwatch .............................................................................................
10.4 Implicit Temporal Control .............................................................................................
10.5 Programming with Temporal Control ...........................................................................
10.6 Comparison and Conclusions ........................................................................................

11

12

The Evolution of Real-Time Programming
Christoph M. Kirsch and Raja Sengupta .....................................................................................
11.1 Introduction ....................................................................................................................
11.2 The Computing Abstractions of Control Engineering .................................................
11.3 Physical-Execution-Time Programming .......................................................................
11.4 Bounded-Execution-Time Programming ......................................................................
11.5 Zero-Execution-Time Programming .............................................................................
11.6 Logical-Execution-Time Programming .........................................................................
11.7 Networked Real-Time Systems .......................................................................................

11-1

11-1
11-3
11-6
11-7
11-10
11-12
11-14

Real-Time Java

12-1
12-1
12-2
12-3
12-9
12-11
12-13
12-17

12.1
12.2
12.3
12.4
12.5
12.6
12.7

13

Andy Wellings and Alan Burns ...........................................................

Introduction ....................................................................................................................
Background on the RTSJ ................................................................................................
Scheduling Objects and Scheduling ...............................................................................
Resource Sharing and Synchronization .........................................................................
Time Values and Clocks ..................................................................................................
Memory Management ....................................................................................................
Conclusions .....................................................................................................................

Programming Execution-Time Servers and Supporting EDF Scheduling
in Ada 2005
Alan Burns and Andy Wellings ...................................................................... 13-1
13.1
13.2
13.3
13.4
13.5
13.6
13.7
13.8
13.9
13.10

14

10-1
10-1
10-3
10-4
10-6
10-7

10-18

Introduction ....................................................................................................................
The Ada 95 Version of the Language ..............................................................................
New Ada 2005 Features ...................................................................................................
Programming Execution-Time Servers .........................................................................
Support for Deadlines .....................................................................................................
Baker’s Preemption Level Protocol for Protected Objects ............................................
Supporting EDF Scheduling in Ada ...............................................................................
Mixed Dispatching Systems ............................................................................................
Conclusion ......................................................................................................................
Postscript—Ada and Java ...............................................................................................

13-1
13-3
13-3
13-8
13-14
13-15
13-15
13-19
13-20
13-20

Synchronous Programming

Paul Caspi, Pascal Raymond and
Stavros Tripakis ............................................................................................................................
14.1 Introduction ....................................................................................................................
14.2 From Practice . . . ............................................................................................................

14.3 To Theory ........................................................................................................................
14.4 Some Languages and Compilers ....................................................................................

14-1
14-1
14-2
14-3
14-5


CRC-C6781 FM.tex

16/6/2007

14: 58

Page x

x

Contents

14.5
14.6

Back to Practice ............................................................................................................... 14-14
Conclusions and Perspectives ......................................................................................... 14-19

III Operating Systems and Middleware for Real-Time and
Embedded Systems


15

QoS-Enabled Component Middleware for Distributed
Real-Time and Embedded Systems
Gan Deng, Douglas C. Schmidt,
Christopher D. Gill and Nanbor Wang .........................................................................................
15.1 Introduction ....................................................................................................................
15.2 R&D Challenges for DRE Systems .................................................................................
15.3 Comparison of Middleware Paradigms .........................................................................
15.4 Achieving QoS-Enabled Component Middleware: CIAO,
DAnCE, and CoSMIC .....................................................................................................
15.5 Applications of CIAO, DAnCE, and CoSMIC ...............................................................
15.6 Related Work ...................................................................................................................
15.7 Concluding Remarks .......................................................................................................

16

Introduction ....................................................................................................................
Interrupt Definitions and Semantics .............................................................................
Problems in Interrupt-Driven Software .........................................................................
Guidelines for Interrupt-Driven Embedded Software ..................................................
Conclusions .....................................................................................................................

19

17-1
17-1
17-6
17-18


Reference Middleware Architecture for Real-Time and Embedded
Systems: A Case for Networked Service Robots
Saehwa Kim and
Seongsoo Hong ..............................................................................................................................
18.1 Introduction ....................................................................................................................
18.2 Robot Middleware Requirements ..................................................................................
18.3 Reference Robot Middleware Architecture ....................................................................
18.4 Future Challenges of Robot Middleware .......................................................................
18.5 Conclusions .....................................................................................................................

IV

16-1
16-2
16-4
16-9
16-12

QoS Support and an Analytic Study for USB 1.x/2.0 Devices
Chih-Yuan Huang, Shi-Wu Lo, Tei-Wei Kuo and Ai-Chun Pang ................................................
17.1 Introduction ....................................................................................................................
17.2 QoS Guarantees for USB Subsystems ............................................................................
17.3 Summary .........................................................................................................................

18

15-5
15-9
15-13

15-14

Safe and Structured Use of Interrupts in Real-Time and Embedded
Software
John Regehr .......................................................................................................... 16-1
16.1
16.2
16.3
16.4
16.5

17

15-1
15-1
15-2
15-2

18-1
18-1
18-2
18-4
18-10
18-12

Real-Time Communications/Sensor Networks
Online QoS Adaptation with the Flexible Time-Triggered (FTT)
Communication Paradigm
Luis Almeida, Paulo Pedreiras, Joaquim Ferreira,
Mário Calha, José Alberto Fonseca, Ricardo Marau, Valter Silva and Ernesto Martins ............... 19-1

19.1 Introduction .................................................................................................................... 19-1
19.2 Toward Operational Flexibility ....................................................................................... 19-2


CRC-C6781 FM.tex

16/6/2007

14: 58

Page xi

xi

Contents

19.3
19.4
19.5
19.6
19.7

20

Wireless Sensor Networks
20.1
20.2
20.3
20.4
20.5

20.6
20.7
20.8

21

The Flexible Time-Triggered Paradigm .........................................................................
The Synchronous Messaging System .............................................................................
The Asynchronous Messaging System ...........................................................................
Case Study: A Mobile Robot Control System ................................................................
Conclusions .....................................................................................................................
John A. Stankovic ...............................................................
Introduction ....................................................................................................................
MAC .................................................................................................................................
Routing ............................................................................................................................
Node Localization ...........................................................................................................
Clock Synchronization ....................................................................................................
Power Management ........................................................................................................
Applications and Systems ...............................................................................................
Conclusions .....................................................................................................................

21-1
21-1
21-2
21-6
21-17
21-18

Real-Time Communication for Embedded Wireless Networks
Marco Caccamo and Tarek Abdelzaher ........................................................................................

22.1 Introduction ....................................................................................................................
22.2 Basic Concepts for Predictable Wireless Communication ............................................
22.3 Robust and Implicit Earliest Deadline First ...................................................................
22.4 Higher-Level Real-Time Protocols for Sensor Networks ..............................................
22.5 Real-Time Capacity of Wireless Networks ....................................................................
22.6 Concluding Remarks .......................................................................................................

23

20-1
20-1
20-2
20-2
20-4
20-5
20-5
20-6
20-9

Messaging in Sensor Networks: Addressing Wireless Communications
and Application Diversity
Hongwei Zhang, Anish Arora, Prasun Sinha
and Loren J. Rittle .........................................................................................................................
21.1 Introduction ....................................................................................................................
21.2 SMA: An Architecture for Sensornet Messaging ...........................................................
21.3 Data-Driven Link Estimation and Routing ...................................................................
21.4 Related Work ...................................................................................................................
21.5 Concluding Remarks .......................................................................................................

22


19-5
19-8
19-14
19-17
19-19

22-1
22-1
22-2
22-3
22-9
22-11
22-13

Programming and Virtualization of Distributed Multitasking
Sensor Networks
Azer Bestavros and Michael J. Ocean ................................................... 23-1
23.1
23.2
23.3
23.4
23.5
23.6
23.7
23.8

Introduction ....................................................................................................................
The SNAFU Programming Language ............................................................................
Sensorium Task Execution Plan .....................................................................................

The Sensorium Service Dispatcher ................................................................................
Sensorium Execution Environments .............................................................................
Putting It All Together ....................................................................................................
Related Work ...................................................................................................................
Conclusion ......................................................................................................................

23-1
23-4
23-7
23-9
23-12
23-16
23-18
23-19

V

Real-Time Database/Data Services

24

Data-Intensive Services for Real-Time Systems
Krithi Ramamritham,
Lisa Cingiser DiPippo and Sang Hyuk Son .................................................................................. 24-1
24.1 Introduction .................................................................................................................... 24-1


CRC-C6781 FM.tex

16/6/2007


14: 58

Page xii

xii

Contents

24.2
24.3
24.4
24.5
24.6
24.7
24.8

25

26

Data Freshness and Timing Properties ..........................................................................
Transaction Processing ...................................................................................................
Quality of Service in Real-Time Data Services ..............................................................
Data Services in Sensor Networks ..................................................................................
Mobile Real-Time Databases ..........................................................................................
Dissemination of Dynamic Web Data ...........................................................................
Conclusion ......................................................................................................................

24-4

24-6
24-12
24-17
24-18
24-20
24-21

Real-Time Data Distribution
Angela Uvarov Frolov,
Lisa Cingiser DiPippo and Victor Fay-Wolfe ................................................................................
25.1 Introduction to Real-Time Data Distribution ...............................................................
25.2 Real-Time Data Distribution Problem Space ................................................................
25.3 Approaches to Real-Time Data Distribution .................................................................
25.4 Conclusion ......................................................................................................................

25-1
25-1
25-1
25-5
25-16

Temporal Consistency Maintenance for Real-Time Update
Transactions
Ming Xiong and Krithi Ramamritham ........................................................ 26-1
26.1
26.2
26.3
26.4
26.5


27

Introduction ....................................................................................................................
More–Less Using EDF .....................................................................................................
More–Less Using Deadline Monotonic ...........................................................................
Deferrable Scheduling .....................................................................................................
Conclusions .....................................................................................................................

Salvaging Resources by Discarding Irreconcilably Conflicting Transactions
in Firm Real-Time Database Systems
Victor C. S. Lee, Joseph Kee-Yin Ng
and Ka Man Ho ............................................................................................................................
27.1 Introduction ....................................................................................................................
27.2 Related Work ...................................................................................................................
27.3 A New Priority Cognizant CC Algorithm ......................................................................
27.4 Experiments .....................................................................................................................
27.5 Results ..............................................................................................................................
27.6 Conclusion ......................................................................................................................

28

27-1
27-1
27-3
27-5
27-6
27-8
27-13

Application-Tailored Databases for Real-Time Systems

Aleksandra Tešanovi´c and Jörgen Hansson ...................................................................................
28.1 Introduction ....................................................................................................................
28.2 Dimensions of Tailorability ............................................................................................
28.3 Tailorable Real-Time and Embedded Database Systems ..............................................
28.4 The COMET Approach ..................................................................................................
28.5 Summary .........................................................................................................................

29

26-1
26-3
26-7
26-8
26-17

28-1
28-1
28-2
28-3
28-6
28-16

DeeDS NG: Architecture, Design, and Sample Application Scenario
Sten F. Andler, Marcus Brohede, Sanny Gustavsson and Gunnar Mathiason ..............................
29.1 Introduction ....................................................................................................................
29.2 Active Research Problems ..............................................................................................
29.3 DeeDS NG ......................................................................................................................
29.4 Related Work ...................................................................................................................
29.5 Summary ........................................................................................................................


29-1
29-1
29-4
29-5
29-16
29-17


CRC-C6781 FM.tex

16/6/2007

14: 58

Page xiii

xiii

Contents

VI

30

Formalisms, Methods, and Tools
State Space Abstractions for Time Petri Nets
Bernard Berthomieu and François Vernadat ................................................................................
30.1 Introduction ....................................................................................................................
30.2 Time Petri Nets and Their State Space ...........................................................................
30.3 State Space Abstractions Preserving Markings and Traces ...........................................

30.4 State Space Abstractions Preserving States and Traces ..................................................
30.5 Abstractions Preserving States and Branching Properties ............................................
30.6 Computing Experiments ................................................................................................
30.7 Conclusion and Further Issues .......................................................................................

31

Process-Algebraic Analysis of Timing and Schedulability
Properties
Anna Philippou and Oleg Sokolsky ................................................................... 31-1
31.1
31.2
31.3
31.4

32

Introduction ....................................................................................................................
Modeling of Time-Sensitive Systems .............................................................................
Modeling of Resource-Sensitive Systems .......................................................................
Conclusions .....................................................................................................................

Modular Hierarchies of Models for Embedded Systems
32.1
32.2
32.3
32.4
32.5
32.6
32.7


33

Manfred Broy ..........
Motivation .......................................................................................................................
Comprehensive System Modeling Theory .....................................................................
Structuring Interfaces .....................................................................................................
Refinement ......................................................................................................................
Composition and Combination .....................................................................................
Modeling Time ................................................................................................................
Perspective, Related Work, Summary, and Outlook ......................................................

Hardware/Software Codesign
34.1
34.2
34.3
34.4
34.5
34.6

35

31-1
31-4
31-9
31-19
32-1
32-1
32-3
32-10

32-15
32-18
32-20
32-23

Metamodeling Languages and Metaprogrammable Tools
Matthew Emerson, Sandeep Neema and Janos Sztipanovits ........................................................
33.1 Introduction ....................................................................................................................
33.2 Modeling Tool Architectures and Metaprogrammability .............................................
33.3 A Comparison of Metamodeling Languages .................................................................
33.4 Relating Metamodeling Languages and
Metaprogrammable Tools ...............................................................................................
33.5 Conclusion ......................................................................................................................

34

30-1
30-1
30-2
30-5
30-8
30-13
30-15
30-16

Wayne Wolf ...............................................................
Introduction ....................................................................................................................
Hardware/Software Partitioning Algorithms .................................................................
Cosynthesis Algorithms ..................................................................................................
CPU Customization ........................................................................................................

Codesign and System Design ..........................................................................................
Summary .........................................................................................................................

33-1
33-1
33-3
33-9
33-14
33-16
34-1
34-1
34-2
34-4
34-5
34-6
34-7

Execution Time Analysis for Embedded Real-Time Systems
Andreas Ermedahl and Jakob Engblom .........................................................................................
35.1 Introduction ....................................................................................................................
35.2 Software Behavior ...........................................................................................................
35.3 Hardware Timing ............................................................................................................
35.4 Timing by Measurements ...............................................................................................

35-1
35-1
35-4
35-5
35-8



CRC-C6781 FM.tex

16/6/2007

14: 58

Page xiv

xiv

Contents

35.5
35.6
35.7
35.8
35.9

VII

36

Dynamic QoS Management in Distributed Real-Time Embedded
Systems
Joseph P. Loyall and Richard E. Schantz ............................................................... 36-1
Introduction ....................................................................................................................
Issues in Providing QoS Management in DRE Systems ................................................
Solutions for Providing QoS Management in DRE Systems ........................................
Case Studies of Providing QoS Management ................................................................

Conclusions .....................................................................................................................

37-1
37-1
37-2
37-4
37-9
37-14

Embedded Systems and Software Technology in the Automotive
Domain
Manfred Broy ........................................................................................................ 38-1
38.1
38.2
38.3
38.4
38.5
38.6
38.7
38.8
38.9

39

36-1
36-2
36-5
36-12
36-30


Embedding Mobility in Multimedia Systems and Applications
Heonshik Shin ...............................................................................................................................
37.1 Introduction ....................................................................................................................
37.2 Challenges for Mobile Computing with Multimedia ....................................................
37.3 System-Layer Approaches ...............................................................................................
37.4 Application-Layer Approaches .......................................................................................
37.5 Conclusions .....................................................................................................................

38

35-10
35-15
35-15
35-15
35-17

Experiences with Real-Time and Embedded Systems

36.1
36.2
36.3
36.4
36.5

37

Timing by Static Analysis ................................................................................................
Hybrid Analysis Techniques ...........................................................................................
Tools for WCET Analysis ................................................................................................
Industrial Experience with WCET Analysis Tools .........................................................

Summary .........................................................................................................................

Introduction ....................................................................................................................
The History ......................................................................................................................
State of Practice Today ....................................................................................................
The Domain Profile ........................................................................................................
The Future .......................................................................................................................
Practical Challenges ........................................................................................................
Research Challenges ........................................................................................................
Comprehensive Research Agenda ..................................................................................
Conclusion ......................................................................................................................

38-1
38-2
38-2
38-3
38-4
38-6
38-11
38-16
38-18

Real-Time Data Services for Automotive Applications
Gurulingesh Raravi, Krithi Ramamritham and Neera Sharma ...................................................
39.1 Introduction ....................................................................................................................
39.2 Real-Time Data Issues in Automotive Applications ......................................................
39.3 Adaptive Cruise Control: An Overview .........................................................................
39.4 Our Goals and Our Approach ........................................................................................
39.5 Specifics of the Dual Mode System ................................................................................
39.6 Specifics of the Real-Time Data Repository ..................................................................

39.7 Robotic Vehicle Control: Experimental Setup ...............................................................
39.8 Results and Observations ...............................................................................................
39.9 Related Work ...................................................................................................................
39.10 Conclusions and Further Work ......................................................................................

39-1
39-1
39-2
39-5
39-7
39-8
39-10
39-12
39-13
39-17
39-18

Index .......................................................................................................................................................... I-1


CRC-C6781 FM.tex

16/6/2007

14: 58

Page xv

Preface


In the last two decades, we have witnessed an explosive growth of real-time and embedded systems being
used in our daily life. A real-time system is required to complete its work and deliver its services on a
timely basis. In other words, real-time systems have stringent timing requirements that they must meet.
Examples of real-time systems include digital control, command and control, signal processing, and
telecommunication systems. Every day these systems provide us with important services. When we drive,
they control the engine and brakes of our car and regulate traffic lights. When we fly, they schedule and
monitor the takeoff and landing of our plane, make it fly, maintain its flight path, and keep it out of harm’s
way. When we are sick, they monitor and regulate our blood pressure and heartbeats. When we are well,
they entertain us with electronic games and joy rides. When we invest, they provide us with up-to-date
stock quotes.
Real-time and embedded systems are gaining more and more importance in our society. Recognizing the
importance of these systems, the National Science Foundation has recently established a research program
dedicated to embedded systems. The European Union (EU), European countries, and Asian countries have
also established many research programs in real-time and embedded systems. Therefore, we can anticipate
many important and exciting results being developed in this area.
This book is intended to provide a comprehensive coverage of the most advanced and timely topics in
real-time and embedded systems. A major goal is to bring together researchers in academic institutions
and industry so that cross-fertilization can be facilitated. The authors are chosen from both types of
institutions.
We would like to thank Sartaj Sahni for inviting us to edit this handbook. We are grateful to all the
authors and coauthors who took time from their busy schedules to contribute to this handbook. Without
their efforts, this handbook would not have been possible. Theresa Delforn at CRC has done a superb job
in managing the project.
This work was supported in part by the National Science Foundation (NSF) under Grants DMI-0300156,
DMI-0556010, CCR-0329609, CNS-0614886, CNS-0509327, and CNS-0509143; and by the Army Research
Office (ARO) under DAAD19-01-1-0473 and W911NF-05-1-0182. Findings contained herein are not
necessarily those of NSF and ARO.

xv



CRC-C6781 FM.tex

16/6/2007

14: 58

Page xvi


CRC-C6781 FM.tex

16/6/2007

14: 58

Page xvii

Editors

Insup Lee is the Cecilia Fitler Moore Professor of Computer and Information Science. He received the BS
degree in mathematics from the University of North Carolina, Chapel Hill, in 1977 and the PhD degree
in computer science from the University of Wisconsin, Madison, in 1983. He joined the Penn faculty in
the Department of Computer and Information Science in 1983 and was CSE Undergraduate Curriculum
Chair during 1994–1997. He holds a secondary appointment in the Department of Electrical and Systems
Engineering.
His research interests include real-time systems, embedded and hybrid systems, cyber physical systems,
formal methods and tools, medical device systems, wireless sensor networks, and software engineering.
The major theme of his research activity has been to assure and improve the correctness, safety, and
timeliness of real-time and embedded systems.

He was chair of IEEE Computer Society Technical Committee on Real-Time Systems during 2003–2004.
He has served on numerous program committees and chaired many international conferences and workshops, including RTSS, RTCSA, ISORC, CONCUR, EMSOFT, RV, and HCMDSS. He has also served on
various steering and advisory committees of technical societies, including ACM SIGBED, IEEE TCRTS,
Runtime Verification, ATVA, and Technical Advisory Group (TAG) on Networking and Information Technology of the President’s Council of Advisors on Science and Technology (PCAST). He has served on the
editorial boards of several scientific journals, including IEEE Transactions on Computers, Formal Methods
in System Design, and Real-Time Systems Journal. He is an IEEE Fellow and an IEEE CS Distinguished
Visitor Speaker.
Joseph Y-T. Leung, PhD, is distinguished professor of computer science in New Jersey Institute of Technology. He received his BA in mathematics from Southern Illinois University at Carbondale and his PhD
in computer science from the Pennsylvania State University. Since receiving his PhD, he has taught at
Virginia Tech, Northwestern University, University of Texas at Dallas, University of Nebraska at Lincoln,
and New Jersey Institute of Technology. He has been the chairman at University of Nebraska at Lincoln
and New Jersey Institute of Technology.
Dr. Leung is a member of ACM and a senior member of IEEE. His research interests include scheduling
theory, real-time systems, computational complexity, discrete optimization, and operating systems. His
research has been supported by NSF, ONR, FAA, and Texas Instruments.
Sang Hyuk Son is a professor at the Department of Computer Science of University of Virginia. He
received the BS degree in electronics engineering from Seoul National University, the MS degree from
KAIST, and the PhD degree in computer science from University of Maryland, College Park. He has been a
visiting professor at KAIST, City University of Hong Kong, Ecole Centrale de Lille in France, and Linkoping
University in Sweden.
His current research interests include real-time computing, data services, QoS management, wireless
sensor networks, and information security. He has served as an associate editor of IEEE Transactions
xvii


CRC-C6781 FM.tex

xviii

16/6/2007


14: 58

Page xviii

Editors

on Parallel and Distributed Systems, and is currently serving as an associate editor for Real-Time Systems
Journal and Journal of Business Performance Management. He has been on the executive board of the
IEEE TC on Real-Time Systems, and served as the program chair or general chair of several real-time
systems and sensor networks conferences, including IEEE Real-Time Systems Symposium. He received
the Outstanding Contribution Award at the IEEE Conference on Embedded and Real-Time Computing
Systems and Applications in 2004.


CRC-C6781 FM.tex

16/6/2007

14: 58

Page xix

Contributors

Tarek Abdelzaher

Bernard Berthomieu

Paul Caspi


Department of Computer Science
University of Illinois at
Urbana-Champaign
Urbana, Illinois

Laboratoire d’Architecture et
d’Analyse des Systèmes du CNRS
Toulouse, France

Verimag Laboratory
(CNRS) Gières, France

Azer Bestavros

EECS Department
Vanderbilt University
Nashville, Tennessee

Luis Almeida
Departamento de Electrónica,
Telecomunicações e Informática
Universidade de Aveiro, Campo
Universitário
Aveiro, Portugal

Sten F. Andler
School of Humanities and
Informatics
University of Skövde

Skövde, Sweden

Anish Arora
Department of Computer Science
and Engineering
Ohio State University
Columbus, Ohio

Theodore P. Baker

Computer Science Department
Boston University
Boston, Massachusetts

Marcus Brohede
School of Humanities and
Informatics
University of Skövde
Skövde, Sweden

Manfred Broy
Software and Systems Engineering
Institut für Informatik, Technische
Universität München
München, Germany

Alan Burns
Department of Computer Science
University of York
York, United Kingdom


Department of Computer Science
Florida State University
Tallahassee, Florida

Giorgio C. Buttazzo

Sanjoy K. Baruah

Marco Caccamo

Department of Computer Science
University of North Carolina
Chapel Hill, North Carolina

Lucia Lo Bello
Dipartimento di Ingegneria
Informatica e delle
Telecomunicazioni
Università di Catania
Catania, Italy

RETIS Lab
Scuola Superiore Sant’Anna
Pisa, Italy

Gan Deng

José Luis Díaz
Departamento de Informática

Universidad de Oviedo
Gijón, Spain

Lisa Cingiser DiPippo
Department of Computer Science
University of Rhode Island
Kingston, Rhode Island

Matthew Emerson
Institute for Software
Integrated Systems
Vanderbilt University
Nashville, Tennessee

Jakob Engblom
Virtutech AB
Stockholm, Sweden

Andreas Ermedahl
Department of Computer
Science and Electronics
Mälardalen University
Västerås, Sweden

Department of Computer Science
University of Illinois at
Urbana-Champaign
Urbana, Illinois

Victor Fay-Wolfe


Mário Calha

Joaquim Ferreira

Departamento de Informática
Faculdade de Ciˆencias
Universidade de Lisboa
Lisboa, Portugal

Escola Superior de Technologia
Instituto Politécnico de
Castelo Branco
Castelo Branco, Portugal

Department of Computer Science
University of Rhode Island
Kingston, Rhode Island

xix


CRC-C6781 FM.tex

16/6/2007

14: 58

Page xx


xx

Contributors

Sebastian Fischmeister

Jihong Kim

Joseph P. Loyall

Department of Computer and
Information Science
University of Pennsylvania
Philadelphia, Pennsylvania

School of Computer Science and
Engineering
Seoul National University
Seoul, Korea

BBN Technologies
Cambridge, Massachusetts

José Alberto Fonseca

Kanghee Kim

Departamento de Electrónica,
Telecomunicações e Informática
Universidade de Aveiro, Campo

Universitário
Aveiro, Portugal

School of Computer Science and
Engineering
Seoul National University
Seoul, Korea

Angela Uvarov Frolov
Department of Computer Science
University of Rhode Island
Kingston, Rhode Island

School of Electrical Engineering
and Computer Science
Seoul National University
Seoul, Korea

Daniel F. García

Christoph M. Kirsch

Saehwa Kim

Departamento de Informática
Universidad de Oviedo
Gijón, Spain

Department of Computer Sciences
University of Salzburg

Salzburg, Austria

Christopher D. Gill

Tei-Wei Kuo

CSE Department
Washington University
St. Louis, Missouri

Sanny Gustavsson
School of Humanities and
Informatics
University of Skövde
Skövde, Sweden

Jörgen Hansson
Software Engineering Institute
Carnegie Mellon University
Pittsburgh, Pennsylvania

Ka Man Ho
Department of Computer Science
City University of Hong Kong
Kowloon, Hong Kong

Seongsoo Hong
School of Electrical Engineering
and Computer Science
Seoul National University

Seoul, Korea

Chih-Yuan Huang
Department of Computer Science
and Information Engineering
Graduate Institute of Networking
and Multimedia
National Taiwan University
Taipei, Taiwan

Department of Computer Science
and Information Engineering
Graduate Institute of Networking
and Multimedia
National Taiwan University
Taipei, Taiwan

Chang-Gun Lee
Department of Electrical
Engineering
Ohio State University
Columbus, Ohio

Insup Lee
Department of Computer and
Information Science
University of Pennsylvania
Philadelphia, Pennsylvania

Victor C. S. Lee

Department of Computer Science
City University of Hong Kong
Kowloon, Hong Kong

Joseph Y-T. Leung
Department of Computer Science
New Jersey Institute of Technology
Newark, New Jersey

Shi-Wu Lo
Department of Computer Science
and Information Engineering
National Chung-Cheng University
Chia-Yi, Taiwan

Kevin Jeffay

José María López

Department of Computer Science
University of North Carolina
Chapel Hill, North Carolina

Departamento de Informática
Universidad de Oviedo
Gijón, Spain

Ricardo Marau
Departamento de Electrónica,
Telecomunicações e Informática

Universidade de Aveiro, Campo
Universitário
Aveiro, Portugal

Ernesto Martins
Departamento de Electrónica,
Telecomunicações e Informática
Universidade de Aveiro, Campo
Universitário
Aveiro, Portugal

Gunnar Mathiason
School of Humanities and
Informatics
University of Skövde
Skövde, Sweden

Sang Lyul Min
School of Computer Science and
Engineering
Seoul National University
Seoul, Korea

Orazio Mirabella
Dipartimento di Ingegneria
Informatica e delle
Telecomunicazioni
Università di Catania
Catania, Italy


Sandeep Neema
Institute for Software Integrated
Systems
Vanderbilt University
Nashville, Tennessee

Joseph Kee-Yin Ng
Department of Computer Science
Hong Kong Baptist University
Kowloon Tong, Hong Kong

Michael J. Ocean
Computer Science Department
Boston University
Boston, Massachusetts

Ai-Chun Pang
Department of Computer Science
and Information Engineering
Graduate Institute of Networking
and Multimedia
National Taiwan University
Taipei, Taiwan


CRC-C6781 FM.tex

16/6/2007

14: 58


Page xxi

xxi

Contributors

Paulo Pedreiras

Douglas C. Schmidt

John A. Stankovic

Departamento de Electrónica,
Telecomunicações e Informática
Universidade de Aveiro, Campo
Universitário
Aveiro, Portugal

EECS Department
Vanderbilt University
Nashville, Tennessee

Department of Computer Science
University of Virginia
Charlottesville, Virginia

Raja Sengupta

Janos Sztipanovits


Anna Philippou
Department of Computer Science
University of Cyprus
Nicosia, Cyprus

Krithi Ramamritham
Department of Computer
Science and Engineering
Indian Institute of
Technology
Powai, Mumbai, India

Gurulingesh Raravi
Department of Information
Technology
Indian Institute of Technology
Powai, Mumbai, India

Pascal Raymond
Verimag Laboratory
(CNRS) Gières, France

John Regehr
School of Computing
University of Utah
Salt Lake City, Utah

Loren J. Rittle
Pervasive Platforms and

Architectures Lab
Motorola Labs
Schaumburg, Illinois

Tajana Simunic Rosing
Department of Computer Science
and Engineering
University of California
San Diego, California

Richard E. Schantz
BBN Technologies
Cambridge, Massachusetts

Department of Civil Engineering
University of California
Berkeley, California

Neera Sharma
Department of Computer Science
and Engineering
Indian Institute of Technology
Powai, Mumbai, India

Heonshik Shin
School of Computer Science
and Engineering
Seoul National University
Seoul, Korea


Insik Shin

Institute for Software Integrated
Systems
Vanderbilt University
Nashville, Tennessee

Aleksandra Tešanovic´
Philips Research Laboratories
Eindhoven, The Netherlands

Stavros Tripakis
CNRS/Verimag and Cadence
Berkeley Labs
Berkeley, California

François Vernadat

Department of Computer and
Information Science
University of Pennsylvania
Philadelphia, Pennsylvania

Laboratoire d’Architecture et
d’Analyse des Systèmes du CNRS
Toulouse, France

Valter Silva

Tech-X Corporation

Boulder, Colorado

Escola Superior de Tecnologia e
Gestão de Águeda
Universidade de Aveiro
Águeda, Portugal

Prasun Sinha
Department of Computer Science
and Engineering
Ohio State University
Columbus, Ohio

Oleg Sokolsky

Nanbor Wang

Andy Wellings
Department of Computer Science
University of York
York, United Kingdom

Wayne Wolf
Department of Electrical Engineering
Princeton University
Princeton, New Jersey

Department of Computer and
Information Science
University of Pennsylvania

Philadelphia, Pennsylvania

Bell Labs
Alcatel-Lucent
Murray Hill, New Jersey

Sang Hyuk Son

Hongwei Zhang

Department of Computer Science
University of Virginia
Charlottesville, Virginia

Ming Xiong

Department of Computer Science
Wayne State University
Detroit, Michigan


CRC-C6781 FM.tex

16/6/2007

14: 58

Page xxii



CRC-C6781 CH001.tex

17/5/2007

18: 43

Page 1

1
Introduction and
Overview
Insup Lee
University of Pennsylvania

Joseph Y-T. Leung

1.1
1.2

Introduction ....................................................................... 1-1
Overview ............................................................................ 1-2

New Jersey Institute of Technology

Sang Hyuk Son
University of Virginia

1.1

Introduction


In the last two decades, we have witnessed an explosive growth of real-time and embedded systems being
used in our daily life. A real-time system is required to complete its work and deliver its services on a
timely basis. In other words, real-time systems have stringent timing requirements that must be met.
Examples of real-time systems include digital control, command and control, signal processing, and
telecommunication systems. Every day these systems provide us with important services. When we drive,
they control the engine and brakes of our car and also regulate traffic lights. When we fly, they schedule
and monitor the takeoff and landing of our plane, make it fly, maintain its flight path, and keep it out
of harm’s way. When we are sick, they monitor and regulate our blood pressure and heartbeats. When
we are well, they entertain us with electronic games and joy rides. When we invest, they provide us with
up-to-date stock quotes. Unlike PCs and workstations that run non-real-time applications, such as our
editor and network browser, the computers and networks that run real-time applications are often hidden
from our view. When real-time systems work correctly and well, they make us forget their existence.
Real-time and embedded systems are gaining more and more importance in our society. Recognizing the
importance of these systems, the National Science Foundation has recently established a research program
dedicated to embedded systems. The European Union (EU), European countries, and Asian countries also
have established many research programs in real-time and embedded systems. Therefore, we can anticipate
many important and exciting results being developed in this area.
This book is intended to provide a comprehensive coverage of the most advanced and timely topics in
real-time and embedded systems. A major goal is to bring together researchers in academic institutions
and industry so that cross-fertilization can be facilitated. The authors are chosen from both types of
institutions.
This is an advanced book in real-time and embedded systems. It is intended for an audience with
some knowledge of real-time and embedded systems. The book has chapters that cover both theory and
practice. It is suitable for faculty and graduate students in academic institutions, researchers in industrial
laboratories, as well as practitioners who need to implement real-time and embedded systems.
1-1


CRC-C6781 CH001.tex


17/5/2007

1-2

1.2

18: 43

Page 2

Handbook of Real-Time and Embedded Systems

Overview

This book has seven major parts, each of which has several chapters. They are (I) Real-Time Scheduling and Resource Management; (II) Programming Languages, Paradigms, and Analysis for Real-Time
and Embedded Systems; (III) Operating Systems and Middleware for Real-Time and Embedded
Systems; (IV) Real-Time Communications/Sensor Networks; (V) Real-Time Database/Data Services;
(VI) Formalisms, Methods, and Tools; and (VII) Experiences with Real-Time and Embedded Systems.
Part I covers real-time scheduling and resource management issues. Today’s embedded systems are becoming more complex than ever and are required to operate under stringent performance and resource
constraints. To achieve a predictable behavior and provide an offline guarantee of the application performance, deterministic and analyzable algorithms are required to manage the available resources, especially
involving scheduling, intertask communication, synchronization, and interrupt handling. Chapter 2 illustrates some problems that may arise in real-time concurrent applications and some solutions that can be
adopted in the kernel to overcome these problems.
Chapter 3 considers the scheduling of systems of independent sporadic tasks to meet hard deadlines
upon platforms comprised of several identical processors. Although this field is very new, a large number
of interesting and important results have recently been obtained. The authors focus on presenting the
results within the context of what seems to be a natural classification scheme.
In Chapter 4, the author argues that while static priority scheduling has worked well for systems where
there exists a natural strict priority relationship between tasks, it can be difficult to use it to satisfy the
performance requirements of systems when the priority relationships between tasks are either not strict

or not obvious. Rate-based resource allocation is a more flexible form of real-time resource allocation that
can be used to design systems in which performance requirements are better described in terms of required
processing rates rather than priority relationships. In a rate-based system, a task is guaranteed to make
progress according to a well-defined rate specification. The author summarizes the theory and practice
of rate-based resource allocation and demonstrates how rate-based methods can provide a framework for
the natural specification and realization of timing constraints in real-time and embedded systems.
A hierarchical scheduling framework has been introduced to support hierarchical resource sharing
among applications under different scheduling services. The hierarchical scheduling framework can be
generally represented as a tree of nodes, where each node represents an application with its own scheduler
for scheduling internal workloads, and resources are allocated from a parent node to its children nodes.
In Chapter 5, the authors present an analysis of compositional real-time schedulability in a hierarchical
scheduling framework.
Energy consumption has become one of the most important design constraints for modern embedded systems, especially for mobile embedded systems that operate with a limited energy source such
as batteries. For these systems, the design process is characterized by a trade-off between a need for
high performance and low-power consumption, emphasizing high performance to meeting the performance constraints while minimizing the power consumption. Chapter 6 discusses power-aware resource
management techniques for low-power embedded systems.
Meeting deadline constraints is of paramount importance in real-time systems. Sometimes it is not
possible to schedule all the tasks to meet their deadlines. In situations like this, it is often more desirable to
complete some portions of every task, rather than giving up completely the processing of some tasks. The
Imprecise Computation Model was introduced to allow for the trade-off of the quality of computations in
favor of meeting the deadline constraints. In this model, a task is logically decomposed into two subtasks,
mandatory and optional. The mandatory subtask of each task is required to be completed by its deadline,
while the optional subtask can be left unfinished. If a task has an unfinished optional subtask, it incurs an
error equal to the execution time of its unfinished portion. If the importance of the tasks are not identical,
we can assign weights to each task, and the resulting task system is called a weighted task system. Chapter 7
describes algorithms for minimizing the total weighted error and the maximum weighted error. The
algorithms are for single processor, parallel and identical processor, and uniform processor environments.



×