100% found this document useful (1 vote)
31 views

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

The document provides information on downloading the book 'Real Time Systems and Programming Languages: Ada, Real Time Java and C, Real Time POSIX 4th Edition' by Alan Burns. It includes links to additional recommended ebooks and textbooks related to real-time systems. The book covers definitions, examples, characteristics, and programming languages for real-time systems.

Uploaded by

sipsmapachev95
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
31 views

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

The document provides information on downloading the book 'Real Time Systems and Programming Languages: Ada, Real Time Java and C, Real Time POSIX 4th Edition' by Alan Burns. It includes links to additional recommended ebooks and textbooks related to real-time systems. The book covers definitions, examples, characteristics, and programming languages for real-time systems.

Uploaded by

sipsmapachev95
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Visit https://ebookultra.

com to download the full version and


explore more ebooks or textbooks

Real Time Systems and Programming Languages Ada


Real Time Java and C Real Time POSIX 4th Edition
Alan Burns

_____ Click the link below to download _____


https://ebookultra.com/download/real-time-systems-and-
programming-languages-ada-real-time-java-and-c-real-time-
posix-4th-edition-alan-burns/

Explore and download more ebooks or textbooks at ebookultra.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Real Time Systems Design and Analysis 3rd Edition Phillip


A. Laplante

https://ebookultra.com/download/real-time-systems-design-and-
analysis-3rd-edition-phillip-a-laplante/

Real Time Concepts for Embedded Systems 1st Edition Qing


Li

https://ebookultra.com/download/real-time-concepts-for-embedded-
systems-1st-edition-qing-li/

Real time shading 1st Edition Marc Olano

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/

Real time embedded components and systems with Linux and


RTOS 2nd Revised ed Edition Pratt

https://ebookultra.com/download/real-time-embedded-components-and-
systems-with-linux-and-rtos-2nd-revised-ed-edition-pratt/

Real time embedded multithreading using ThreadX and MIPS


Edward L. Lamie

https://ebookultra.com/download/real-time-embedded-multithreading-
using-threadx-and-mips-edward-l-lamie/

The Inverse Method Parametric Verification of Real time


Unbedded Systems 1st Edition Etienne André

https://ebookultra.com/download/the-inverse-method-parametric-
verification-of-real-time-unbedded-systems-1st-edition-etienne-andre/

A Real Time Approach to Process Control 3rd Edition


William Y. Svrcek

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

SELECTED TITLES IN THE SERIES


Concurrent An
Integrated Approach to Operating Systems, Database,
Systems:
and Distributed Systems (2nd edn) J Bacon
Essentials H E Ba] and D Grnne
Programming Language
in Ada 95 (2nd edn) J G P Barnes
Programming
Java Gently (3rd edn) J Bishop
Software Design D Budgen.
Concurrent Programming A Burns and G Davies

Real—TimeSystems Ada 95, Real—Time Java and


and Programming Languages:
Real—TimePOSIX (3rd edn) A Burns and A J Wellings
(3rd edn) Wilson and Clark, updated by Clark
Comparative Programming Languages,
and (3rd edn) G Conlonris, J Dollimore
Distributed Systems: Concepts Design
and T Kindberg
Development (2nd edn) A Eliéns
Principles of Object—Oriented
Software
TM R Ellis, I R Philips and T M Lahey
Fortran 90 Programming
Program VerificationN Francez
SML M Hansen and H Rischel
Introduction to Programming using
Functional C P Hartel and H Muller
Ada 95 for C and C++ Programmers S Johnston
9:
2
J l
Algorithms and Data Structures: Design, Correctness, Analysis (2nd edn) Kingston
Computer Scientists N Nissanke
Introductory Logic and Sets for
et al.
Human—Computer Interaction J Preece
F Rabhi and G Lapalme
Algorithms: a Functional Programming Approach
Ada 95 From the Beginning (3rd edn) J Skansholm
C++ From the Beginning J Skansholm
Java From the Beginning J Skansholm
Software Engineering (6th edn) I Sonznzeiville
P Thomas and R Weedon
Object—Oriented Programming in Eiffel (2nd edn)
Miranda: The Craft of Functional Programming S Thompson
Haskell: The Craft of Functional Programming (2nd edn) S Thompson
Discrete Mathematics for Computer Scientists (2nd edn) J K Truss

Compiler Design R Wilhelm and D Maurer


S Williams and S Walmsley
Discover Delphi: Programming Principles Explained
Software Engineering with B J B Wordsworth
Real—Time Systems and
Programming Languages

Ada, Rea|~Time Java and C/Real-Time POSIX

Fourth Edition

Alan Burns and Andy Wellings

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

Visit us on the World Wide Web at.‘


www.pearsoned.co.uk
First published 1989
Second edition 1997
Third edition 2001

Fourth edition published 2009

© Pearson Education Limited 1989, 2009

Andy Wellings to be identifiedas authors of this work have been


The rights of Alan Burns and
and Patents Act 1988.
asserted by them in accordance with the Copyright, Designs
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, electronic, mechanical, photocopying, recording or
otherwise, without either the prior written permission of the publisher or a licence permitting
restricted in the United Kingdom issued by the Copyright Licensing Agency Ltd, Saffron
copying
House, 6-10 Kirby Street, London EC1N 8TS.
used herein are the property of their respective owners. of any trademark
The use in
All trademarks
this text does not vest in the author or publisher any trademark ownership rights in such trademarks,
nor does the use of such trademarks imply any affiliation with or endorsement of this book by such
0Wl'lCI‘S.

ISBN: 978-0-321-41745-9

British Library Cataloguing-in-Publication Data

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

Typeset in Times Roman by 73


10/12
the Dorset Press, Dorchester, Dorset
Printed in Great Britain by Henry Ling Ltd., at

sustainable forests.
The publisher’s
policy is to use paper nzanufactured from
1

Contents

Preface xiii

1 Introduction to real-time systems 1


1.1 Definition of a real—timesystem . . . . . . . . . . . . . . . . . . . . . . . . . . .' . . . . . . . . . 2
1.2 Examples of real-time systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Characteristics of real—ti1ne
systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 I

1.4 Development cycle for real~time systems . . . . . . . . . . . . . . . . . . . . . .'. . . . 15


15 Languages for programming real-time systems . . . . . . . . . . . . . . . . . . . . . 20
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

2 Reliability and fault tolerance 27


2.1 Reliability, failure and faults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.2 Failure modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3 Fault prevention and fault tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.4 N -version programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
2.5 Software dynamic redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2.6 The recovery block approach to software fault tolerance . . . . . . . . . . . . . 46
2.7 A comparison between N -version programming and recovery blocks . . 49
2.8 Dynamic redundancy and exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.9 Measuring and predicting the reliability of software . . . . . . . . . . . . . . . . . 52
2.10 Safety, reliability and dependability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.A . . . . . . . . . . . . . . . . . . . . . . 57

3 Exceptions and exception handling 59


3.1 Exception handling in older real—timelanguages . . . . . . . . . . . . . . . . . . . . 60
3.2 Modern exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.3 Exception handling in Ada, Java and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.4 Recovery blocks and exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

v
Vi CONTENTS

88
Summary . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . .

Further 89
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

95
Concurrent programming
4.1 Processes and tasks/threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

4.2 Concurrent execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Task 103
4.3 representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.4 Concurrent execution in Ada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

4.5 Concurrent in Java 111


execution . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .

4.6 Concurrent execution in C/Real—TimePOSIX . . . . . . . . . . . . . . . . . . . . . 116

4.7 and distributed systems 121


Multiprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.8 A simple embedded 125


system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.9 operating—system—supported
Language—supported concurrency 131 versus
132
Summary . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . .

Further 133
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

and communication 137


Shared variable-based synchronization
5.1 Mutual exclusion and condition synchronization . . . . . . . . . . . . . . . . . . 138
139
5.2 Busy waiting . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .

5.3 and 142


Suspend resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5 .4 145
Semaphores . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . .

critical 156
5.5 Conditional regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5.6 Monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

5.7 Mutexes and condition variables in C/Real—TimePOSIX . . . . . . . . . . . 160

Protected in Ada 163


5.8 objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5.9 methods in Java 171


Synchronized . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
.

179
5.10 Shared memory multiprocessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

183
5.11 Simple embedded system revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

185
Summary . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . .

Further 186
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

and communication 193


Message-based synchronization
193
6.1 Process synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6.2 Task naming and message structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195


196
6.3 Message passing in Ada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Selective 201
6.4 waiting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6.5 The Ada select statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

6.6 Non—determinism,
selective waiting and synchronization primitives 205

6.7 C/Real—TimePOSIX queues 206


message . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6.8 Distributed 210


systems . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . .

219
6.9 Simple embedded system revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

220
Summary . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . .

Further 221
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
CONTENTS vii

7 Atomic actions, concurrent tasks and reliability 227


7.1 Atomic actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
7.2 Atomic actions in C/Real—TimePOSIX, Ada and Real—TimeJava 232
7.3 Recoverable atomic actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
7.4 Asynchronous notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
7.5 Asynchronous notification in C/Real—Time POSIX . . . . . . . . . . . . . . . . 247
7.6 Asynchronous notification in Ada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
7.7 Asynchronous notification in Real—Time Java . . . . . . . . . . . . . . . . . . . . . 266
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

Resource control 285


8.1 Resource control and atomic actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
8.2 Resource management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
8.3 Expressive power and ease of use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
8.4 The requeuefacility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
8.5 Asymmetric naming and security . . . . . . . . . . . . . . . . . . . . . . . . . I . . . . . . 302
8.6 Resource usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
8.7 Deadlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . r. . 304
Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

Real-time facilities 307


9.1 The notion of time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
9.2 Access to a clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
9.3 Delaying a task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
9.4 Programming timeouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
9.5 Specifying timing requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
9.6 Temporal scopes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 . . . . . . . . . . . . . . . . . . 333

10 Programming real-time abstractions 335


10.1 Real-time tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
10.2 Programming periodic activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
10.3 Programming aperiodic and sporadic activities . . . . . . . . . . . . . . . . . . . . 341
10.4 The role of real-time events and their handlers . . . . . . . . . . . . . . . . . . . . 344
10.5 Controlling input and output jitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
10.6 Other approaches for supporting temporal scopes . . . . . . . . . . . . . . . . . . 356
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
viii CONTENTS

11 real-time 365
Scheduling systems
executive 366
11.1 The cyclic approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.2 Task~based scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

11.3 Fixed—priority scheduling (FPS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370

11.4 Utilization—based schedulability tests for FPS . . . . . . . . . . . . . . . . . . . . . 371


374
11.5 Response time analysis (RTA) for FPS . . . . . . . . . . . . . . .
., . . . . . . . . . . .

378
11.6 Sporadic and aperiodic tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.7 Task with D < T 380


systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.8 Task interactions and blocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382


386
11.9 Priority ceiling protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.10 An extendible task model for FPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390


11.11 Earliest deadline first (EDF) scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . 400

11.12 and online analysis 405


Dynamic systems . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11.13 Worst—caseexecution time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407


408
11.14 Multiprocessor scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

413
11.15 Scheduling for power—awaresystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

414
11.16 Incorporating system overheads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

419
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Further 420
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421

12 systems schedulable 425


Programming
425
12.1 Programming cyclic executives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

426
12.2 Programming preemptive priority-based systems . . . . . . . . . . . . . . . . . .

12.3 Ada and fixed~priority scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427


12.4 The Ada Ravenscar profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
434
12.5 Dynamic priorities and other Ada facilities . . . . . . . . . . . . . . . . . . . . . . .

12.6 C/Real-Time POSIX and fixed—priority scheduling . . . . . . . . . . . . . . . . 436

12.7 Real—TimeJava and fixed-priority scheduling . . . . . . . . . . . . . . . . . . . . . 438


443
12.8 Programming EDF systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12.9 Mixed scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453


454
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455

13 faults 457
Tolerating timing
13.1 and timing faults 457
Dynamic redundancy . . . . . . . . . . . . . . . . . . . . . . . . . . .

13.2 Deadline miss detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459


13.3 Overrun of worst—case execution time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
13.4 Overrun of events 471
sporadic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13.5 Overrun of resource usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474


.

13.6 Damage confinement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475


13.7 Error 485
recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . .

492
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Further 493
reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
CONTENTS ix

14 Low-level programming 495


14.1 Hardware input/output mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
14.2 Language requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
14.3 Ada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
14.4 Real—Time Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
14.5 C and older real—timelanguages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
14.6 Scheduling device drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
14.7 Memory management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528

15 Mine control study case 533


15.1 Mine drainage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
15.2 The HRT—HOOD design method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
15.3 The logical architecture design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
15.4 The physical architecture design . . . . . . . . . . . . . i . . . . . . . . . . . . . . . . . . . 545
15.5 Translation to Ada . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
~
. . . . . . . 546
15.6 Translation to Real—TimeJava . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
15.7 Fault tolerance and distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.p.
. . 572 '

Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572


Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573

16 Conclusions 575

References 579

Index 587

Supporting resources

Visit www.pearsoned.co.uk/burns to find valuable online 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

1.1 A fluid control system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4


1.2 A process control system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 A production control system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 A command and control system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 A typical embedded system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 A simple controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.7 A simple computerized controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.8 Aspects of real—timesystems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.1 Fault, error, failure, fault chain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29


2.2 Failure mode classification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.3 Graceful degradation and recovery in an air traffic control system. . . . . 35
2.4 N -Version programming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
2.5 Consistent comparison problem with three versions. . . . . . . . . . . . . . . . . 40
2.6 The domino effect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.7 Recovery block mechanism. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.8 An ideal fault—tolerant
component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
2.9 Aspects of dependability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.10 Dependability terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.11 Concurrent execution of four processes for Exercise 2.5. . . . . . . . . . . . . 57

3.1 The resumption model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67


3.2 The termination model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.3 The Java predefined
Throwable class hierarchy. . . . . . . . . . . . . . . . . . . 78

4.1 Simple state diagram for a task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98


4.2 State diagram for a task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
4.3 Fork and join. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.4 Cobegin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.5 A simple embedded system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

5.1 State diagram for a task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145


LIST OF FIGURES xi

6.1 The relationship between client and server in an RPC. . . . . . . . . . . . . . 211


6.2 The Object Management Architecture Model. . . . . . . . . . . . . . . . . . . . . . 218

7.1 Nested atomic actions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232


7.2 The structure of an action controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
7.3 Using the action controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
7.4 An exception in a nested atomic action. . . . . . . . . . . . . . . . . . . . . . . . . . . 244
7.5 Simple state transition diagram for a conversation. . . . . . . . . . . . . . . . . . 262
7.6 Simple state transition diagram illustrating forward error recovery. 266

8.1 A network router. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300

9.1 Delay times. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318


9.2 Temporal scopes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

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

11.1 Time—line for task set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 »

11.2 Time—linefor task set A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372


11.3 Gantt chart for task set A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
11.4 Time—linefor task set C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
11.5 Gantt chart for task set D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
11.6 Example of priority inversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
11.7 Example of priority inheritance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
11.8 Example of priority inheritance ~

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

14.1 Architecture with separate buses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496


14.2 Mem0ry—mapped
architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496

15.1 A mine drainage control system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534


15.2 Graph showing external devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
15.3 First-level component decomposition of the control system. . . . . . . . . 540
15.4 Pumpcontrol 1 er related interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
15.5 Other defined interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
15.6 Hierarchical decomposition of the ?umpController object. . . . . . 542
15.7 Decomposition of the Highlowwatersensors. . . . . . . . . . . . . . . . . 543
15.8 Hierarchical decomposition of the iEnvironmentMonitor. . . . . . . 544
15.9 State transition diagram for the motor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
Preface

In 1981, a software caused robot


error a stationary to move suddenly and with impressive
speed to the edge of its operational A worker crushed
area. nearby was to death.
This is just one
example of the hazards of embedded real—timesystems. It is
unfortunately not an isolated incident. Every month the newsletter Software Engineering
Notes has pages of examples of events in which the malfunctioning of real—timesystems
has put the public or the environment at risk. What these sobering descriptions illustrate
system—wide
'

is that there is a need to take a view of embedded Indeed it


systems. can
be argued that there is the requirement for real—timesystems
recognized as a to be
distinct engineering discipline. This book is a contribution towards the development of
this discipline. It cannot, of course, cover all the topics that are apposite to the study of
real-time systems engineering; it does, however, present a comprehensive description
and assessment of the programming languages and operating system standards used in
this domain. Particular emphasis is placed on language primitives and their role in the
production of reliable, safe and dependable software.

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.

Structure and content


In order to give the chapters continuity, three in
programming languages are considered
detail: Ada, Java and C. These languages have been chosen because they are actually used

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

this, it will be referred to as C/Real-Time POSIX. As Java was not originally


emphasize
intended to be used for real-time development it must be augmented with the
systems
facilities of the Real—Time Specification for Java (RTSJ). To emphasize this, it will be
referred to as Real—Time Java. Ada was designed for real-time systems development.
Other theoretical or experimental languages are discussed when they offer primitives
not available within the core languages. Practitioners who are primarily interested in

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

components. Although consideration is given to fault prevention, attention is primarily


focused on fault tolerance. Both forward and backward error recovery techniques are
considered. The use of an exception—handling facility is discussed in Chapter 3. Both

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

languages; combining as they do communication and synchronization. These models are


covered in Chapter 6. Particular. attention is given to the rendezvous primitives of Ada.
It is debatable whether issues of reliability or concurrency should have been con-
sidered first within the book. Both authors have experimented with reversing the order
and have found little to choose between the two possible approaches. The book can in
fact be used in either mode with only one or two topics being ‘out of place’. The de-
cision to cover reliability first reflects the authors’ belief that safety is the predominant
requirement of real-time systems.
The next grouping incorporates Chapters 7 and 8. In general, the relationship
as either cooperating (to achieve a common
between system tasks can be described goal)
or competing (to acquire a shared resource). Chapter 7 extends the earlier discussions
on fault tolerance by describing how reliable task cooperation can be programmed.
Central to this discussion is the notion of an atomic action and asynchronous notification

techniques. Competing processes are considered in the following chapter. An assessment


is given of different language features. One important topic here is the distinction between
conditional and avoidance synchronization within the concurrency model.
Temporal requirements constitute the distinguishing characteristic of real-time

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
"

exercises. These have been chosenhelp readers consolidate


to their understanding of the
material presented in each chapter. They mostly represent exercises that have been used
by the authors for assessment purposes.

Ada, Java and C


The Ada examples in this book conform to the Ada 2005 ISO/AN SI standard. The Java
examples conform to the Java 5 platform along with the Real—Time Specification
for
Java extensions (Version 1.0.2). The C examples conform to ANSI C, and the POSIX
primitives are those given in the IEEE Std 1003.1, 2004 Edition.
To facilitate easy identificationof the three languages, different presentation styles
are used. Ada is presented with keywords in bold lower case; program identifiersare given
in mixed case. C has keywords unbolded and identifiers in lower case. To distinguish
Java from C, Java keywords are bolded and identifiersare mixed case.

Changes from the Third Edition


Over the last 20 years, real-time technology has advanced considerably. Consequently
this book has been creeping up in size. The fourth edition has added significant new

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.

a The material programming in the small


on and large, which provided the introduc-
tion to sequential programming in C, Java and Ada has been removed completely.
We felt that the material is best served by specialist books on programming in
these languages.
c We have removed discussions of occam2 and Modulaappendix that can to an be
obtained from the book’s web page. Although these languages are no longer in

widespread use, we believe they are historically important.


o The chapter Systems has been removed, and the
on Distributed main topics have
been distributed throughout other chapters in the book. Again, we felt that we were

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

throughout the book, mainly to Chapter 14.

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.

Real-Time Systems Research at York

Alan Burns Andy Wellings are members


and of the Real—Time Systems Research Group
in the Department of Computer Science at University of York (UK). This
the group
undertakes research into all aspects of the design, implementation and analysis of real-
time systems.
Specifically, the group is addressing: formal and structured methods for develop-

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

is to undertake fundamental research, and to


bring into mod-
group engineering practice
ern techniques, methods and tools. Areas of application of our work include space and
avionic systems, engine controllers, vehicle control and multi-media systems. Further
information about the group’s activities can be found via:

http://www.cs.york.ac.uk/rts

Acknowledgements for the First Edition


The material in this book has been developed over the last five years andpresented to many
third year and MSC students at the Universities of Bradford and York, taking Computer
Science or Electronics degrees. We would like to acknowledge their contribution to the
end product, for without them this book would never have been written.
Many people have read and commented on a first draft of the book. In particular
we would like to thank: Martin Atkins, Chris Hoggarth, Andy Hutcheon, Andrew Lister
and Jim Welsh. We would also like to thank
respective Universities
our colleagues at our

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.

Acknowledgements for the Second Edition

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.

Acknowledgements for the Third Edition


We would like to thank the Real—TimeJava
Expert Group for the open manner in which
they have developed the Real—Time Java Specification. Thanks are also due to Angel
Alvarez, Jose Alvarez, Neil Audsley, Iain Bate, Jorge Diaz-Herrera, David Duke, Alan
Grigg, Ian Hayes, George Lima, Greg Murphy, Peter Puschner and Pat Rogers who all
provided us with help, of one form on another, during the writing of this edition.
xviii PREFACE

We also wish to acknowledge the very helpful comments given by the technical

reviewers, Jorge D1’az—Herrera,


J orgen Hansson and Robert Holton, on the first draft of

this edition.
would like to thank all those people who us comments on the
Finally, we gave
Second Edition of the book.

Acknowledgements for the Fourth Edition

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!

Alan Burns & Andy Wellings


April 2009
Chapter 1
Introduction to real-time systems

1.1 Definition of a real-time 1.4 for


Development cycle
system real-time systems
1.2 Examples of real—time ‘
1.5 Languages for programming
systems real-time systems
1.3 Characteristics of real-time Summary
systems Further reading
Exercises

As computers become smaller, faster, reliable and


more cheaper,
'

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

it will be referred to as Rea/-Time Java. Ada was designed for systems


this,
development; however, some of its libraries (for example, the Real_Time pack-
Here assume these libraries are supported.
age) are optional. we

1.1 Definition of a real-time system


Before proceeding further, it is worth trying to define the phrase ‘real-time system’
There interpretations of the exact nature of a real—timesystem;
more precisely. are many
all have in common the notion of response time —

the time taken for


however, they
the from some associated input. The Oxford Dictionary of
system to generate output
Computing gives the following definitionof a real-time system:

Any system in which the time at which output is produced significant.


is This

is usually because the input corresponds to some movement in the physical

world, and the output has to relate to that same movement. The lag from input

time to output time must be sufficiently small for acceptable timeliness.

Here, the word ‘timeliness’ is taken in the context of the total


system. For example,
in missile is required within a few milliseconds, whereas
a guidance system, output
in a computer—controlled
car the response
assembly line, may be required only within
a second. To illustrate the various ways in which ‘real-time’ systems are defined, two

further definitions will be given. Young (1982) defines a real-time system to be:

system which has


respond to to ex-
any information processing activity or

ternally generated input stimuli within a finite and specified


period.

Another definition is (Randell et al., 1995):

A real-time is a system that is required to react to stimuli from the


system
environment (including the passage of physical time) within time intervals
dictated by the environment.

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

Practitioners in the field of real-time system design often distinguish between


computer
hard and soft real-time Hard real-time systems are those where it is absolutely
systems.
imperative that responses occur within the specified deadline. Soft real-time systems 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.

Title: Saarron murtaja

Author: Jules Verne

Release date: July 10, 2016 [eBook #52543]

Language: Finnish

Credits: Produced by Tapio Riikonen

*** START OF THE PROJECT GUTENBERG EBOOK SAARRON


MURTAJA ***
Produced by Tapio Riikonen

SAARROSLINJAN MURTAJA
Kirj.

Jules Verne

Toinen, korjattu suomennos

Ranskan akademian palkitsema teos

KUOPIOSSA, U. W. Telén & C:o 1904.


SISÄLLYS:

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.

Ensimäinen virta, jonka aaltoja höyryaluksen rattaat panivat


vaahtoamaan, oli Clyde. Tämä tapahtui 1812. Höyryaluksen nimi oli
Komet ja se kulki säännöllisesti Glasgowin ja Greenokin väliä kuuden
peninkulman nopeudella tunnissa. [Peninkulmilla tässä kirjassa aina
ymmärretään Englannin peninkulmia, johon menee noin 5,5
kilometriä = 5,566 metriä.] Siitä ajasta asti on enemmän kuin
miljoona höyryjä eli pakettiveneitä kulkenut ylös ja alas tämän
Skotlannin virran uomaa pitkin, ja asukkaiden tuossa isossa
kauppakaupungissa luulisi siis jo hyvinkin tottuneen näkemään
ihmeitä höyrylaivaliikkeen alalla.

Kuitenkin olivat Joulukuun 3 päivänä 1862 Glasgowin likaiset kadut


täytetyt lukemattomilla ihmislaumoilla, joissa oli laivanisäntiä,
kauppiaita, tehtaanomistajia, työmiehiä, merimiehiä, naisia ja lapsia,
kaikki matkalla erääseen suureen Kelvinnimiseen laivatelakkaan,
jonka omistivat herrat Tod ja Mac Gregor. Tämä viimeksi mainittu
nimi todistaa kyllin selvästi, että Skotlannin ylänköläisten kuuluisista
jälkeisistä oli tullut tehtailijoita ja että vanhain klanien kaikki entiset
vasallit olivat luontuneet kelvollisiksi työmiehiksi. [Klaneiksi kutsuttiin
Skotlannissa muinoin sukukuntien vanhimmat, joilla oli
patriarkallinen valta heimokuntansa yli.]

Kelvintokka on muutamien minuuttien matkan päässä kaupungista


Clyde-virran oikealla rannalla. Sen äärettömät alat olivat kohta
uteliaiden katsojain vallassa. Ei yhtään tyhjää paikkaa ollut
rantasilloilla, varvin muureilla eikä makasiinien katoilla. Joella liikkui
kaikellaisia aluksia ristiin rastiin ja Gowanin kunnaat vasemmalla
rannalla vilisivät katsojia täynnänsä.

Ei täällä kumminkaan ollut hommana mikään erinomainen


juhlallisuus; tahdottiin vain nähdä erään laivan lähtöä veistämöltä.
Luulisipa Glasgowin asukkaiden olleen tottuneita näkemään tällaisia
tapahtumia; mutta kentiesi Delphin — tämä oli Todin ja Mac
Gregorin rakentaman aluksen nimi — oli jotenkin omituinen
näöltänsä? Eipä ollutkaan, totta puhuaksemme. Se oli iso alus, noin
viidentoista sadan tonnin kantavuutta, teräslevyillä peitetty ja jota
suurella vaivalla ja äärettömillä kustannuksilla oli koetettu saada niin
nopeakulkuiseksi kuin mahdollista. Sen kone, tehty Lancefieldin
työpajoissa, oli korkeanpainonkone, ja sillä oli viidensadan
hevosvoiman nimellinen väkevyys. Sitä pani liikkeelle propelli
kummallakin puolen perävannasta, jotka molemmat olivat aivan
erillään toisistansa. Tämä oli ihan uusi, Dudgeon de Millwallin
keksimä laitos, joka antaa aluksille suuren nopeuden samalla kuin
sallii niiden pyörähtää ja tehdä kiertoliikkeen hyvin ahtaalla alalla.
Mitä Delphinin uppomittaan tulee, ei se ollut erittäin suuri. Tuntijat
eivät sen suhteen erehtyneet, ja he siitä syystä päättivät, että tämä
alus oli aiottu käymään kohtalaisen syvillä vesillä.
Mutta kaikista näistä erityisistä asianhaaroista ei käynyt millään
muotoa selville yleisön innostus ja osanotto. Delphinissä ei ollut
mitään enemmin tahi vähemmin outoa nähtävää kuin monessa
muussakaan aluksessa. Oliko siis sen lähtö veistämöltä yhdistettynä
johonkin koneelliseen vaikeuteen, joka oli voitettava? Eipä niinkään.
Clyde-virta oli jo helmoihinsa ottanut vastaan monta paljon
kantavampaa alusta, ja Delphinin laskeminen vesille oli käypä niin
mutkattomasti kuin suinkin maailmassa.

Vesi seisoi aivan tyynenä ja samassa silmänräpäyksessä kuin


pakoveden aika rupesi tuntumaan, alkoivat laskemishommat. Kurikat
paukahtivat yhtaikaa kiiloja vasten, jotka olivat aiotut kohottamaan
aluksen emäpuuta. Ennen pitkää tutisi koko tuo kookas rakennus, ja
niin vähän kuin se kohosikin, havaittiin kumminkin sen järkkyvän
asemaltansa. Lipuminen alkoi, se kiihtyi kiihtymistänsä, ja
muutamain silmänräpäysten perästä Delphin, jätettyänsä
huolellisesti suopatun lavansa, sukelsi Clyde-virtaan, sakeiden
valkoisten savutuprujen keskelle. Sen perä hetkahti joen mutapohjaa
vasten, mutta kohahti sysäyksen synnyttämän jättiläisaallon harjalle,
ja olisi tämä muhkea höyry vauhdissaan rusahtanut rikki rantasiltoja
vasten Gowanin luona, elleivät kaikki ankkurit jotka yht'aikaa
heitettiin alas hirmuisella jytinällä, olisi ehkäisseet sen vauhtia.

Delphin oli onnellisesti ja hyvästi lähtenyt veistämöltä ja keinui nyt


kauniisti virralla. Kaikki katsojat taputtivat käsiänsä, aluksen nyt
ollessa luonnollisessa elementissään, ja mahtavia hurraa-huutoja
kuului molemmilta rannoilta.

Mutta mikä oli siis syynä näihin huutoihin ja mieltymyksen


osoituksiin? Varmaan ihastuneimpain katsojain olisi ollut sangen
vaikea selittää innostustansa. Mikä oli siis syynä siihen erityiseen
mielenkiintoon, jonka tämä alus nostatti? Syynä oli vaan se
salaperäisyys, johon sen tarkoitus oli verhottu. Minkälaista kauppaa
varten se oli käytettävä, sitä ei tietty, ja jos sitä kysyit noilta
erinäköisiltä, utelioilta ihmisjoukoilta, niin syystäpä taisit hämmästyä
niistä erilaisista mielipiteistä, joita oli olemassa tästä tärkeästä
asiasta.

Kuitenkin pitivät ne ihmiset, jotka olivat parempia tietoja saaneet,


taikka jotka ainakin luulivat niiden joukkoon kuuluvansa, siinä yhtä
että tällä höyryllä oli joku tehtävä toimitettavana siinä kauheassa
sodassa, joka siihen aikaan tuotti turmiota Pohjois-Amerikan
Yhdysvaltain väestölle. Mutta sen enempää he eivät asiasta tienneet,
eikä olisi yksikään heistä saattanut sanoa, oliko Delphin
kaappaajalaiva vaiko tavara-alus, oliko se liittoutuneitten aluksia
vaiko Yhdysvaltojen laivastoon kuuluva.

"Hurraa!" — huusi joku, vakuuttaen, että Delphin oli rakennettu


etelä-valtiota varten.

"Hurraa, hurraa!" — huusi toinen, vannoen, ettei nopeampaa


laivaa ollut risteillyt Amerikan rantavesillä.

Ei siis tiedetty mitään varmuudella, ja jos joku taisi sanoa jotakin


varmaa tässä asiassa, niin täytyi hänen olla joko osakas tai ainakin
hyvin uskottu ystävä kauppahuoneelle Vincent Playfair ja Kumpp.
Glasgowissa.

Vincent Playfair ja Kumpp. oli rikas, arvossa pidetty ja kokenut


toiminimi. Sen päämies kuului vanhaan, kunniassa pidettyyn sukuun,
jonka suku-juuret joutuivat n.k. tupakkalordeista, jotka rakennuttivat
kauneimmat korttelit kaupungissa. Nämä taitavat kauppamiehet
olivat perustaneet etevimmät konttoorit Glasgowissa ja kävivät
kauppaa tupakilla, jota toivat Virginiasta ja Marylannista. Ääretön
varallisuus koottiin; uusi keskipiste kaupalle luotiin. Ennen pitkää tuli
Glasgowista teollisuus- ja tehdaskaupunki; kehruutehtaita ja valimoja
syntyi joka haaralla, ja muutamissa vuosissa oli kaupungin
varallisuus noussut ylimmälleen.

Kauppahuone Playfair ja Kumpp. kumminkin pysyi uskollisena esi-


isäinsä toimekkaalle hengelle. Se antautui mitä rohkeimpiin
keinotteluihin ja kannatti Englannin kaupan arvoa. Sen nykyinen
päämies, Vincent Playfair, noin viidenkymmenen vanha, mielialaltaan
hyvin käytännöllinen ja varma, vaikkakin samalla uskalikko, oli laivain
varustaja mitä puhtainta rotua. Kaikki, joka ei suoranaisesti koskenut
kauppatoimia, ei häntä laisinkaan miellyttänyt, ei edes toimien
valtiollinen puolikaan. Muuten oli hän kunniallinen ja rehellinen mies.

Kumminkaan ei hän voinut kerskailla siitä että hänen omissa


aivoissaan oli syntynyt aate rakentaa ja varustaa Delphin laiva. Sen
oli kokonansa keksinyt hänen veljensä poika, James Playfair, komea
kolmikymmen vuotias mies ja rohkein laivuri yhdistetyn
kuningaskunnan kauppalaivastossa.

Luettuansa vihan vimmoissa eräänä päivänä Tontine nimisessä


kahvilassa Amerikan sanomalehtiä, teki James Playfair sedälleen
varsin uskaliaan ehdoituksen.

"Setä Vincent" — sanoi hän jyrkästi sedälleen — "me saatamme


ansaita kaksi miljoonaa vähemmässä kuin kuukauden ajassa."

"Ja mitä asiassa pannaan alttiiksi?" — kysyi setä Vincent.

"Laiva ja lasti."
"Eikö mitään muuta?"

"Pannaanpa niinkin, laivaväen ja kapteinin nahat, mutta niitä ei


oteta lukuun."

"Voimmehan asiata aprikoida", — vastasi setä.

"Se on jo tehty", — jatkoi James Playfair.

"Olettehan lukeneet Tribune-, Newyork-Herald-, Times-, Enquirer


de
Richmond ja American Review-sanomalehtiä?"

"Olen, olenpa kaksikymmentäkin kertaa."

"Luuletteko siis niinkuin minäkin, rakas veljeni poika, että


yhdysvaltioiden sotaa kestää vielä kauan?"

"Kyllä vielä kauan."

"Te tiedätte hyvin kyllä, kuinka tuo taistelu haittaa suuresti


Englannin ja erittäinkin Glasgowin etuja."

"Ja erikoisesti Playfairin ja Kumppanin etuja" — keskeytti hänet


setä
Vincent.

"Erittäinkin heidän" — myönsi nuori kapteeni.

"James, siitä olenkin joka päivä levotonna, enkä taida


kauhistuksetta ajatella niitä suuria onnettomuuksia kauppaliikkeen
alalla, mitkä tuo sota on aikaansaattava. Kyllähän huone Playfair ja
Kumpp. on vakavarainen, mutta se on yhteydessä toiminimien
kanssa, jotka voivat joutua vararikkoon. Oih, hiisi vieköön nuo
ameriikkalaiset, olkootpa sitte orjuuden puolustajia tahi vastustajia!"

Jos Vincent Playfair, ihmiskunnan suuriin periaatteihin nähden,


jotka aina ja joka paikassa ovat asetettavat edelle yksityisiä
harrastuksia, tekikin väärin näin puhuessaan, niin hänellä yhtäkaikki
oli oikeus katsella asiaa suoranaisesti kauppaedun kannalta.
Tärkeintä Amerikan vientitavaraa ei saatukaan Glasgowin
markkinoille. Pumpulinälkä, — The cotton famine — käyttääksemme
tätä paljon merkitsevää englantilaista sananpartta, kävi päivä
päivältä yhä uhkaavammaksi. Tuhansittain työmiehiä joutui elämään
yleisen armeliaisuuden varassa.

Glasgowilla oli viisikolmatta tuhatta kehruukierrutinta, jotka ennen


Yhdysvaltojen sotaa joka päivä valmistivat kuusisataa viisikolmatta
tuhatta metriä pumpulilankaa, se on: viisikymmentä miljoonaa
naulaa vuosittain. Näistä numeroista voi päättää, mitä selkkauksia oli
syntyvä kaupungin teollisessa elämässä, kun raaka-ainetta
kehruutehtaille miltei peräti puuttui. Vararikot kuuluivat
päiväjärjestykseen, työt lakkautettiin kaikissa tehtaissa ja työmiehet
kuolivat nälkään.

Tämän äärettömän kurjuuden näkeminen se saattoi James


Playfairin ajattelemaan rohkeata yritystänsä.

"Minä hankin pumpulia" — sanoi hän — "ja tuon sen tänne,


maksakoon mitä maksaa."

Ja ollen kauppamies yhtä paljon kuin setä Vincentkin, päätti hän


esittää tuumansa tavallisen kauppa-yrityksen muodossa.

"Kuulkaapa nyt tuumani, setä!"


"Annas kuulla, James!"

"Se on aivan mutkaton. Me rakennamme tavattoman nopean ja


paljon kantavan aluksen."

"Se käy laatuun."

"Me lastaamme sen ampumavaroilla, ruoka-aineilla ja vaatteilla."

"Hyvä, hyvä!"

"Minä otan päällikkyyden höyryssä, jätän kaikki Yhdysvaltojen


alukset jälkeeni, tunkeudun väkisin johonkin piiritettyyn satamaan
Etelässä…"

"Myöt lastisi korkeaan hintaan liittoutuneille, jotka sen tarvitsevat"


— sanoi setä innokkaasti.

"Ja palaan täydellä pumpulilastilla."

"Jonka antavat sinulle melkein ilmaiseksi."

"Aivan niin, setä. No, mitä arvelette asiasta?"

"Oiva tuuma, mutta kuinka aiot päästä läpi?"

"Kyllä se käy laatuun, jos minulla on hyvä laiva."

"Minä rakennutan sinulle mitä oivallisimman laivan. Entäs


laivaväki?"

"Oh, sen kyllä hankin. Paitsi sitä en tarvitsekaan useampia miehiä


kuin että voin laivani kulkua ja liikkeitä hyvästi hoitaa, — — — siinä
on kaikki tyyni. Tässä ei tule kysymykseen tapella yhdysvaltalaisten
kanssa, vaan jättää heidät kauas jälkeensä."

"Niinpä niin, me jätämme heidät kauas jälkeemme" — vastasi setä


Vincent jäykällä äänellä, — "Mutta sanoppa minulle, James, mihin
paikkaan Amerikan rannikkoa aiot laskea?"

"Tähän asti, setä, ovat muutamat alukset jo tunkeutuneet New-


Orléansin, Willmingtonin ja Savannahin rantaan saarrosten läpi,
mutta minä aion käydä suoraan Charlestonia kohti. Ei yksikään
Englannin alus ole vielä voinut tunkeutua sen ahtaisiin kulkuväyliin,
paitsi la Bermuda. Minä teen niinkuin sekin, ja jos alukseni ei ole
erittäin syvässä kulkeva, niin menen sinne minne Yhdysvaltojen
alukset eivät voi seurata minua."

"Se on tosi" — sanoi setä Vincent — "että Charlestonissa on


yltäkyllin pumpulia. Sitä poltetaankin, jotta siitä päästäisiin."

"Niinpä niin" — vastasi James — "ja mikä vielä on suurempi asia,


kaupunki on miltei kokonaan saarroksissa, Beauregard on muonan ja
ampumavarain puutteessa ja on maksava lastini runsaasti."

"Sinä olet oikeassa, poikani. No, milloinka tahdot lähteä?"

"Kuuden kuukauden perästä. Silloin pitää olla pitkiä öitä, talvi-öitä,


jotta pääsisin helpommin läpi."

"Asia on päätetty."

"Päätetty!"

"Mutta vaiti, ymmärräthän?"


"Ei hiiskaustakaan."

Viisi kuukautta sen perästä lähti höyrylaiva Delphin Kelvinin


veistämöltä kenenkään sen todellista tarkoitusperää tietämättä.

II. Lähtö.

Delphinin varustus kävi ravakasti. Taklinki oli jo valmis; ei muuta


puuttunut kuin korjata sitä ja tätä. Delphinillä oli kolme mastoa,
kuunaripurjeille, joka oli milteipä liikaa komeutta, se kun ei luottanut
tuuleen, päästäksensä Yhdysvaltain risteilijöitä pakoon, vaan
väkevään koneesensa — ja siinä se teki oikein.

Joulukuun loppupuolella käväsi Delphin koetusmatkalla pitkin


Clyde-virtaa. Vaikea on sanoa, kumpi oli tyytyväisempi,
laivanrakennusmestari vai kapteiniko. Tämä uusi höyrylaiva kulki
ihmeellisen hyvästi ja patentti logi [kone, jolla saadaan selville laivan
nopeus] osoitti seitsemäntoista peninkulmaa tunnissa, johon
nopeuteen ei yksikään englantilainen, ranskalainen tahi
amerikalainen laiva vielä ollut tähän saakka päässyt. Varmaankin olisi
Delphin kilpapurjehduksessa nopeimmankin aluksen kanssa päässyt
voitolle.

Joulukuun 25 päivänä alkoi lastaus. Delphin pantiin rantalaiturin


viereen, vähän alemma Glasgow-Bridgeä, tätä viimeistä siltaa, ennen
kuin tullaan Clyden suulle. Siellä oli suunnattoman suuria makasiinia,
jotka sisälsivät mahdottomia vaate-, ase- ja muonavaroja, mitkä nyt
kaikki tuota pikaa katosivat Delphinin ruumaan. Tämän lastin laatu
ilmaisi aluksen salatun tarkoituksen. Playfair ja Kumpp. eivät tainneet
kauemmin pitää salaisuuttansa kätkettynä, ja paitsi sitä ei saisi viipyä
kauan, ennenkuin Delphin lähtisi merelle. Amerikalaista risteilijää ei
ollut yhtään näkynyt Englannin kulkuvesillä. Ja kuinka voitiin asiata
salassa pitää, kun tuli kysymys laivaväen hankkimisesta. Väkeä ei
voitu pestata laivaan ilman että heille ilmoitettiin minne aluksen tuli
lähteä. Matkan päähän päästyä oli kentiesi henki pantava alttiiksi, ja
kun se oli tehtävä, niin tottapa teki mieli tietää miten ja minkä
vuoksi.

Mutta nämä mahdollisuudet tulevaisuudessa eivät näyttäneet


peljästyttävän ketään. Tarjottu palkka oli hyvä ja merimiehiä tulikin
tarjokkaiksi, miehiä oivallisia, suuri joukko. James Playfairin oli vain
työläs valita, mutta hän teki sen niin hyvin kuin taisi, ja
neljänkolmatta tunnin perästä sisälsivät hänen laivarullansa
kolmenkymmenen matruusin nimet, joista olis ollut kunnia Hänen
kaikkein armollisimman Majesteettinsa huvilaivalle.

Lähtö määrättiin tammikuun 3:ksi päiväksi, ja Delphin oli aivan


valmis purjehtimaan joulukuun 31 päivänä. Ruumat olivat
täpötäynnä ampuma- ja ruokavaroja ja hinkalot hiiliä. Lähtöä ei
estänyt mikään.

Kun kapteini tammikuun 2 päivänä oli laivassa heittääksensä siihen


vielä viimeisen tarkastavan silmäyksen, tuli eräs mies Delphinin
köysiportaille pyytäen saada puhutella kapteini James Playfairia. Eräs
matruusi vei hänet nyt peräkannelle.

Hän oli vankka, hartiakas, uljas, punaverinen mies, jonka


yksinkertaisissa kasvonpiirteissä vivahteli jonkin verran viekkautta ja
iloisuutta. Hän ei näyttänyt ymmärtävän merimiehen ammattia ja
hän katseli ympärilleen niinkuin se, joka ei ole juuri tottunut laivan
kantta tallailemaan. Kuitenkin oli hän olevinaan kuin merihärkä
ainakin, tarkasteli Delphinin taklaasia ja heitteli ruumistaan sinne ja
tänne, niinkuin merimiehillä tapana on.

Tultuansa kapteinin eteen katsoi hän vakavasti häntä silmiin ja


sanoi:

"Kapteini James Playfairko?"

"Minä se olen" — vastasi tämä — "mitä tahdotte?"

"Päästä teidän palvelukseenne laivassa."

"Sijaa ei enää ole. Laivaväki on täysilukuinen."

"Vaikka kohta, yksi mies lisäksi ei tuottane teille häiriötä!


Päinvastoin."

"Niinkö luulet?" — sanoi Playfair, tarkastaen vierasta aina silmän


pohjaan asti.

"Siitä olen aivan varma", — vastasi matruusi.

"Mutta kuka sinä olet?" — kysyi kapteini.

"Oiva merimies, ravakka ja luotettava poika, pelkäämätön ja


häikäilemätön. Kaksi vahvaa kättä, semmoista kuin minulla on
kunnia teille tarjota, eivät ole mikään huono asia laivassa."

"Mutta onhan muitakin laivoja kuin Delphin ja muitakin kapteinia


kuin
James Playfair. Miksi tulet juuri tänne?"

"Sen tähden että tahdon palvella täällä Delphinissä ja kapteini


James
Playfairin komennon alla."

"Niin, mutta minäpä en sinua tarvitse."

"Ainahan kelpo miestä tarvitaan, ja jos minä, näyttääkseni


voimiani, saan koetella kolmen tahi neljän miehen kanssa teidän
laivaväessänne, niin olen valmis."

"Sitäpä kelpaa kuulla. Mutta mikä nimesi on?"

"Crockston, jos niin suvaitsette."

Kapteini otti muutamia askelia taapäin voidakseen paremmin


katsella tätä Herkulesta, joka näin omituisella tavalla esitti itsensä.
Ryhdissä, ruumiinrakennuksessa, miehen koko ulkonäössä ei ollut
mitään, mikä olisi näyttänyt vastustavan hänen väitöstänsä, että
muka oli voimakas mies. Nähtävä oli, että hänellä piti olla tavattomat
ruumiin voimat ja ettei hän vähistä hätäilisi.

"Missä olet ennen purjehtinut?" kysyi Playfair.

"Hiukan siellä, hiukan täällä."

"Ja Delphinin tarkoituksen tiedät?"

"Tiedän, ja sepä se juuri minua houkutteleekin."

"No, kentiesi tekisin tyhmästi, jos päästäisin luotani niin kyvykkään


miehen kuin sinä. Hae ensimäkien perämies Mathew, ja anna hänen
merkitä sinut laivaluetteloon."

Sanottuansa nämä sanat James Playfair odotti että mies tekisi


käännöksen ja kiiruhtaisi keulan puolelle, mutta siinä hän pettyi.
Crockston ei liikahtanut paikaltaan.
"No, etkö kuullut mitä sanoin?" kysyi kapteini.

"Kuulin kyllä" — vastasi matruusi — "vaan siinä ei ollut kaikki,


minulla on jotakin teiltä pyydettävää."

"Sinä kiusaat minua" — sanoi Playfair kiivaasti. — "Minulla ei ole


aikaa seisoa ja jaaritella kanssasi."

"En tahdo kauan olla teille kiusaksi" — vastasi Crockston. —


"Ainoastaan pari sanaa vielä ja kaikki on selvillä. Minä tahdon sanoa
teille, että minulla on sisarenpoika."

"Onpa kaunis eno sillä pojalla" — vastasi kapteini. — "Joko olet


lopettanut?" jatkoi hän vielä kärttyisesti.

"Heti, — tuossa paikassa. Kun otetaan eno, saadaan sisarenpoika


kaupanpäällisiksi."

"Vai niin, tosiaanko?"

"Niin tosiaankin, se on tavallista. Toinen ei lähde jos ei


toinenkaan."

"No mikä sitten sisaresi poika on?"

"Viisitoista vuotias poika, vasta-alkaja, jonka tahdon harjoittaa


ammattiin. Hänellä on erinomaisen hyvä tahto ja hänestä kerran
tulee kelpo merimies."

"Kuulepas, rakas Crockston" — huudahti kapteini — "luuletko


Delphiniä miksikään laivapoikain koulupaikaksi?"

"Meripojista älkää pahoin puhuko" — virkahti merimies. — "Yksi


oli, josta tuli amiraali Nelson, ja toisesta tuli amiraali Franklin."
"Tuhat tulimmaista, ystäväni" — vastasi James Playfair — "sinäpä
puhut mieleni mukaan. Otapa siis tänne se sisaresi poika, mutta jos
en hänen enossaan löydä sitä oivaa miestä, joksi hänen väität, niin
eno saapi minun kanssani tekemistä. Mene nyt ja tule tunnin perästä
takasin."

Crockstonia ei tarvinnut käskeä kahdesti. Hän kumarsi jotenkin


kömpelösti kapteinille ja oli muutamilla askelilla taas rantasillalla.
Tunnin perästä tuli hän taas laivaan sisarensa pojan kanssa. Tämä oli
neljä- tahi viisitoistavuotias poika, kasvultaan vähän hento ja heikko,
ujo ja arkaileva muodoltaan, joka aivan vähän muistutti enonsa
varmuutta ja ruumiinvoimia. Crockstonin täytyikin muutamilla hyvillä
sanoilla rohkaista häntä.

"Kas niin ole jäykkänä vain" — sanoi hän. — "Tuhat tulimmaista,


eihän täällä ole ketään, joka tahtoisi syödä meidät, ja päällisiksi
saatamme vielä mennä tiehemme, jos niin tahdomme."

"Ei, ei" — vastasi nuorukainen — "Jumala meitä varjelkoon!"

Samana päivänä olivat matruusi Crockston ja jungmanni John


Stiggs
Delphinin laivaväen luetteloon merkityt.

Seuraavana aamuna kello 5 aikana olivat höyrypannut täydessä


työssä, tärisyttäen kantta. Höyry pursusi vinkuen henkiläppäin
kautta. Lähdön hetki läheni.

Melkoinen ihmislauma tunkeili, vaikka tämä oli varhain aamulla,


rantalaiturilla ja Glasgowin ajosillalla. Tahdottiin näet vielä kerta
jättää jäähyväiset tälle uljaalle höyryalukselle. Vincent Playfair oli
tullut syleilemään veljensä poikaa, kapteini Jamesia, ja käyttäytyi
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like