Home > Store

Doing Hard Time: Developing Real-Time Systems with UML, Objects, Frameworks, and Patterns

Register your product to gain access to bonus material or receive a coupon.

Doing Hard Time: Developing Real-Time Systems with UML, Objects, Frameworks, and Patterns

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 1999
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-49837-5
  • ISBN-13: 978-0-201-49837-0

"This book will almost certainly become a seminal work in this field...the one book everyone will want to have both as a tutorial and as a reference."
--Larry McAlister, Senior Systems Architect, ENSCO, Inc.

The global demand for real-time and embedded systems is growing rapidly. With this increased demand comes an urgent need for more programmers in this realm; yet making the transition to real-time systems development or learning to build these applications is by no means simple. Real-time system designs must be written to meet hard and unforgiving requirements. It is a pursuit that requires a unique set of skills. Clearly, real-time systems development is a formidable task, and developers face many unique challenges as they attempt to do "hard time."

Doing Hard Time is written to facilitate the daunting process of developing real-time systems. It presents an embedded systems programming methodology that has been proven successful in practice. The process outlined in this book allows application developers to apply practical techniques--garnered from the mainstream areas of object-oriented software development--to meet the demanding qualifications of real-time programming.

Bruce Douglass offers ideas that are up-to-date with the latest concepts and trends in programming. By using the industry standard Unified Modeling Language (UML), as well as the best practices from object technology, he guides you through the intricacies and specifics of real-time systems development. Important topics such as schedulability, behavioral patterns, and real-time frameworks are demystified, empowering you to become a more effective real-time programmer.

The accompanying CD-ROM holds substantial value for the reader. It contains models from the book, as well as two applications that are extremely useful in the development of real-time and embedded systems. The first application, a UML-compliant design automation tool called Rhapsody (produced by I-Logix), captures analysis and design of systems and generates full behavioral code for those models with intrinsic model-level debug capabilities. The second application, TimeWiz, can analyze the timing and performance of systems and determine the schedulability of actions in multitasking systems.



0201498375B04062001

Sample Content

Table of Contents

(Chapters begin with an Introduction and conclude with a Summary, Looking Ahead, Exercises and References.)

Figure List.


About the Author.


Preface.


Acknowledgments.

SECTION 1: BASICS.

1. Introduction to Objects and the Unified Modeling Language.

Advantages of Objects.

Terms and Concepts.

Object Orientation with UML.

Objects.

Attributes.

Behavior.

Messaging.

Responsibility.

Concurrency.

Objects as Autonomous Machines.

Class Diagrams.

Relations Among Classes and Objects.

Use Cases.

Sequence Diagrams.

Physical Representation.

Things Common to Diagrams.

Notes.

Packages.

Constraints.

Stereotypes.

2. Basic Concepts of Real-Time Systems.

What is Real-Time?

Terms and Concepts.

Timeliness.

Responsiveness.

Concurrency.

Scheduling Concurrent Threads.

Event Arrival Patterns.

Thread Rendezvous Patterns.

Sharing Resources.

Predictability.

Memory Management.

Correctness and Robustness.

Deadlock.

Exceptional Conditions.

Race Conditions.

Distributed Systems.

Fault Tolerance and Safety.

Dealing with Resource-Limited Target Environments.

Low-Level Hardware Interfacing.

Real-Time Operating Systems.

Scalability.

Scheduling.

Typical RTOS Features.

3. Basic Concepts of Safety-Critical Systems.

Introduction to Safety.

The Therac-25 Story.

Other Stories.

Terms and Concepts.

Safety Related Faults.

Safety is a System Issue.

Random Faults Versus Systematic Faults.

Single Point Failures.

Common Mode Failures.

Latent Faults.

Fail-Safe State.

Achieving Safety.

Safety Architectures.

Single Channel Protected Design.

Eight Steps to Safety.

Step 1: Identify the Hazards.

Step 2: Determine the Risks.

Step 3: Define the Safety Measures.

Step 4: Create Safe Requirements.

Step 5: Create Safe Design.

Step 6: Implementing Safely.

Step 7: Assure Safety Process.

Step 8: Test, Test, Test.

Few Safety Related Standards.

4. Rapid Object-Oriented Process for Embedded Systems.

Terms and Concepts.

Development Phases.

Ordering.

Maturity.

Development Task Sequencing.

Waterfall Lifecycle.

Iterative Lifecycles.

Prototyping.

Scheduling and Estimation.

Advantages of Accurate Schedules.

Difficulties of Accurate Scheduling.

The ROPES Macro Cycle.

Analysis.

Requirements Analysis.

Systems Analysis.

Object Analysis.

Design.

Architectural Design.

Mechanistic Design.

Detailed Design.

Translation.

Activities.

Artifacts.

Testing.

Activities.

SECTION 2: ANALYSIS.

5. Requirements Analysis of Real-Time Systems.

Terms and Concepts.

Use Cases.

Messages and Events.

Scenarios, Protocols, and State Machines.

Use Cases.

Use Case Relations.

Use Case Example: Air Traffic Control System.

External Events.

Context-Level Messages.

Specifying External Messages.

External Event List.

Response Time.

Detailing Use Case Behavior.

Informal Textual Description.

Scenarios.

Sequence Diagrams.

Statecharts for Defining Use Case Behavior.

Identifying Use Cases.

Using Use Cases.

Heuristics for Good Requirements Analysis Diagrams.

Use Case Diagram Heuristics.

Use Case Heuristics.

Use Case Sequence Diagram Heuristics.

6. Structural Object Analysis.

Terms and Concepts.

Key Strategies for Object Identification.

Underline the Noun.

Identify Causal Agents.

Identify Coherent Services.

Identify Real-World Items.

Identify Physical Devices.

Identify Essential Abstractions of Domains.

Identify Transactions.

Identify Persistent Information.

Identify Visual Elements.

Identify Control Elements.

Execute Scenarios on the Object Model.

Reification of Objects into Classes.

Identify Object Associations.

Multiplicity.

Associations and Links.

Aggregation and Composition.

Object Attributes.

Generalization Relationships.

AATCS Example: Class Diagrams.

Heuristics for Good Class Diagrams.

Rules for Good Class Diagrams.

7. Object Behavioral Analysis.

Terms and Concepts.

Simple Behavior.

State Behavior.

Continuous Behavior.

UML Statecharts.

Basic State Semantics.

Transitions and Events.

Actions and Activities.

Pseudostates.

Orthogonal Regions and Synchronization.

Basic Statechart Syntax.

Inherited State Models.

Ill-formed State Models.

Example: AATCS Alarm System.

The Role of Scenarios in the Definition of Behavior.

Timing Diagrams.

Sequence Diagrams.

Activity Diagrams.

Defining Operations.

Types of Operations.

Strategies for Defining Operations.

Statechart Heuristics.

Timing Diagram Heuristics.

Activity Diagram Heuristics.

SECTION 3: DESIGN.

8. Architectural Design.

Terms and Concepts.

Tasking Model.

Representing Tasks.

Defining Task Threads.

Assigning Objects to Tasks.

Defining Task Rendezvous.

Component Model.

Deployment Model.

Representing Physical Architecture in the UML.

Multiprocessor Systems.

Safety/Reliability Model.

9. Mechanistic Design.

Terms and Concepts.

Design Pattern Basics.

Mechanistic Design Patterns.

Correctness Patterns.

Execution Control Patterns.

10. Detailed Design.

Introduction to Detailed Design.

Terms and Concepts.

Data Structure.

Primitive Representational Types.

Subrange Constraints.

Derived Attributes.

Data Collection Structure.

Associations.

The Object Interface.

Definition of Operations.

Detailed Algorithmic Design.

Representing Algorithms in the UML.

Algorithmic Example: Run-Time Data Interpolation.

Exceptions.

Source Language-based Exception Handling.

State-based Exception Handling.

SECTION 4. ADVANCED REAL-TIME MODELING.

11. Threads and Schedulability.

Terms and Concepts.

Time-Based Systems.

Reactive Systems.

Time Concepts.

Scheduling Threads.

Rate Monotonic Scheduling.

Earliest Deadline Scheduling.

Least Laxity Dynamic Scheduling.

Maximum Urgency First Scheduling.

Weighted Shortest Processing Time First (WSPTF) Scheduling.

Minimizing Maximum Lateness Scheduling.

Thread Synchronization and Resource Sharing.

Mutual Exclusion Semaphore.

Dekker's Algorithm.

Spinlocks.

Counting Semaphores.

Condition Variables.

Barriers.

Rendezvous Objects.

Schedulability Analysis of Hard Real-Time Systems.

Global Analysis.

Global Method with Blocking.

Computing Blocking.

Separate Task Utilization Bounds.

Aperiodic Tasks.

Schedulability Analysis of Soft Real-Time Systems.

Warm and Fuzzy: Timeliness in the Soft Context.

Soft Schedulability.

12. Dynamic Modeling.

Terms and Concepts.

But is it the Right State Machine?

Behavioral Patterns.

Latch State Pattern.

Polling State Pattern.

Latched Data Pattern.

Device Mode State Pattern.

Transaction State Pattern.

Component Synchronization State Pattern.

Barrier State Pattern.

Event Hierarchy State Pattern.

Random State Pattern.

Null State Pattern.

Watchdog State Pattern.

Retriggerable Counter State Pattern.

Model-Level Debugging and Testing.

Animated Debugging.

Animated Testing.

Sample Debugging Session.

13. Real-Time Frameworks.

Terms and Concepts.

Real-Time Frameworks.

Architectural Support Patterns.

Safety and Reliability Patterns.

Behavioral Patterns.

Framework Design Principles and Metrics.

Set of Services.

Generalization Hierarchy Structure.

Replaceable Components.

Portability.

Naming and Syntax Conventions.

Performance.

The Rhapsody Object Execution Framework (OXF).

Rhapsody Architecture.

Execution Framework.

Interobject Association Patterns.

Using C++ Standard Template Library.

Abstract Operating System.

Animation Framework.

Sample Application Using the Rhapsody OXF Framework.

Appendix A: UML Notation Summary.
Appendix B: Introduction to Rhapsody.
Appendix C: Introduction to Timewiz.
Index.
CD-ROM Warranty. 0201498375T04062001

Preface

Goals

Today's world literally runs on embedded computers. Virtually every field of endeavor in our modern society depends on embedded computers from manufacturing to transportation to medicine. The typical household is a computing eco-system that includes telephones, televisions, washing machines, ovens, and a host of other silicon-based fauna. Many, if not most, of these computing devices have timeliness requirements to their functionality, so that late action is often wrong action. Many embedded devices have the capacity to do great harm if they malfunction or fail.

Not only are more things being handled by embedded computing devices, but the scope, complexity, and criticality of the things being handled is increasing geometrically. Technological advances are crucial in order to keep up with the increasing demands on the developer of such systems. Gone are the days when the hardware complexity was the limiting factor in the development of electrical devices. Most companies involved in the manufacture of real-time and embedded systems have realized the truism of "the tail that wags the dog" and have begun seriously looking at ways to improve software productivity. These better ways to develop real-time and embedded systems are the source and soul of this book.

Doing Hard Time: Designing and Implementing Embedded Systems with UML focuses on model-based development of real-time and embedded systems using the Unified Modified Language (UML) and a risk-based iterative development lifecycle called ROPES. UML is a 3rd generation modeling language that rigorously defines the semantics of the object metamodel and provided a notation for capturing and communicating object structure and behavior. The UML became a standard modeling language in the OMG in late 1996, and the author remains heavily involved in its ongoing effort. This book is based upon the 1.3 revision of the UML standard.

Model-based development is crucial in today's high-complexity, short-development-cycle business environment. It is important to focus on the fundamental abstractions of the problem rather than on the low-level details of its implementation; to focus on "should the control rods be in the reactor core to avoid a meltdown?" rather than "should I jump on non-zero or carry?" By increasing the level of abstraction, it is possible to build more complex systems with fewer defects in less time--a winning combination for everyone concerned.

Because the UML is executable, it is possible to automatically generate executable systems from UML models. The importance of this goes well beyond simply saving the time and effort of hand-translating code from abstract models. It is an enabling technology, allowing the developer to rapidly move from the inception of a concept to the testing of that concept. This allows early risk reduction and encourages exploration of the solution space. Conceptual defects can be identified and fixed very early before many dependencies on the flawed concepts are created, resulting in higher-quality systems in less calendar time.

This book is meant to be a fusion of a number of subject domains almost universally left disjoint--real-time concepts such as timeliness and performance, object modeling, a rapid development process, and system safety. This unified approach allows the developer to follow simple and well-understood process steps culminating with the delivery of correct and timely embedded solutions.

There are very few books on using objects in real-time systems and even fewer that use the latest in object modeling languages--the UML. Virtually all object-oriented books focus primarily on business or data base application domains and do not mention real-time aspects at all. On the other hand, texts on real-time systems have largely ignored object-oriented methods. For the most part, such books fall into two primary camps: those that bypass methodological considerations altogether and focus solely on "bare metal" programming and those that are highly theoretical with little advice for actually implementing workable systems. Doing Hard Time is meant to bridge for these technologies, presenting the development of deployable real-time systems using the object semantics and notation of the UML. It does so in a tool-independent manner, even though it does use a particular tool to demonstrate the examples.

Audience

The book is oriented towards the practicing professional software developer and the computer science major, in the junior year or higher. The book could serve as an undergraduate or graduate level text, but the focus is on practical development rather than a theoretical introduction. A few equations are to be found in this book, but more theoretical and mathematical approaches are referenced where appropriate. The book assumes a reasonable proficiency in at least one programming language and at least a cursory exposure to the fundamental concepts of both object orientation and real-time systems.

Organization

This book is organized into 5 sections:

  • The Basics
This section introduces the object semantics and notation of the UML, real-time systems, safety criticality, and development processes.
  • Analysis
This section deals with the various kinds of analysis, including the capturing of requirements with use cases, scenarios, and state machines, the identification of the key abstractions in a problem, and modeling the fundamental behavior.
  • Design
This section focuses on the addition of design level information, such as the concurrency model, creation of run-time artifacts (libraries, executables, and so on), mapping to physical architectures, the application of design patterns to optimize collaborations of objects, and modeling of algorithms.
  • Advanced Real-Time Modeling
This section discusses topics of interest in difficult or complex real-time and embedded applications. These topics include the determination of the schedulability of object models through mathematical analysis, the reification of general state machine solutions to commonly occurring behavioral problems into behavioral design patterns, and the structure and function of real-time frameworks.
  • Appendices
This book provides three appendices:
  1. UML Notational Guide: A short guide to the notations used in the UML and in the book.
  2. Introduction to Rhapsody: An introduction to the UML visual programming tool provided in the accompanying CD-ROM.
  3. Introduction to TimeWiz: An introduction to the schedulability analysis tool provided in the accompanying CD-ROM.

CD-ROM

The CD-ROM provided with this book contains three kinds of things:

  • The examples presented within the pages of the book
These models are given as Rhapsody projects and can be opened and manipulated with Rhapsody.
  • Rhapsody
The visual programming tool installation files.
  • TimeWiz
The schedulability analysis tool installation files.

I believe (and hope) that the needs of both the student and professional developer will be addressed by this book, and it is in this spirit that I offer it.

Acknowledgments

I wish to express thanks to my reviewers who tried hard to keep me honest and on topic, and who, I think, more or less succeeded:

Eran Gery, i-Logix
Jim Collins, i-Logix
Larry McAlister, ENSCO, Inc.
Therese M. Douglass, Air Traffic Software Architecture, Inc.
Gary Cernosek, Rational Software Corp.

I would also like to thank Neeraj Chandra and Gene Robinson of i-Logix for their support in allowing me to spend so much effort on this book, Doug Jensen of Mitre for his input on schedulability, Therese Douglass for her expertise in air traffic control systems, and the editorial team at Addison-Wesley, including Carter Shanklin, Krysia Bebick, and Maureen Willard, to name a few.

Bruce Powel Douglass, Ph.D.
Deep, Dark Winter, (early) 1999


0201498375P04062001

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020