1. Trang chủ
  2. » Công Nghệ Thông Tin

real-time systems design and analysis, 4th edition

571 528 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 571
Dung lượng 3,52 MB

Nội dung

REAL-TIME SYSTEMS DESIGN AND ANALYSIS www.it-ebooks.info IEEE Press 445 Hoes Lane Piscataway, NJ 08854 IEEE Press Editorial Board Lajos Hanzo, Editor in Chief R. Abhari M. El-Hawary O. P. Malik J. Anderson B-M. Haemmerli S. Nahavandi G. W. Arnold M. Lanzerotti T. Samad F. Canavero D. Jacobson G. Zobrist Kenneth Moore, Director of IEEE Book and Information Services (BIS) Technical Reviewers Larry Bernstein, Stevens Institute of Technology Bernard Sick, University of Kassel Olli Vainio, Tampere University of Technology www.it-ebooks.info REAL-TIME SYSTEMS DESIGN AND ANALYSIS Tools for the Practitioner Fourth Edition PHILLIP A. LAPLANTE SEPPO J. OVASKA IEEE PRESS A JOHN WILEY & SONS, INC., PUBLICATION www.it-ebooks.info Cover photo courtesy of NASA. Copyright © 2012 by the Institute of Electrical and Electronics Engineers, Inc. Published by John Wiley & Sons, Inc., Hoboken, New Jersey. All rights reserved. Published simultaneously in Canada 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, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifi cally disclaim any implied warranties of merchantability or fi tness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profi t or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com. Library of Congress Cataloging-in-Publication Data: Laplante, Phillip A. Real-time systems design and analysis : tools for the practitioner / Phillip A. Laplante, Seppo J. Ovaska.—4th ed. p. cm. ISBN 978-0-470-76864-8 (hardback) 1. Real-time data processing. 2. System design. I. Ovaska, Seppo J., 1956- II. Title. QA76.54.L37 2012 004'.33–dc23 2011021433 Printed in the United States of America oBook ISBN: 9781118136607 ePDF ISBN: 9781118136577 ePub ISBN: 9781118136591 eMobi ISBN: 9781118136584 10 9 8 7 6 5 4 3 2 1 www.it-ebooks.info Phil: To Nancy, Chris and Charlotte, with all my love Seppo: To Helena, Sami and Samu — my everything www.it-ebooks.info vii CONTENTS Preface xv Acknowledgments xxi 1 Fundamentals of Real-Time Systems 1 1.1 Concepts and Misconceptions, 2 1.1.1 Defi nitions for Real-Time Systems, 2 1.1.2 Usual Misconceptions, 14 1.2 Multidisciplinary Design Challenges, 15 1.2.1 Infl uencing Disciplines, 16 1.3 Birth and Evolution of Real-Time Systems, 16 1.3.1 Diversifying Applications, 17 1.3.2 Advancements behind Modern Real-Time Systems, 19 1.4 Summary, 21 1.5 Exercises, 24 References, 25 2 Hardware for Real-Time Systems 27 2.1 Basic Processor Architecture, 28 2.1.1 Von Neumann Architecture, 29 2.1.2 Instruction Processing, 30 2.1.3 Input/Output and Interrupt Considerations, 33 2.2 Memory Technologies, 36 2.2.1 Different Classes of Memory, 36 2.2.2 Memory Access and Layout Issues, 38 2.2.3 Hierarchical Memory Organization, 41 www.it-ebooks.info viii CONTENTS 2.3 Architectural Advancements, 43 2.3.1 Pipelined Instruction Processing, 45 2.3.2 Superscalar and Very Long Instruction Word Architectures, 46 2.3.3 Multi-Core Processors, 48 2.3.4 Complex Instruction Set versus Reduced Instruction Set, 50 2.4 Peripheral Interfacing, 52 2.4.1 Interrupt-Driven Input/Output, 53 2.4.2 Direct Memory Access, 56 2.4.3 Analog and Digital Input/Output, 58 2.5 Microprocessor versus Microcontroller, 62 2.5.1 Microprocessors, 62 2.5.2 Standard Microcontrollers, 64 2.5.3 Custom Microcontrollers, 66 2.6 Distributed Real-Time Architectures, 68 2.6.1 Fieldbus Networks, 68 2.6.2 Time-Triggered Architectures, 71 2.7 Summary, 73 2.8 Exercises, 74 References, 76 3 Real-Time Operating Systems 79 3.1 From Pseudokernels to Operating Systems, 80 3.1.1 Miscellaneous Pseudokernels, 82 3.1.2 Interrupt-Only Systems, 87 3.1.3 Preemptive Priority Systems, 90 3.1.4 Hybrid Scheduling Systems, 90 3.1.5 The Task Control Block Model, 95 3.2 Theoretical Foundations of Scheduling, 97 3.2.1 Scheduling Framework, 98 3.2.2 Round-Robin Scheduling, 99 3.2.3 Cyclic Code Scheduling, 100 3.2.4 Fixed-Priority Scheduling: Rate-Monotonic Approach, 102 3.2.5 Dynamic Priority Scheduling: Earliest Deadline First Approach, 104 3.3 System Services for Application Programs, 106 3.3.1 Linear Buffers, 107 3.3.2 Ring Buffers, 109 3.3.3 Mailboxes, 110 3.3.4 Semaphores, 112 3.3.5 Deadlock and Starvation Problems, 114 3.3.6 Priority Inversion Problem, 118 www.it-ebooks.info CONTENTS ix 3.3.7 Timer and Clock Services, 122 3.3.8 Application Study: A Real-Time Structure, 123 3.4 Memory Management Issues, 127 3.4.1 Stack and Task Control Block Management, 127 3.4.2 Multiple-Stack Arrangement, 128 3.4.3 Memory Management in the Task Control Block Model, 129 3.4.4 Swapping, Overlaying, and Paging, 130 3.5 Selecting Real-Time Operating Systems, 133 3.5.1 Buying versus Building, 134 3.5.2 Selection Criteria and a Metric for Commercial Real-Time Operating Systems, 135 3.5.3 Case Study: Selecting a Commercial Real-Time Operating System, 138 3.5.4 Supplementary Criteria for Multi-Core and Energy-Aware Support, 140 3.6 Summary, 142 3.7 Exercises, 143 References, 146 4 Programming Languages for Real-Time Systems 149 4.1 Coding of Real-Time Software, 150 4.1.1 Fitness of a Programming Language for Real-Time Applications, 151 4.1.2 Coding Standards for Real-Time Software, 152 4.2 Assembly Language, 154 4.3 Procedural Languages, 156 4.3.1 Modularity and Typing Issues, 156 4.3.2 Parameter Passing and Dynamic Memory Allocation, 157 4.3.3 Exception Handling, 159 4.3.4 Cardelli’s Metrics and Procedural Languages, 161 4.4 Object-Oriented Languages, 162 4.4.1 Synchronizing Objects and Garbage Collection, 162 4.4.2 Cardelli’s Metrics and Object-Oriented Languages, 164 4.4.3 Object-Oriented versus Procedural Languages, 165 4.5 Overview of Programming Languages, 167 4.5.1 Ada, 167 4.5.2 C, 169 4.5.3 C++, 170 4.5.4 C#, 171 4.5.5 Java, 172 4.5.6 Real-Time Java, 174 4.5.7 Special Real-Time Languages, 177 www.it-ebooks.info x CONTENTS 4.6 Automatic Code Generation, 178 4.6.1 Toward Production-Quality Code, 178 4.6.2 Remaining Challenges, 180 4.7 Compiler Optimizations of Code, 181 4.7.1 Standard Optimization Techniques, 182 4.7.2 Additional Optimization Considerations, 188 4.8 Summary, 192 4.9 Exercises, 193 References, 195 5 Requirements Engineering Methodologies 197 5.1 Requirements Engineering for Real-Time Systems, 198 5.1.1 Requirements Engineering as a Process, 198 5.1.2 Standard Requirement Classes, 199 5.1.3 Specifi cation of Real-Time Software, 201 5.2 Formal Methods in System Specifi cation, 202 5.2.1 Limitations of Formal Methods, 205 5.2.2 Finite State Machines, 205 5.2.3 Statecharts, 210 5.2.4 Petri Nets, 213 5.3 Semiformal Methods in System Specifi cation, 217 5.3.1 Structured Analysis and Structured Design, 218 5.3.2 Object-Oriented Analysis and the Unifi ed Modeling Language, 221 5.3.3 Recommendations on Specifi cation Approach, 224 5.4 The Requirements Document, 225 5.4.1 Structuring and Composing Requirements, 226 5.4.2 Requirements Validation, 228 5.5 Summary, 232 5.6 Exercises, 233 5.7 Appendix 1: Case Study in Software Requirements Specifi cation, 235 5.7.1 Introduction, 235 5.7.2 Overall Description, 238 5.7.3 Specifi c Requirements, 245 References, 265 6 Software Design Approaches 267 6.1 Qualities of Real-Time Software, 268 6.1.1 Eight Qualities from Reliability to Verifi ability, 269 6.2 Software Engineering Principles, 275 6.2.1 Seven Principles from Rigor and Formality to Traceability, 275 6.2.2 The Design Activity, 281 www.it-ebooks.info CONTENTS xi 6.3 Procedural Design Approach, 284 6.3.1 Parnas Partitioning, 284 6.3.2 Structured Design, 286 6.3.3 Design in Procedural Form Using Finite State Machines, 292 6.4 Object-Oriented Design Approach, 293 6.4.1 Advantages of Object Orientation, 293 6.4.2 Design Patterns, 295 6.4.3 Design Using the Unifi ed Modeling Language, 298 6.4.4 Object-Oriented versus Procedural Approaches, 301 6.5 Life Cycle Models, 302 6.5.1 Waterfall Model, 303 6.5.2 V-Model, 305 6.5.3 Spiral Model, 306 6.5.4 Agile Methodologies, 307 6.6 Summary, 311 6.7 Exercises, 312 6.8 Appendix 1: Case Study in Designing Real-Time Software, 314 6.8.1 Introduction, 314 6.8.2 Overall Description, 315 6.8.3 Design Decomposition, 316 6.8.4 Requirements Traceability, 371 References, 375 7 Performance Analysis Techniques 379 7.1 Real-Time Performance Analysis, 380 7.1.1 Theoretical Preliminaries, 380 7.1.2 Arguments Related to Parallelization, 382 7.1.3 Execution Time Estimation from Program Code, 385 7.1.4 Analysis of Polled-Loop and Coroutine Systems, 391 7.1.5 Analysis of Round-Robin Systems, 392 7.1.6 Analysis of Fixed-Period Systems, 394 7.1.7 Analysis of Nonperiodic Systems, 396 7.2 Applications of Queuing Theory, 398 7.2.1 Single-Server Queue Model, 398 7.2.2 Arrival and Processing Rates, 400 7.2.3 Buffer Size Calculation, 401 7.2.4 Response Time Modeling, 402 7.2.5 Other Results from Queuing Theory, 403 7.3 Input/Output Performance, 405 7.3.1 Buffer Size Calculation for Time-Invariant Bursts, 405 7.3.2 Buffer Size Calculation for Time-Variant Bursts, 406 www.it-ebooks.info [...]... design and implementation of real-time systems requires attention to numerous practical issues These include: • • • • • • • The selection of hardware and system software, and evaluation of the trade-off needed for a competitive solution, including dealing with distributed computing systems and the issues of concurrency and synchronization Specification and design of real-time systems, as well as correct and. .. definitions, and others that are available, are quite different, and their differences are often the cause of misunderstanding between computer, software and systems engineers, and the users of real-time systems On a more pedantic level, there is the issue of the appropriate writing of the term real-time. ” Across technical and pedestrian literature, various forms of the term, such as real time, real-time, and. .. correctness of the system Real-time software designers must be familiar with computer architecture and organization, operating systems and related services, programming languages, systems and software engineering, as well as performance analysis and optimization techniques The text provides a pragmatic discussion of these subjects from the perspective of the real-time systems designer Because this is... at nonregular rates, such as handling an overtemperature failure in a nuclear power plant Even without defining the term real-time, ” it is probably understood that those events demand timely or real-time processing Real-Time Systems Design and Analysis: Tools for the Practitioner, Fourth Edition Phillip A Laplante and Seppo J Ovaska © 2012 the Institute of Electrical and Electronics Engineers, Inc... with “fast” systems 2 Rate-monotonic analysis has solved “the real-time problem.” 3 There are universal, widely accepted methodologies for real-time systems specification and design 4 There is no more a need to build a real-time operating system, because many commercial products exist 5 The study of real-time systems is mostly about scheduling theory The first misconception, that real-time systems must... engineering practice in general and real-time systems design in particular An evaluative review of several widely used programming languages in real-time systems design, with respect to these features, follows Our intent is to provide explicit criteria for rating a language’s ability to support real-time systems and to alert the user to the possible drawbacks of using each language in real-time applications... other types of systems as well, with an accompanying improvement of performance and robustness This alone is a significant reason to study the engineering of real-time systems 1.3 BIRTH AND EVOLUTION OF REAL-TIME SYSTEMS The history of real-time systems, as characterized by important developments in the United States, is tied inherently to the evolution of the computer Modern real-time systems, such... FUNDAMENTALS OF REAL-TIME SYSTEMS A side benefit of designing deterministic systems is that guarantees can be given that the system will be able to respond at any time, and in the case of temporally deterministic systems, when they will respond This fact reinforces the association of “control” with real-time systems The final and truly important term to be defined is a critical measure of real-time system... of central terms and correct common misunderstandings in Section 1.1 These definitions are targeted for practitioners, and thus they have a strong practical point-of-view Section 1.2 presents the multidisciplinary design challenges related to real-time systems It is shown that although real-time systems design and analysis are subdisciplines of computer systems engineering, they have essential connections... MULTIDISCIPLINARY DESIGN CHALLENGES The study of real-time systems is a truly multidimensional subdiscipline of computer systems engineering that is strongly influenced by control theory, operations research, and, naturally, software engineering Figure 1.5 depicts some of the disciplines of computer science, electrical engineering, systems engineering, and applied statistics that affect the design and analysis of real-time . 492 9.4.4 Drag -and- Drop Systems, 493 9.5 Vision: Real-Time Applications, 493 9.5.1 Local Networks of Collaborating Real-Time Systems, 494 9.5.2 Wide Networks of Collaborating Real-Time Systems, 495 9.5.3. exciting and rewarding book project. P.A.L. S . J . O . www.it-ebooks.info 1 FUNDAMENTALS OF REAL- TIME SYSTEMS 1 Real-Time Systems Design and Analysis: Tools for the Practitioner, Fourth Edition. . Data: Laplante, Phillip A. Real-time systems design and analysis : tools for the practitioner / Phillip A. Laplante, Seppo J. Ovaska. 4th ed. p. cm. ISBN 978-0-470-76864-8 (hardback) 1. Real-time data

Ngày đăng: 24/04/2014, 16:03

TỪ KHÓA LIÊN QUAN