Book Image

The Complete Edition - Software Engineering for Real-Time Systems

By : Jim Cooling
Book Image

The Complete Edition - Software Engineering for Real-Time Systems

By: Jim Cooling

Overview of this book

From air traffic control systems to network multimedia systems, real-time systems are everywhere. The correctness of the real-time system depends on the physical instant and the logical results of the computations. This book provides an elaborate introduction to software engineering for real-time systems, including a range of activities and methods required to produce a great real-time system. The book kicks off by describing real-time systems, their applications, and their impact on software design. You will learn the concepts of software and program design, as well as the different types of programming, software errors, and software life cycles, and how a multitasking structure benefits a system design. Moving ahead, you will learn why diagrams and diagramming plays a critical role in the software development process. You will practice documenting code-related work using Unified Modeling Language (UML), and analyze and test source code in both host and target systems to understand why performance is a key design-driver in applications. Next, you will develop a design strategy to overcome critical and fault-tolerant systems, and learn the importance of documentation in system design. By the end of this book, you will have sound knowledge and skills for developing real-time embedded systems.
Table of Contents (16 chapters)
Preface
15
Glossary of terms

1.1 Categorizing Computer Systems

So, how are computer systems categorized? There are many answers to this, sometimes conflicting, sometimes overlapping. But if we use the speed of response as the main criterion, then three general groups emerge:

  • Batch: I don't mind when the computer results arrive, within reason (the time taken may be hours or even days in such systems).
  • Interactive online: I would like the results within a fairly short period of time, typically, a few seconds.
  • Real-time: I need the results within definite timescales; otherwise, the system just won't work properly.

Let's consider these in turn.

An example of a modern batch system is shown in Figure 1.1. Methods like this are used:

Figure 1.1: Modern batch system

Figure 1.1: Modern batch system

Where, computing resources are scarce and/or expensive as it is a very efficient technique.

Here, the user usually preprocesses all programs and information, perhaps storing data on a local computer. At a convenient time, say, at the start of an evening shift, this job is passed over the data link to a remote site (often, a number of jobs are transmitted as a single job lot). When all the jobs are finished, the results are transmitted back to the originating site.

Interactive online computer systems are widely used in banking, holiday booking, and mail-order systems. Here, for private systems, access to the system is made using (typically) PC-based remote terminals (Figure 1.2):

Figure 1.2: Typical interactive online computer system

Figure 1.2: Typical interactive online computer system

The local processing of data isn't normally done in this instance. Instead, all transactions are handled by the central computer in a time-slice fashion. Routing and access control is the responsibility of the frontend processors and local multiplexers. Many readers will, of course, have experience of such systems through their use of the internet and the web (perhaps the importance of timeliness in interactive systems is summed up by the definition of www as standing for world wide wait). A further point to take note of is that response times depend on the amount of activity. All systems slow down as load builds up, sometimes, seizing up at peak times. For time-critical applications, this type of response is unacceptable, as, for example, in auto cruise control systems (Figure 1.3):

Figure 1.3: Real-time computer system

Figure 1.3: Real-time computer system

Here, the driver dials in the desired cruising speed. The cruise control computer notes this and compares it with the actual vehicle speed. If there is a difference, correcting signals are sent to the power unit. The vehicle will either speed up or slow down, depending on the desired response. Provided the control is executed quickly, the vehicle will be powered in a smooth and responsive manner. However, if there is a significant delay in the computer, a kangaroo-like performance occurs. Clearly, in this case, the computer is worse than useless; it degrades the car's performance.

In this book, "real-time" is taken to imply time-bound response constraints. Should computer responses exceed specific time bounds, then this results in performance degradation and/or malfunction. So, within this definition, batch and interactive online systems are not considered to operate in real-time.