Skip to document

Architectural patterns for real-time software

Architectural patterns for real-time software
Course

Software Engineering (CSPC 111)

140 Documents
Students shared 140 documents in this course
Academic year: 2022/2023
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Don Mariano Marcos Memorial State University

Comments

Please sign in or register to post comments.

Preview text

Architectural patterns for real-time software

Architectural patterns are abstract, stylized descriptions of good design practice. They capture knowledge about the organization of system architectures, when these architectures should be used, and their advantages and disadvantages. You use an architectural pattern to understand an architecture and as starting point for creating your own, specific architectural design.

The difference between real-time and interactive software means that there are distinct architectural patterns for real-time embedded systems. Real-time systems’ patterns are process-oriented rather than object- or component-oriented. In this section, I discuss three real-time architectural patterns that are commonly used:

  1. Observe and React  This pattern is used when a set of sensors are routinely monitored and displayed. When the sensors show that some event has occurred (e., an incoming call on a cell phone), the system reacts by initiating a process to handle that event.

  2. Environmental Control  This pattern is used when a system includes sensors, which provide information about the environment and actuators that can change the environment. In response to environmental changes detected by the sensor, control signals are sent to the system actuators.

  3. Process Pipeline  This pattern is used when data has to be transformed from one representation to another before it can be processed. The transformation is implemented as a sequence of processing steps, which may be carried

out concurrently. This allows for very fast data processing, because a separate core or processor can execute each transformation.

These patterns can of course be combined, and you will often see more than one of them in a single system. For example, when the Environmental Control pattern is used, it is very common for the actuators to be monitored using the Observe and React pattern. In the event of an actuator failure, the system may react by displaying a warning message, shutting down the actuator, switching in a backup system, and so forth.

The patterns that I cover are architectural patterns that describe the overall sstructure of an embedded system. Douglass (Douglass 2002) describes lower-level, real-time design patterns that support more detailed design decision making. These patterns include design patterns for execution control, communications, resource allocation, and safety and reliability.

These architectural patterns should be the starting point for an embedded systems design; however, they are not design templates. If you use them as such, you will probably end up with an inefficient process architecture. You have to optimize the process structure to ensure that you do not have too many processes. You also should ensure that there is a clear correspondence between the processes and the sensors and actuators in the system.

Description

 The input values of a set of sensors of the same types are collected and analyzed. These values are displayed in some way. If the sensor values indicate that some exceptional condition has arisen, then actions are initiated to draw the operator’s attention to that value and, if necessary, take actions in response to the exceptional value.

resource management are implemented through calls to primitives provided by the real- time operating system for mutual exclusion. Because the compiler cannot check these calls, programming errors are more likely. Programs are also often more difficult to understand because the language does not include real-time features. As well as understanding the program, the reader also has to know how real-time support is provided using system calls.

Because real-time systems must meet their timing constraints, you may not be able to use object-oriented development for hard real-time systems. Object-oriented development involves hiding data representations and accessing attribute values through operations defined with the object. There is a significant performance overhead in object-oriented systems because extra code is required to mediate access to attributes and handle calls to operations. The consequent loss of performance may make it impossible to meet real-time deadlines.

A version of Java has been developed for embedded systems development (Burns and Wellings 2009; Bruno and Bollella 2009). This language includes a modified thread mechanism, which allows threads to be specified that will not be interrupted by the language garbage collection mechanism. Asynchronous event handling and timing specification has also been included. However, at the time of writing, this specification has mostly been used on platforms that have significant processor and memory capacity (e., a cell phone) rather than simpler embedded systems, with more limited resources. These systems are still usually implemented in C.

Was this document helpful?

Architectural patterns for real-time software

Course: Software Engineering (CSPC 111)

140 Documents
Students shared 140 documents in this course
Was this document helpful?
Architectural patterns for real-time software
Architectural patterns are abstract, stylized descriptions of good design practice. They
capture knowledge about the organization of system architectures, when these
architectures should be used, and their advantages and disadvantages. You use an
architectural pattern to understand an architecture and as starting point for creating your
own, specific architectural design.
The difference between real-time and interactive software means that there are distinct
architectural patterns for real-time embedded systems. Real-time systems’ patterns are
process-oriented rather than object- or component-oriented. In this section, I discuss
three real-time architectural patterns that are commonly used:
1. Observe and React
This pattern is used when a set of sensors are routinely monitored and
displayed. When the sensors show that some event has occurred (e.g., an
incoming call on a cell phone), the system reacts by initiating a process to
handle that event.
2. Environmental Control
This pattern is used when a system includes sensors, which provide
information about the environment and actuators that can change the
environment. In response to environmental changes detected by the
sensor, control signals are sent to the system actuators.
3. Process Pipeline
This pattern is used when data has to be transformed from one
representation to another before it can be processed. The transformation
is implemented as a sequence of processing steps, which may be carried