[TOC]
As well as the need for real-time response, there are other important differences between embedded systems and other types of software systems:
- Embedded systems generally run continuously and do not terminate.
- Interactions with the system's environment are uncontrollable and unpredictable.
- There may be physical limitations that affect the design of a system.
- Direct hardware interaction may be necessary.
- Issues of safety and reliability may dominate the system design.
There is no standard embedded system design process. Rather, different processes are used that depend on the type of system, available hardware, and the organization that is developing the system. The following activities may be included in a real-time software design process:
- Platform selection.
- Stimuli/response identification.
- Timing analysis.
- Process design.
- Algorithm design.
- Data design.
- Process scheduling.
Components of a real-time operating system
For all except the simplest systems, they usually include:
- A real-time clock, which provides the information required to schedule processes periodically.
- An interrupt handler, which manages aperiodic requests for service.
- A scheduler, which is responsible for examining the processes that can be executed and choosing one of these for execution.
- A resource manager, which allocates appropriate memory and processor resources to processes that have been scheduled for execution.
- A dispatcher, which is responsible for starting the execution of processes.
A general model of an embedded real-time system
Sensor and actuator processes
The RTOS has to be able to manage at least two priority levels for system processes:
Interrupt levelThis is teh highest priority level. It is allocated to processes that need a very fast response. One of these processes will be the real-time clock process.Clock levelThis level of prioroty is allocated to periodic processes.
RTOS actions required to start a process
There are two commonly used scheduling strategies:
Non-pre-emptive schedulingOnce a process has been scheduled for execution it runs to completion or until it is blocked for some reason, such as waiting for input.pre-emptive schedulingThe execution of an executing process may be stopped if a higher-priority process requires service.
Stimuli fall into two classes:
Periodic stimuli:These occur at predictable time intervals.Aperiodic stimuli:These occur irregularly and unpredictably and are usually signaled using the computer's interrupt mechanism.
Three real-time architectural patterns that are commonly used:
- Observe and React.
- Environmental Control.
- Process Pipeline.
When you are analyzing the timing requirements of embedded real-time systems and designing systems to meet these requirements, there are three key factors that you have to consider:
- Deadlines.
- Frequency.
- Execution time.
[1] Ian Sommerville. SOFTWARE ENGINEERING . 9th Edition



