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

5.2 Controlling Task Execution – Scheduling

5.2.1 Scheduling and Time Slicing Operations

As pointed out earlier, one of the primary jobs of the RTOS is to share out the processor time between the various tasks. This is defined to be task scheduling. To do this, the RTOS contains a function that decides when a task should run and for how long: the scheduler. Such decisions are based on a set of rules called a scheduling algorithm. Over the years, many algorithms have been developed; there's much to choose from. However, in practice, real-time systems use a very restricted set, ones that we'll look at shortly. First, though, let's revisit the topic of the runtime behavior of tasks, specifically their temporal aspects.

Consider the pressure control task shown in Figure 5.6(b) and its related pseudocode listing. We can model its time behavior using a state transition diagram, such as the one in Figure 5.11:

Figure 5.11: Task state –...