Save 40% on books and eBooks + 70% on videos now through May 31*—use code PROGRAM. Shop now.
The first book to help real-time and embedded systems programmers leverage the powerful technique of design patterns.
° Applying a proven object technology concept to the unique, specialized area of realtime and embedded systems development
° Practical and applicable -- helps reader apply proven solutions to recurring design challenges
° The latest from Bruce Powel Douglass, a noted expert on real-time development
When creating real-time and embedded (RTE) systems, there is no room for error. The nature of the final product demands that systems be powerful, efficient, and highly reliable. The constraints of processor and memory resources add to this challenge. Sophisticated developers rely on design patterns—proven solutions to recurrent design challenges—for building fail-safe RTE systems.
Real-Time Design Patterns is the foremost reference for developers seeking to employ this powerful technique. The text begins with a review of the Unified Modeling Language (UML) notation and semantics then introduces the Rapid Object-Oriented Process for Embedded Systems (ROPES) process and its key technologies. A catalog of design patterns and their applications follows.
Key topics covered in this book include:
The book's extensive problem-solving templates, which draw on the author's years in the trenches, will help readers find faster, easier, and more effective design solutions.
The accompanying CD-ROM contains:
Click below for Sample Chapter(s) related to this title:
Sample Chapter 6
(NOTE: Each chapter, except Chapter 9, concludes with References.)
I. DESIGN PATTERN BASICS.1. Introduction.
Basic Modeling Concepts of the UML.
Structural Elements and Diagrams.
Small Things: Objects, Classes and Interfaces.
Big Things: Subsystems, Components, and Packages.
Behavioral Elements and Diagrams.
Actions and Activities.
Operations and Methods.
Use Case and Requirements Models.
Capturing Black-Box Behavior without Revealing Internal Structure.
What is a Design Pattern?2. Architecture and the UML.
Logical and Physical Architecture.
The Five Views of Architecture.
Subsystem and Component View.
Concurrency and Resource View
Safety and Reliability View.
Alphabet Soup: CORBA, UML and MDA Basics.
MDA to the Rescue.
Creating Architecture Elements—the Model Level.
Subsystem and Component View.
Concurrency and Resource View.
Safety and Reliability View.
Deployment View.3. The Role of Design Patterns.
The ROPES Development Process.
ROPES Process Overview.
The ROPES Microcycle in Detail.
Analysis with the ROPES Process.
Design with the ROPES Process.
Design Pattern Basics.
What is a Design Pattern?
Basic Structure of Design Patterns.
How to Read Design Patterns in this Book.
Using Design Patterns in Development.
Pattern Hatching—Locating the Right Patterns.
Pattern Mining—Rolling your own Patterns.
Pattern Instantiation—Applying Patterns in Your Designs.
II. ARCHITECTURAL DESIGN PATTERNS.4. Subsystem and Component Architectural Patterns.
5-Layer Architecture Pattern.
Microkernel Architecture Pattern.
Channel Architecture Pattern.
Recursive Containment Pattern.
Hierarchical Control Pattern.
Virtual Machine Pattern.
ROOM Pattern.5. Concurrency Patterns.
Message Queuing Pattern.
Guarded Call Pattern.
Cyclic Executive Pattern.
Round Robin Pattern.
Static Priority Pattern.
Dynamic Priority Pattern.6. Memory Patterns.
Memory Management Patterns.
Static Allocation Pattern.
Pool Allocation Pattern.
Fixed-Sized Buffer Pattern.
Smart Pointer Pattern.
Garbage Collection Pattern.
Garbage Compactor Pattern.7. Resource Patterns.
Critical Section Pattern.
Priority Inheritance Pattern.
Highest Locker Pattern.
Priority Ceiling Pattern.
Simultaneous Locking Pattern.
Ordered Locking Pattern.8. Distribution Patterns.
Shared Memory Pattern.
Remote Method Call Pattern.
Data Bus Pattern.
Broker Pattern.9. Safety and Reliability Patterns.
Protected Single Channel Pattern.
Homogeneous Redundancy Pattern.
Triple Modular Redundancy Pattern.
Heterogeneous Redundancy Pattern.
Sanity Check Pattern.
Safety Executive Pattern.Appendix A: Notational Summary.
Real-time and embedded systems ("RTE systems") must execute in a much more constrained environment than "traditional" computer systems, such as desktop and mainframe computers. RTE systems must be highly efficient, optimally utilizing their limited processor and memory resources, and yet must often out-perform systems with significantly more compute power. In addition, many RTE systems have important safety critical and high reliability requirements due to their use in systems such as avionics flight control, nuclear power plant control, life support, medical instrumentation, just to name a few. The creation of RTE systems to meet these functional and quality of service requirements requires highly experienced developers with decades of experience. Yet, over the years, as these developers development of such systems, they see the same kinds of problems recurring over and over - not exactly the same problems, but common threads. The very best developers abstract these problems and their solutions, into generalized approaches that have been consistently effective. These generalized approaches are called design patterns. They are often best applied at the level of the system or software architecture - the sum of design decisions that affect the fundamental organization of the system. Real-Time Design Patterns is an attempt to capture in one place a set of architectural design patterns that are useful in the development of RTE systems.Audience
The book is oriented towards the practicing professional software developer and the computer science major, in the junior or senior year. This book could also serve as an undergraduate or graduate level text, but the focus is on practical development rather than a theoretical introduction. The book assumes a reasonable proficiency in at least one programming language and a basic understanding to the fundamental concepts of object orientation, the Unified Modeling Language (UML), and real-time systems.Organization
The first section consists of three chapters. Chapter 1 provides a very brief review of the major concepts in the Unified Modeling Language. Chapter 2 introduces the fundamental concepts of architecture, as they are defined in the Rapid Object-oriented Process for Embedded Systems (ROPES), including the primary division of architecture into logical (design-time) and physical (run-time) aspects, and the 5 important architectural views. In the third chapter, the book gets into a discussion of design patterns and their role in defining architecture. Because it is difficult to discuss architecture in a process-free environment, the ROPES process, and the key technologies it tries to optimize, are introduced to provide a background in which design patterns may be effectively discussed. Once process has been introduced, design patterns are next. Their various aspects are explained and the fundamental organization of design patterns used in this book is provided. The chapter finishes with a discussion of how design patterns can be applied in the development of real systems.
Section 2 contains the architectural design patterns which reify the ways that large scale system components are organized and structured to optimize some set of general system criteria.
The patterns in the second section are organized around the architectural concept they address. Chapter 4 is dedicated to high-level structural patterns - focused around what is called the Subsystem or Component architecture. Because concurrency and resource management is so crucial to real-time and embedded systems, Chapter 5 focuses on the common patterns of concurrency. Memory management is crucial for many systems in this domain, and is the subject of Chapter 6. We see even more general resource management patterns in Chapter 7. Chapter 8 presents a number of common distribution architecture patterns that define how objects can be distributed across multiple address spaces and computers. Finally, Chapter 9 provides a number of patterns that deal with building safe and reliable architectures.
Two appendices appear at the end of the book. The first is simply a summary of the UML graphical notation and the second is an index of the patterns by name.
The CD-ROM has a number of interesting and hopefully useful things on it. It contains a full copy of the Rhapsody UML tool with instructions on how to get a temporary license from I-Logix. Other additional tools potentially useful for developers of real-time developers are also provided. The Papers chapter contains some papers on various topics as well as some useful OMG specifications.More Information
Additional information on the UML, object-oriented technology and the development of real-time systems can be found at www.ilogix.com. In addition, the current UML, MDA, and CORBA standards can be seen at www.omg.org. For more information on using the UML in real-time systems, Real-Time UML 2nd Edition is also available from Addison-Wesley, as is the more comprehensive Doing Hard Time: Developing Real-Time Systems with UML, Objects, Frameworks and Patterns. Many other well-written and useful books on the UML and software engineering are similarly available.
In this book, Bruce Douglass illustrates for the first time how two important contemporary software engineering advances-patterns and the UML-can be applied advantageously to the concepts and techniques traditionally used in mainstream real-time software. Most other publications about software patterns (such as ) have not addressed real-time systems per se in any depth, or have focused on the narrower and more advanced topic of real-time middleware (), or have been application domain specific ().
This book offers a significant benefit to the practice of real-time computing, because software patterns and the UML enable potentially lower software costs in many systems. Real-time software spans the entire range of complexity and costs. In some real-time systems, the software is so small and simple, and the hardware is so complex and/or expensive, that software costs are a small fraction of the system costs (for example, software in a laser gyroscope). In other real-time systems, the software is so large and complex that regardless of the hardware costs, the software costs are a major part of the system costs (for example, software in a military or commercial aircraft). Barry Boehm, in his recent book updating the ubiquitous Cocomo software cost model , assigns an effort multiplier of 1.74 (the highest one) to all lifecycle phases of this latter kind of software, compared to "nominal" software (depending on the project circumstances, that multiplier can easily be a major underestimation). Most real-time software lies between these two extremes, and it is that mainstream audience of practitioners who will benefit the most from this book. Historically, developers of real-time software have lagged behind other developers in using the most contemporary software engineering methodologies. There are several reasons for this.
One is, as mentioned above, that some real-time software is so simple that only the most elementary methodologies are needed.
A more common reason is that many real-time systems with non-trivial software suffer from hardware capacity constraints (due to size, weight, power, and so on). Software structured for purposes such as re-usability, modularity, or flexibility does tend to consume additional time or space resources. This is sometimes compensated for by the fact that commodity computing system hardware cost is always declining and its performance is always increasing. But in many real-time systems, hardware cost is still an easily measured quantitative factor that is thought to outweigh the hard-to-measure qualitative factors of software quality and costs.
Yet another reason is that real-time software practitioners are frequently application experts who are not always educated enough in modern software engineering to understand and employ it properly. New computer science and engineering graduates rarely enter the real-time field, because their formal education has not exposed them to much if any significant realistic real-time practice (real-time is a uniquely disadvantaged aspect of computer science and engineering in this respect), and what little real-time theory they may have learned is still of very limited practical relevance.
This book provides an introduction to software patterns and the UML-by one of the most authoritative contributors to those topics-as applied to mainstream real-time software, in a manner that is easily understood by practitioners in that field without prerequisite knowledge. Those who make a modest investment in learning this material can expect to discover how to cast much of their hard-earned professional experience in a framework that can make their real-time software designs more predictable-not just in terms of their timeliness (timeliness predictability being the raison d'être of real-time computing), but also in terms of their lifecycle costs.
Another prospective benefit for many real-time software designers of becoming familiar with software patterns and the UML is that these issues are of rapidly increasing importance to building larger scale, more dynamic and complex, and more distributed real-time computing systems. Such systems offer highly significant (albeit as yet not always fully appreciated) added value to many enterprises, and hence offer perhaps the most challenging and rewarding career development opportunities in the field of real-time computing systems. This book is an excellent starting point toward that future.
-E. Douglas Jensen
Doug Jensen is widely recognized as one of the pioneers of real-time computing systems, and especially of dynamic distributed real-time computing systems. He is credited with the research leading to the world's first deployed distributed real-time computer control system product. He has over three decades of hardware, software, and systems research and technology development experience in military and industrial real-time computing, and was on the faculty of the Computer Science Department of Carnegie Mellon University for eight years. He is currently in a senior technical leadership position at The MITRE Corporation, where he conducts research and technology transition on real-time computing systems for projects of strategic national interest. Doug Jensen's Web site is http://www.real-time.org.
1. Boehm, Barry, Ellis Horowitz, Ray Madachy, Donald Reifer, Bradford Clark, Bert Steece, A. Winsor Brown, Sunita Chulani, and Chris Abts. Software Cost Estimation with Cocomo II. Upper Saddle River, NJ: Prentice Hall, January 2000.
2. Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Reading, MA: Addison-Wesley, 1995.
3. Lea, Doug. Design Patterns for Avionics Control Systems, http://st-www.cs.uiuc.edu/users/patterns/patterns.html, 1994.
4. OOPSLA 2001, Workshop on Patterns in Distributed Real-Time and Embedded Systems, ACM, October 2001.
Click below to download the Index file related to this title: