ebook img

Software Design for Real-time Systems PDF

521 Pages·1991·13.148 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Software Design for Real-time Systems

Software Design for Real-time Systems Software Design for Real-time Systems J.E. COOLING Department of Electronic and Electrical Engineering. University of Technology. Loughborough SPRINGER-SCIENCE+BUSINESS MEDIA, B.V. First published 1991 ©J. E.Cooling 1991 Originally published by Chapman and Hall in 1991 Softcover reprint of the hardcover I st edition 1991 Typeset in 10/12 Sabon by Selectmove Limited, London ISBN 978-0-442-31174-2 ISBN 978-1-4899-2957-0 (eBook) DOI 10.1007/978-1-4899-2957-0 0442311745 (USA) All rights reserved. No part of this publication may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, or stored in any retrieval system of any nature, without the written permission of the copyright holder and the publisher, application for which shall be made to the publisher. British Library Cataloguing in Publication Data Cooling, J. E. (Jim E) Software design for real-time systems. 1. Real time computer systems. Software. Design 1. Title 005.12 ISBN 978-0-442-31174-2 Library of Congress Cataloging-in-Publication Data available To Nieve and Niall Le gni agus gach dea-ghui Contents Acknowledgements xi Preface X11l Glossary XVI 1 Real-time systems - setting the scene 1 1.1 Categorizing computer systems 2 1.2 Real-time computer systems 4 1.3 The computing elements of real-time systems 13 1.4 Software for real-time applications - some general comments 26 References 27 2 The search for dependable software 29 2.1 What do we want in our software? 29 2.2 Software errors 32 2.3 The basics of good software 43 References 49 3 First steps - requirements analysis and specification 51 3.1 The software life cycle 52 3.2 The importance of the requirements stages 58 3.3 Making mistakes - sources and causes 60 3.4 A practical approach to analysis and specification 66 3.5 Communication aspects - the role of prototyping 78 3.6 Final comments 87 References 87 Further reading 88 4 Program design concepts 89 4.1 Design fundamentals 90 4.2 The elements of modular design 99 viii Contents 4.3 Program control structures - the influence of structured programmmg 115 4.4 Functional structuring of software designs 121 4.5 Object-structured (oriented) design 127 4.6 Data structured design 139 4.7 Building the software - alternative techniques 140 4.8 A last comment 142 References 142 Further reading 144 5 Diagramming - an introduction 145 5.1 Diagrams - why? 145 5.2 The essentials of software diagrams 153 5.3 Practical diagramming techniques - a general comment 164 References 164 6 Diagramming methodologies in software design 165 6.1 Introduction 165 6.2 Context and entity relationship diagrams 166 6.3 Data flow diagrams 168 6.4 Process-structure diagrams 170 6.5 Program-structure diagrams 170 6.6 Event-dependent diagrams 185 6.7 Structured text 190 6.8 Data structure diagrams 192 6.9 Producing diagrams 193 6.10 A last comment 193 References 195 Further reading 196 7 Formal specification methods 197 7.1 Formal methods - are they useful? 197 7.2 The specification problem - again 198 7.3 Why mathematics? 199 7.4 Formal methods - general concepts 202 7.5 VDM by P. Robinson, Rolls-Royce and Associates Ltd 204 7.6 Z by M. Bushel 213 7.7 Final comments 221 References 221 Further reading 222 Contents ix 8 Languages for real-time systems 223 8.1 Choosing a programming language - the real questions 224 8.2 High-level languages - requirements 226 8.3 Program syntax and layout rules - the readability factor 227 804 Program design and compilation methods 230 8.5 Variable usage - scope, visibility, lifetime and declaration 234 8.6 Data types - concepts and uses 236 8.7 Program flow control 249 8.8 Interfacing to other languages 254 8.9 Exception handling 255 8.10 Accessing processor hardware -low-level facilities 256 8.11 Miscellaneous items 260 8.12 Languages for real-time systems - survey 261 8.13 A comparison of Ada, C, and Modula-2/Pascal 268 8.14 Assembly language programming 279 8.15 A closing comment 282 References 283 Further reading 284 9 Operating systems for real-time applications 285 9.1 Why use an operating system? 285 9.2 Basic features of real-time operating systems 287 9.3 Scheduling - concepts 291 904 Scheduling - implementation 297 9.5 Control of shared resources - mutual exclusion 303 9.6 Intertask communication 318 9.7 Memory management 323 9.8 Standard executives - software in silicon 324 9.9 Closing comments 326 References 328 10 Software analysis and design - methods, methodologies and tools 329 10.1 The development process 330 10.2 Controlled requirements expression - CORE 331 10.3 Yourdon Structured Method - YSM 344 lOA Jackson System Development - JSD 358 10.5 MASCOT 372 10.6 HOOD - hierarchical object-oriented design 387 10.7 Software tools - an overview 398 10.8 A last review 402 References 403 Further reading 403 x Contents 11 Development tools 404 11.1 The development process 404 11.2 Software debugging - an overview 411 11.3 Software debugging on the host 415 11.4 Software debugging in the target - software-based techniques 434 11.5 Software debugging in the target - hardware-based methods 441 11.6 Debugging in host/target combinations 451 11.7 Performance analysis tools 455 11.8 Installing code into the target - non-volatile software (firmware) 460 11.9 Final comments 464 References 465 12 Documentation and testing 467 12.1 Documentation - what and why? 467 12.2 Software life-cycle documentation - overview 474 12.3 System functional specifications 475 12.4 Software structure specifications 478 12.5 Source code listings 481 12.6 Software testing - methods and documentation 481 12.7 Configuration and version control 489 12.8 Reading material - references, bibliography and general guidance 490 Index 493 Acknowledgements CONTRIBUTORS Paul Robinson (Rolls-Royce and Associates Ltd) and Mike Bushell: for making the formal methods chapter readable, interesting and understandable. This book would have been a much lesser text without their contributions. Janet Redman: for producing such a good set of diagrams, on time, as specified, and with good humour. ADVICE AND ASSISTANCE Steve Mallon (British Aerospace Dynamics pIc): who gave so much time and effort for the development of the CORE and MASCOT examples. Len Griffiths (British Aerospace Dynamics pIc): for generously providing the CORE and MASCOT tool facilities. Bill Smith (British Aerospace Dynamics pIc): for his patience and time in showing how MASCOT 3 is handled by professionals. Richard Kaiser and Phil Sulley (Yourdon International Ltd.): for the time and assistance to develop the YSM examples. John Cameron (Michael Jackson Systems Ltd.): for his help in the JSD work. Stuart Frost (ISS Ltd.): for his time and effort in the development of the HOOD example. Pamela Webster (RPM Systems): for her enthusiastic and informative efforts in producing diagrams for the AT RON debugger text. And to many others who helped along the way by providing comments, technical information, photos, etc. CRITICS AND ASSESSORS My good friend Alan Cuff: for encouragement, support and incisive (if sometimes occasional) proofreading. Niall and Jo: for taking the time to wade through the draft manuscript, and for their many useful and fresh ideas. Two anonymous reviewers: for their highly detailed, painstaking and extensive review effort. It has been much appreciated.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.