Real Time Systems and Programming Languages Ada Real Time Java and C Real Time POSIX 4th Edition Alan Burns - The full ebook version is ready for instant download
Real Time Systems and Programming Languages Ada Real Time Java and C Real Time POSIX 4th Edition Alan Burns - The full ebook version is ready for instant download
https://ebookultra.com/download/real-time-systems-design-and-
analysis-3rd-edition-phillip-a-laplante/
https://ebookultra.com/download/real-time-concepts-for-embedded-
systems-1st-edition-qing-li/
https://ebookultra.com/download/real-time-shading-1st-edition-marc-
olano/
DSP for Embedded and Real Time Systems Expert Guide 1st
Edition Robert Oshana
https://ebookultra.com/download/dsp-for-embedded-and-real-time-
systems-expert-guide-1st-edition-robert-oshana/
Live Real Time 3D Echocardiography 1st Edition Navin Nanda
https://ebookultra.com/download/live-real-
time-3d-echocardiography-1st-edition-navin-nanda/
https://ebookultra.com/download/real-time-embedded-components-and-
systems-with-linux-and-rtos-2nd-revised-ed-edition-pratt/
https://ebookultra.com/download/real-time-embedded-multithreading-
using-threadx-and-mips-edward-l-lamie/
https://ebookultra.com/download/the-inverse-method-parametric-
verification-of-real-time-unbedded-systems-1st-edition-etienne-andre/
https://ebookultra.com/download/a-real-time-approach-to-process-
control-3rd-edition-william-y-svrcek/
Real Time Systems and Programming Languages Ada
Real Time Java and C Real Time POSIX 4th Edition
Alan Burns Digital Instant Download
Author(s): Alan Burns, Andy Wellings
ISBN(s): 9780321417459, 0321417453
Edition: 4
File Details: PDF, 49.89 MB
Year: 2009
Language: english
Real-Time Systems and Programming
Languages
INTERNATIONAL COMPUTER SCIENCE SERIES
Editor A D McGettrick University of Strathclyde
Consulting
Fourth Edition
University of York
A
ADDISON-WESLEY
VV
Animprint of Pearson Education
Harlow, England London
-
New York
-
Boston
- - San Francisco -
Toronto -
Sydney -
Singapore -
Hong Kong
Tokyo Seoul Taipei New Delhi Cape Town
- - - - - Madrid -
Mexico City Amsterdam
- -
Munich - Paris -
Milan
Pearson Education Limited
Edinburgh Gate
Harlow
Essex CM20 2JE
England
and Associated Companies throughout the world
ISBN: 978-0-321-41745-9
A catalogue record for this book is available from the British Library
of Congress Cataloging-in-Publication Data
Library
for this book be obtained from the Library of Congress
A catalogue record can
M
10987654321
1312111009
sustainable forests.
The publisher’s
policy is to use paper nzanufactured from
1
Contents
Preface xiii
v
Vi CONTENTS
88
Summary . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . .
Further 89
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
95
Concurrent programming
4.1 Processes and tasks/threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Task 103
4.3 representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.9 operating—system—supported
Language—supported concurrency 131 versus
132
Summary . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . .
Further 133
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
5 .4 145
Semaphores . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . .
critical 156
5.5 Conditional regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
179
5.10 Shared memory multiprocessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
183
5.11 Simple embedded system revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
185
Summary . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . .
Further 186
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Selective 201
6.4 waiting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.6 Non—determinism,
selective waiting and synchronization primitives 205
219
6.9 Simple embedded system revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
220
Summary . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . .
Further 221
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
CONTENTS vii
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r. . 304
Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
11 real-time 365
Scheduling systems
executive 366
11.1 The cyclic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
378
11.6 Sporadic and aperiodic tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
413
11.15 Scheduling for power—awaresystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
414
11.16 Incorporating system overheads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
419
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Further 420
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
426
12.2 Programming preemptive priority-based systems . . . . . . . . . . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
13 faults 457
Tolerating timing
13.1 and timing faults 457
Dynamic redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . .
492
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Further 493
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
CONTENTS ix
.p.
. . 572 '
16 Conclusions 575
References 579
Index 587
Supporting resources
For instructors
0 Solutions to exercises
0
Example examination questions
0 Code fragments
o PowerPoint slides
For more information please contact your local Pearson Education sales
representative or visit www.pearsoned.co.uk/burns
List of Figures
10.1 A simple task with input and output jitter constraints. . . . . . . . . . . . . . . 350
10.2 Three threads implementing input and output jitter constraints, . . . . . 352
10.3 The Logical Execution Time model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
OCPP. . . . . . . . . . . . . . . . . . . . . . . . . . 388
11.9 Example of priority inheritance —
ICPP. . . . . . . . . . . . . . . . . . . . . . . . . . . 389
11.10 Releases of sporadic tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
11.11 PDC example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
11.12 Overheads when executing tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
11.13 The behaviour of four periodic tasks in Exercise 11.4. . . . . . . . . . . . . . 422
Audience
The book is aimed at Final Year and Masters students in
Computer Science and related
disciplines. It has also been written with the professional software engineer, and real-
time systems engineer, in mind. Readers are assumed to have knowledge of sequential
programming languages and some prior experience of C, Java and Ada, and to be familiar
with the basic tenets of software engineering. The material presented reflectsthe content
of courses developed over a number of years by the authors at various universities and
for industry. These courses
specificallyaddress real—timesystems and programming
languages.
xiii
xiv PREFACE
for software As C is
sequential language, it is used in conjunction with the
production. a
POSIX family of operating system interfaces (in particular, the real-time extensions). To
only one of these languages should find sufficient material for their needs. The authors
believe that a full appreciation of a language like Ada or Java, say, can only be obtained
through a comparative study of their facilities.
In all, the book contains 16 chapters, the first 8 of which are loosely organized
into the following three groups. Chapter l represents an extended introduction. The
characteristics and requirements of real-time systems are presented, then an overview
of the design of such systems is given. Design is not the primary focus of this book;
nevertheless, it is important to discuss implementation within an appropriate context.
Chapters 2 and 3 concern themselves with the production of reliable software
resumption and termination models are described, as are the language primitives found
in Ada and Java.
Real~time inherently concurrent,
systems are and therefore the study of this aspect
of programming languages is fundamental. Chapter 4 introduces the notions of process,
tasks and thread the many different
and reviews models that are used by language and
operating system designers. The term task is used generically to represent a concurrent
activity. Communication between tasks is considered in the following two chapters.
Firstly shared—variable
methods are including the use of semaphores, monitors,
described
mutexes and protected objects. Message—based models are also important in modern
systems. It is therefore appropriate that a large portion of the book focuses on how to
PREFACE XV
meet them. Chapter 9 introduces the notions of time and clocks, along with the role of
temporal scopes for specifying timing constraints. Chapter 10 then shows the common
programming abstractions that are used to represent these constraints. Ensuring that
timing constraints can be met at run-time requires real-time scheduling. Hard real-time
systems have timing constraints that must be satisfied; soft systems can occasionally fail
to perform adequately. The mathematical
analysis that underpins real-time scheduling is
covered in Chapter 11: both priority and deadline—based
scheduling is considered. The
support provided for programming schedulable system is then covered in Chapter 12.
Chapter 13 brings together fault tolerance and real-time, focusing on the options available
to the programmer when timing faults occur at run—time.
One important requirement of many real-time systems is that they incorporate ex-
ternal devices that must be programmed (that is, controlled) as part of the application
software. This low—levelprogramming is at variance with the abstract approach to soft-
ware production that characterizes software engineering. Chapter I4 considers ways in
which low—levelfacilities can be successfully incorporated into high-level languages.
The final major chapter of the book is a case
study.AAn example from a mine
control system is used. Inevitably a single scaled down study cannot illustrate all the
issues covered in the previous chapters; in particular factors such as size and
complexity
are not addressed. Nevertheless, the case study does cover many important aspects of
real-time systems.
All chapters have summaries and further reading lists. Most also have lists of
"
material, and, as a result, we have restructured the book to remove some of the material
that can be found elsewhere.
0 The material on design has been pruned and incorporated into the Introduction.
The advent of the UML real-time profilemeant that we could no longer give this
xvi PREFACE
topic the attention it deserved. As design issues are not our focus, we decided it
was best to cover less.
unable to do justice to this topic, but did not want to lose some of the important
real—timeissues.
0 The removal of occam2 from the book left the Execution Environment chap—
ter weak, so again we have removed it and distributed the remaining material
o The main new material has been introduced into the part of the book that focuses
on timing issues. What was previously two chapters has now been expanded into
five chapters.
We have also update throughout our treatment of Ada, Real—TimeJava and C/Real-
Time POSIX to reflect the recent revisions to the associated definitions and standards.
Teaching Aids
This text is supported by further material available via the following WWW site:
http: //www .
pearsoned . co . uk/burns
Overhead projection foil layouts are available for many parts of the book. Also available
are solutions to some of the exercises. We will, over time, add further exercises, and
where appropriate new examples and additional teaching material. Teachers/lecturers
who make us of this book are invited to contribute to these web pages.
ment, scheduling theories, reuse, language design, kernel design, communication pro—
tocols, distributed and parallel architectures, and program code analysis. The aim of the
PREFACE xvii
http://www.cs.york.ac.uk/rts
for providing us with a stimulating environment and for many enlightening discussions,
particularly Lj erka Beus—Dukic, Geoff Davies, John McDermid, Gary Morgan, Rick
Pack, Rob Stone and Hussein Zedan.
During 1988 Alan Burns was on sabbatical at the Universities of Queensland and
’
Houston. We would like to thank all staff at these institutions particularly Andrew Lister,
Charles McKay and Pat Rogers.
This book would not have been possible without the use of electronic mail over
JANET. We would like to thank the Computer Board of the United Kingdom University
Grants Council and the Science and Engineering Research Council for providing this
invaluable service.
Finally we would like to give special thanks
Sylvia Holmes and Carol Burns. to
Sylvia for the many hours she has spent painstakingly proof reading the final manuscript,
and Carol for the many evenings she has tolerated our meetings and discussions.
Many people have helped in the production of the Second Edition of this book. In
particular we would like to thank: Alejandro Alonso, Angel Alvarez, Sergio Arevalo,
Neil Audsley, Martin Dorey, Michael Gonzalez Harbour, Stuart Mitchell, Gary Morgan,
Offer Pazy and Juan de la Puente.
We also wish to acknowledge the very helpful comments given by the technical
this edition.
would like to thank all those people who us comments on the
Finally, we gave
Second Edition of the book.
We would like to thank all those people who gave us comments on the Third Edition of
thebook, particularly Yolande Berbers. the other members of the
We also wish to thank
Ada Rapporteur Group, the Technical Interpretation Committee for the Real—TimeSpec-
ification for Java (particularly Peter Dibble), and the Java Expert Groups (J SR 282 and
301) for their help in understanding the nuances of Ada and Real—TimeJava. Sanjoy Ba-
rauh, Michael Gonzalez Harbour and Bev Littlewood have also given us invaluable help
with multiprocessor scheduling, Real—TimePOSIX and software reliability estimations,
respectively.
We would like to acknowledge the past and present members of the Real—Time
at York for their continuing contribution
presented.
to the material
Systems Group
Finally, a special thanks go to all the students who have taken our Real—Time
module of their degree course at York. Their continuous comments and
Systems as part
criticisms have helped keep us on our toes!
so
their range
of application widens. Built
initially as equation solvers, their influence has ex-
tended into all walks of life, from washing machines to air traffic control. One
of the fastest expanding areas of computer exploitation is that involving appli-
cations whose prime function is not that of information processing, but which
nevertheless require information processing in order to carry out their prime
function. A microprocessor-controlled washing machine is a good example of
such a system. Here, the prime function is to wash clothes; however, depending
on the type of clothes to be washed, different ‘wash programs’ must be exe-
cuted. These types of computer applications are generically called real-time or
embedded. It has been estimated that 99% of the worldwide production of mi-
croprocessors is used in embedded systems. These embedded systems place
particular requirements on the computer languages needed to program them,
as they have different characteristics from the more traditional information pro-
cessing systems.
This book is concerned with embedded computer and their
systems pro-
gramming languages. It studies the
particular characteristics of these systems
and discusses how modern real-time and
programming languages operating
systems have evolved. in order to give the chapters continuity, three program-
ming languages are considered in detail: Ada, Java and
languages C. These
have been chosen because they are actually used for software production. As
C is a sequential language, it is used in conjunction with the POSIX
family of
operating system interfaces (in particular, the real-time extensions). To empha-
size this, it will be referred to a C/Flea/-Time POSIX. As Java was not originally
intended to be used for real-time systems development it must be augmented
with the facilities of the Real-Time Specification for Java (RTSJ). To emphasize
2 INTRODUCTION TO REAL-TIME SYSTEMS
world, and the output has to relate to that same movement. The lag from input
further definitions will be given. Young (1982) defines a real-time system to be:
In their most general sense, all these definitions cover a very wide range of com-
activities. For example, an operating system like Windows may be considered
puter
real-time in that when a user enters a command he or she will expect a response within
few seconds. it is usually not a disaster if the response is not forthcoming.
a Fortunately,
These of system can be distinguished from those where failure to respond can
types
be considered bad Indeed, for some, it is this aspect that
just as as wronga response.
others where response time is important but not
distinguishes a real-time system from
of real-time depends not only on the
crucial. Consequently, the correctness a system
also the time which the results produced.
logical result of the computation, but on at are
those where response times are important but the system will still function correctly if
missed. Soft systems can themselves be distinguished from
deadlines are occasionally
Other documents randomly have
different content
The Project Gutenberg eBook of Saarron
murtaja
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.
Language: Finnish
SAARROSLINJAN MURTAJA
Kirj.
Jules Verne
I. Laiva Delphin.
II. Lähtö.
III. Merellä.
IV. Crockston osoittaa valtioviisaan kykyä.
V. Iroquois'in kanuunankuulat ja miss Jennyn todistelut.
VI. Sataman suu Sullivan-saaren vieressä.
VII. Etelävaltioitten kenraali.
VIII. Karkaaminen.
IX. Kahden tulen välissä.
X. Kotiintulo.
I.
Laiva Delphin.
"Laiva ja lasti."
"Eikö mitään muuta?"
"Hyvä, hyvä!"
"Asia on päätetty."
"Päätetty!"
II. Lähtö.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookultra.com