Real-Time Systems and Programming Languages Ada (4th Edition).pdf

所需积分/C币:9 2017-10-30 19:12:27 49.89MB PDF
收藏 收藏 1
举报

Real-Time Systems and Programming Languages Ada, Real-Time Java and CReal-Time POSIX (4th Edition).pdf
Real-Time Systems and Programming Languages 小必兴 Ada, Real-Time Java and C/Real-Time POSIX FOu的 Edition Alan Burns and andy Wellings University of york ADDISON-WESLEY An imprint of Pearson Education Harlow, England· London· New york· Boston. San francisco· Toronto· Sydney· Singapore; Hong Kong osyo· Seoul Taipei. New Dethi. Cape Town· Madrid, Mexico City· Amsterdam· Munich, Paris milan Pearson education Limited 上 dinburgh gate Harlo Essex CM20 2JE England and Associated Companies throughout the worid Visit us on the World wide Weh at www.pcarsoncd,co.lk First published 1989 Second edition l997 Third edition 2001 Fourth edition published 2009 C Pearson Education Limited 1989, 2009 The rights of Alan Burns and Andy Wellings to be identified as authurs of this work have been asserted by thein in accordance with the Copyright, Designs and Patents Act 1988 All rights reserved. No part of this publication may he reproduced, stored in a retrieval systcm, OL transmitted in any form or by any means, electronic, mechanical, photocopying, recording o otherwise, without cither the prior written permission of the publisher or a licence permitting restricted copying in the United Kingdom issued by the Copyright Licensing Agency I_ td, Saffron House, 6-10 Kirby Street, London ECIN &TS All trademarks uscd herein are the property of their respective owners. The use of any trademark i this text does not yest in the author or publisher any trademark owncrship rights in such trademarks nor does the use of such trademarks imply any affiliation with or endorsement of this book by such ISBN:978-0-32141745-9 British Library Cataloguing-in-Publication Dat A catalogue record for this book is available from the British library Library of Congress Cataloging-in-Puhlicatiun Data A catalogue rccord for this book can be obtained from the library of Congress 0987654321 1312111009 Typeset in Times Roman 10/12 by 73 Printed in Great Britain by Henry Ling Ltd, at the Dorset Press, Dorchester, Dorset The publishier's policy is to use paper manu factured from sustuinable forests. Contents P react XIII I Introduction to real-time systems 1.1 Definition of a rcal-time syste Examples of real-time systcms 唱中司甲 4 Characteristics of real-time systems 14 Development cycle y for rcal-time syslems 15 1.5 Languages for programming real-timc systems 2( 23 Further reading 25 Exercises∴∴. 26 2 Reliability and fault tolerance 27 2.1 Reliability, failure and faults 28 2.2 Failure modes 2.3 Fault prevention and fault tolerance .,33 2. 4 N-version programming 36 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 2.9M ing and predicting the reliability of software 52 2.10 Safety, reliability and dependability S furthe ading 56 E xercises 57 3 Exceptions and exception handling 59 3.1 Exception handling in older real-time languages 60 3.2 Modern exception handling 62 3.3 Exception handling in Ada, Java and C ,,69 34 Recovery blocks and exceptions…∴ 85 CONTENTS Summary 88 Further reading 89 Exercises 89 4 Concurrent programming 95 4.1 Processes and tasks/threads 96 42 Concurrent execution 99 4.3 Task representation 103 4.4 Concurrent execution in Ada 105 4.5 Concurrent exccution in Java 4.6 Concurrent execution in C/Real-Time POsiX l16 4.7 Multiprocessor and distributed systems 121 4.8 A simple embedded systcm 125 4.9 Language-supporled versus operating-system-supported concurrency 131 Summary i32 唱自pP Further reading 133 Exercises 133 5 Shared variable-based synchronization and communication 137 1 Mulual exclusion and condition synchronization 138 5.2 Busy waiting 下■■上 ,,139 5.3 Suspend and resume I42 5. 4 Semaphores 145 5.5 Conditional critical regions 156 5.6 Monitors 157 5.7 Mutexes and condition variables in C/Real-Time PosiX 160 5.8 Protected objects in Ada 5. Synchronized methods in Java ...... 171 5.10 Shared memory multiprocessors 179 5.11 Simple embedded system revisited 183 Summary 185 Further reading 186 Exercises 187 6 Message-based synchronization and communication 193 6. 1 Process synchronization 193 6.2 Task naming and message structurc 195 6.3 Message passing in Ada 196 6. 4 Sclcctive waiting ,,201 6.5 The Ada sel ect slatencnt 202 6.6 Non-determinism, selective waiting and synchronization primitives 205 6. 7 C/Real-Time PosIX mcssage queues 206 6. 8 Distributed systems 6.9 Simplc embedded sys(em revisited ammar 220 ther reading 22 Exercises 222 CONTENTS 7 Atomic actions, concurrent tasks and reliability 227 7、1 Atonic actions 228 7.2 Atomic actions in C/Real-Time PoSiX, Ada and Real-Time java 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 8 Resource control 285 8. 1 Resource control and atomic actions 286 8.2 Resource management 286 8.3 Expressive power and ease of uso 287 8.4 The requeue facility∴ 296 8.5 Asymmetric naming and security 302 8.6 Resource usage 30 8.7 Deadlock 304 Summary 304 Further reading 305 Exercises 305 9 Real-time facilities 307 9. 1 The notion of time ,307 9,2 Access to a clock 309 9, 3 Delaying a task 9. 4 Programming timeouts 320 Specifying timing requirements 326 9.6 Temporal scopes I 328 Summary∴,, 332 Further reading.∴ 33 Exercises 333 10 Programming real-time abstractions 335 10. 1 Real-time tasks 甲甲甲 336 10.2 Programming periodic aclivities ,,,,,,338 0.3 Programming aperiodic and sporadic activities 10.4 The role of real-time events and their handlers 344 10. 5 Controlling input and output iitter 10.6 Othcr approaches for supporting temporal scopes 356 Summary ,363 Further reading 364 Exercises 364 I CONTENTS 11 Scheduling real-time systems 35 11.1 The cyclic executive approach 366 11.2 Task-based scheduling 367 11.3 Fixed-priority scheduling(FPS) 370 11.4 Utilization-based schedulability tcsts for FPS 1. 5 Response time analysis(rta)for FPS pP·司 374 [1.6 Sporadic and aperiodic tasks ∴,,378 117 Task systems with D≤7 380 11. 8 Task interactions and blocking 382 11.9 Priority ceiling protocols 386 11 10 An extendible task model for FPs 390 1.11 Earliest deadline first(EDF scheduling ,,,400 11 12 Dynamic systems and online analysis ,,,405 11, 13 Worst-case execution time ,,,,,,,407 11.14 Multiprocessor scheduling ,,,,,,,408 11.1.5 Scheduling for power-aware systems 4I3 11.16 Incorporating system overheads 414 Summary 419 Further reading 420 Exercises 42l 12 Programming schedulable systems 425 12. 1 Programming cyclic executives 425 12.2 Programming preemptive priority-based systcms ●■■■ 426 12.3 Ada and fixed-priority scheduling 427 12. 4 The Ada ravenscar profile 430 12.5 Dynamic priorities and other Ada facilities 434 12.6 C/Real-Time POSIX and fixed-priority scheduling 436 12.7 Rcal-Time Java and fixed-priority scheduling 438 12. 8 Progi ing EDF systems 443 12.9 Mixed scheduling 453 Summar 454 Further readin 454 Exerci 455 13 Tolerating timing faults 457 13. 1 Dynamic redundancy and timing faults 457 13.2 Deadline miss detection 459 13.3 Overrun of worst-case execution timc 467 13. 4 Overrun of sporadic evct 471 13.5 Overrun of resource usage 474 13.6 Damage confinement∴∴ 甲■ 475 13.7 Error recovcry 485 ■■幽幽 Summary ...,. ■h 492 Further reading∵… 493 Exercises 493 CONTENTS 1X 14 Low-level programming 495 14.1 Hardware input/output mechanisms 495 14.2 Language rcquirements 502 14.3Ada,,, ,504 144Real- Time java.、 514 14.5 C and older real-time languages 517 14.6 Scheduling device drivers 519 14.7 Memory anagement .,,,521 Sunnary 27 F urther reading∵ 528 Exercises 528 15 Mine contr tudy 533 15.1 Mine drainage ,,,,,,,,,533 15. 2 The HRT-HOOD design method 538 15.3 The logical architccture design .539 15.4 The physical architecture design 545 15.5 Translation to Ada 546 15.6 Translation to Real-Timc Jay 564 15.7 Fault tolerance and distribution ,,,570 Summary ,572 Further reading ■p看 572 Exercises 573 16 Conclusion 575 References 579 Index 587 Supporting resources Visitwww.pearsoned.co.uk/burnstofindvaluableonlineresources For instructors e Solutions to exercises e Example examination questions Code fragments 鲁 PowerPoint slides For more information please contact your local Pearson Education sales representativeorvisitwww.pearsoned.co.uk/burns List of Figures 1. I A Huid control systcm 1. 2 A process control system. 3 A produclion control system 1. 4 A command and control system 5 A typical embedded system 8 1.6 A simple controller 12 1.7 A simple computerized controller ,,13 1. 8 Aspects ofreal-Lime systems ,,,,24 2. 1 Fault error. failure fault chain. 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 2. 6 The domino effect 45 2.7 Rccovery block mechanism 47 2.8 An ideal fault-tolerant componcnt 52 2.9 Aspects of dependability 54 2.10 DependabiliTy terminology 55 2.11 Concurrent exccution of four processes for Exercise 2.5 ,,,,,57 3. 1 The resumplion model 3.2 The termination modcl 3.3 The Java predefined Throwable class hierarchy 自昏■■ 78 4.1 Simple state diagran for a task 98 4.2 State diagra for a task 4.3 Fork and join 104 4. 4 Cobegin 105 4.5 A simplc cmbedded system 126 5. 1 SLate diagram for a task 4音 145

...展开详情
试读 127P Real-Time Systems and Programming Languages Ada (4th Edition).pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
北欧大使 很经典的Ada语言编程参考资料,扫描文件很比较清晰,凑活看吧。
2019-04-22
回复
关注 私信 TA的资源
上传资源赚积分,得勋章
最新推荐
Real-Time Systems and Programming Languages Ada (4th Edition).pdf 9积分/C币 立即下载
1/127
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第1页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第2页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第3页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第4页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第5页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第6页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第7页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第8页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第9页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第10页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第11页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第12页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第13页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第14页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第15页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第16页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第17页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第18页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第19页
Real-Time Systems and Programming Languages Ada (4th Edition).pdf第20页

试读结束, 可继续阅读

9积分/C币 立即下载 >