Component Based On Embedded System
Component Based On Embedded System
Ivica Crnkovic
Mälardalen University, Department of Computer Science and Engineering,
Box 883, 721 23 Västerås, Sweden
ivica.crnkovic@mdh.se, www.idt.mdh.se/~icc
Abstract: This paper addresses component-based approach development of real-time and embedded systems is
for embedded systems. Due to the specific characteristics of significantly slower. Major reasons are that embedded
embedded systems the general-purpose component systems must satisfy requirements of timeliness, quality-
technologies such as COM, .NET, or EJB have not been the of-service, predictability, that they are often safety-critical,
most appropriate choices for their development. Although and can use severely constrained resources (memory,
attractive, component-based approach has not been processing power, communication). The widely used
successful in this domain as in other domains. However in component technologies such as EJB, .NET, CORBA
recent years the interest for component-based approach in component models are inherently heavyweight and
embedded systems increases. The experience has shown complex, incurring large overheads on the run-time
that existing technologies cannot be used, or at least used platform; they do not in general address timeliness,
directly. On the other hand an increasing understanding of quality-of-service or similar extra-functional properties
principles of component-based approach makes it possible that are important for real-time systems. In their present
to utilize these principles in implementation of different form they start to be deployed in large, distributed, and not
component-based models, more appropriate for embedded safety critical systems, e.g., in industrial automation, but
systems. This paper gives an overview of basic are not suitable for deployment in most embedded real-
characteristics of embedded systems, their requirements and time environments.
constraints, and the implications to component models for
This paper gives a short overview of basic characteristics
these systems.
of embedded software and the problems and challenges
the developers met. Further it describes a current state of
1 Introduction the practice in different industries and research trends in
Embedded systems cover a large range of computer applying component-based principles for embedded
systems from ultra small computer-based devices to large systems. The paper is based on work and results of several
systems monitoring and controlling complex processes. The research projects, EU IST ARTIST1, CBSENet Network2
overwhelming number of computer systems belongs to Swedish SAVE3 project, and on communication and
embedded systems: 98% of all computer systems belong to cooperation with several companies such as ABB, Volvo,
embedded systems today. IEEE has the following definition Ericsson and Philips.
for embedded systems:
The rest of the paper is organized as follows. Section 2
An Embedded Computer System: A computer system that is gives and general characteristics and the most important
part of a larger system and performs some of the requirements of embedded systems. Section 3 gives some
requirements of that system; for example, a computer examples of embedded systems in which a component-
system used in an aircraft or rapid transit system. (IEEE, based approach has been used or has recently being
1992). developed. Chapter 4 lists the basic characteristics of
component-based approach for embedded systems and
Most of such embedded systems can also be characterized
finally chapter 5 summarizes the current challenges and
as real-time systems, (i.e., systems in which the correctness
need for further research.
of the system depends not only on the logical result of the
computations it performs but also on time factors [9]).
Embedded real-time systems contain a computer as a part 2 Specific requirements of embedded
of a larger system and interact directly with external systems
devices. They must usually meet stringent specifications for In most of the cases embedded systems are real-time
safety, reliability, limited hardware capacity etc. The systems. In many cases embedded systems are safety or
increased complexity of embedded real-time systems leads mission critical systems. Embedded systems vary from
to increasing demands with respect to requirements very small systems to very large systems. For small
engineering, high-level design, early error detection, systems there are strong constrains related to different
productivity, integration, verification and maintenance. recourses such as power or memory consumption. For
Component-based development is an attractive approach in these as well as for large embedded systems the demands
the domains of embedded systems. In particular for the
development of many variants of products the component- 1
http://www.systemes-critiques.org/ARTIST
based approach is attractive. In spite of this attractiveness 2
http://www.cbsenet.org
the adoption of component-based technologies for the 3
http://www.mrtc.mdh.se/SAVE
on reliability, robustness, availability and other etc.) and maintenance (adaptive maintenance, debugging,
characteristics of dependable systems are important. regressive testing, etc.) require a lot of efforts. For these
Finally, in many domains, the product life cycle is very reasons the technologies and processes that lead to lower
long – in can stretch to several decades. costs for these activities are very attractive and desirable.
All these characteristics have strong implications on
requirements. Most of the requirements of embedded 3 State of the practice and experience for
systems are related to non-functional characteristics (better Embedded Systems
designated as extra-functional properties or quality Embedded systems comprise a scale from ultra small
attributes). These properties can be classified in run-time devices with simple functionality, through small systems
and life cycle extra-functional properties. The most with sophisticated functions, to large, possibly distributed
important are: systems, where the management of the complexity is the
- Real-time properties. The real-time system functions main challenge. Further we can distinguish between
are time-related; a violation of time requirements even systems produced in large quantities, in which the low
of a proper functional response violates the system production costs are very important and low-volume
functionality. There are numbers of real-time products in which the system dependability is the most
properties: Response time or latency, execution time, important feature. All these different requirements have
worst case execution time, deadline etc. impact on feasibility, on use, and on approach in
component-based development. A common characteristic
- Dependability. Dependability is defined as an ability of of all systems is increasing importance of software. For
a system to deliver service that can justifiably be example, software development costs for industrial robots
trusted and an ability of a system to avoid failures that make today about 75% of total costs, while in car industry
are more severe and frequent than is acceptable to the it is today about 30%. Some ten, fifteen years ago this
users. The main means to attain dependability are number was about 25% for robots and neglectable for cars.
related to avoidance of faults: fault prevention, fault A second common characteristic is increasing
tolerance, fault removal and fault forecasting [1]. interoperability. While previously the embedded systems
Dependability is characterised by several attributes and were mainly used for controlling different processes today
according to [1], these are the following: Reliability, they are integrated with information systems of
availability, integrity, safety, confidentiality and infotainment technologies.
maintainability. All these attributes are run-time
properties except maintainability. These attributes are In this section we give a short overview of some typical
combination of several properties. For example embedded systems.
availability is dependent on real-time properties, but
also on reliability and even maintenance; safety is 3.1.1 Automotive Industry
strongly related to reliability, etc. Cars are typically manufactured in volumes in the order of
millions per year. To achieve these volumes, and still offer
- Resource consumption. Many embedded systems have
the customer a wide range of choices, the products are
strong requirements for low and controlled
built on platforms that contain common technology that
consumption of different resources. The reasons may
have the flexibility to adapt to different kinds of cars by
be the size of the systems and/or the demands on lower
adding different components or different variants of the
production costs. Examples of such restrictions and
components.
constraints are power and memory consumption,
execution (CPU) time, computation (CPU) power, etc. The components are to a large extent provided by external
suppliers, who work with many different car companies
- Life cycle properties. In general embedded systems are
(or OEMs, original equipment manufacturers). The role of
tightly coupled with their environment and the absence
the OEM is thus to provide specifications for the
of their services can have large consequences on the
suppliers, so that the component will fit a particular car,
environment. In many domains the embedded systems
and to integrate the components into a product.
have very long life time running round the clock year
Traditionally, suppliers have developed physical parts, but
after year. During the lifetime of a system several
in modern cars they also provide software.
generations of hardware and software technologies can
be used. The long life systems must be able to cope Within the automotive industry, the component-based
with these changes introduced either into the approach has a relatively long tradition, as these systems
surrounding environment or into the systems are typically built from system components that are either
themselves. developed in-house or provided by external suppliers.
Today, the entire control system of an advanced car
We can conclude that many of the most important
includes a number of Electronic Control Units (ECUs)
requirements of the embedded systems are related to extra-
equipped with software that implements vehicle functions.
functional properties. This has an implication that
ECUs are treated as system components that can be
development and maintenance of such systems are very
developed and build independently of each other and of
costly. In particular activities related to verification and
the entire system. A system control architecture is shown
guaranteed behavior (formal verification, modeling, tests,
in Figure 1. The ECUs are connected to the system (the
car) through sensors and actuators and between themselves and overview the entire process to be controlled, (v)
via one or several buses. Usually the buses are integrations Production or manufacturing management level that
points and their protocols specify the communications includes systems and applications for production planning.
between the ECUs.
Notice that, even if the higher levels are not embedded,
they are of uttermost importance as they need to be
interoperable with the lower level which greatly influences
gateway the possible choices of the component model and in fine
(CAN) BUS
the design choices. The integration requirements have in
ECU ECU ECU
many cases led to a decision to use component
technologies which are not appropriate for embedded
Sensor
Sensor Actuator Sensor Sensor
Sensor Actuator
systems but provide better integration possibilities.
Sensor Actuator
Depending on the level, the nature of the requirements and
the implementation will be quite different. In general, the
Vehicle mechanics lower the level, the stronger are the real-time requirements
Figure 1. Component-based architecture of vehicular (including timing predictability) and the resource
systems limitations. Also, the component based approach will
include different concepts at different levels. While at the
Modern vehicular systems contain several tens of computer lowest levels availability, timeliness, and reliability are the
nodes. As the number of ECUs increases, the entire system most important quality requirements, at higher levels it
becomes more complex. This requires sharing different will be performance, usability, and integrability.
types of resources (sensors, actuators, time,
communication, memory, and CPU consumption). With 3.1.3 Consumer Electronics
increasing complexity, system reliability and safety become
Consumer electronics products, such as TV, VCR, and
major problems. A satisfactory handling of safety-critical
DVD, are developed and delivered in form of product
functions, such as emerging brake and steer-by-wire
families which are characterized by many similarities and
systems, require the integration of methods for establishing
few differences and in form of product populations which
components and compositions of different aspects:
are sets of products with many similarities but also many
functional and temporal correctness, safety and reliability,
differences. Production is organized into product lines -
etc.
this allows many variations on a central product definition.
Today ECUs include proprietary software, mostly owned A product line is a top-down, planned, proactive approach
by subcontractors. This makes the entire system inflexible to achieve reuse of software within a family or population
and inefficient in utilizing resources, makes it difficult to of products. It is based on use of a common architecture
implement complex functions, and expensive to add new and core functions included into the product platform and
ECUs. The next major step in designing these systems is to basic components. The diversity of products is achieved
go from the current situation with one node one supplier to by inclusion of different components. Because of the
a situation with one node several suppliers, i.e. there will be requirements for low hardware and production costs,
several software components of different origins executing general-purpose component technologies have not been
on a typical node. Also to enable delivery of more complex used, but rather more dedicated and simpler propriety
applications, it should be possible to spread out software models have been developed. An example of such a
components through several nodes. component model is the Koala component model used at
Philips [13,14]. Koala is a component model and an
3.1.2 Industrial Automation architectural description language to build a large diversity
Typical application domains of industrial automation are in of products from a repository of components. Koala is
control of industrial processes, power supply, industrial designed to build consumer products such as televisions,
robots. Industrial automation domain comprises a large area video recorders, CD and DVD players and recorders, and
of control, monitoring and optimization systems. They combinations of them.
typically include large pieces of software that have been
developed over many years (often several decades). Most 3.1.4 Other domains
control systems are manufactured in rather large volumes, There are many domains in which embedded systems are
and must to a large extent be configurable to suit a variety used extensively. Some of them are: Telecommunication,
of customer contexts. They can be classified according to avionics and aerospace, transportation, computer games,
different levels of control [4]: (i) Process level (for home electronics, navigation systems, etc. While there is
example, a valve in a water pipeline, a boiler, etc.), (ii) many similarities between these domains there are also
Field level that concerns sensors, actuators, drivers, etc. (iii) very different requirements for their functional and extra-
Group control level that concerns controller devices and functional properties. The consequences are that the
applications which control a group of related process level requirements for component-based technologies are
devices in a closed-loop fashion, (iv) Process control level different, and consequently we cannot expect to have one
i.s. operator stations and processing systems with their component model. The expectations are that many
applications for plant-wide remote supervision and control component models will coexist, sharing to less or larger
extent some common characteristics, such as basic of system requirements and prediction of system
principles of component specifications through interfaces, properties from properties of components.
basic composition and run-time services, certain patterns,
In general-purpose component technologies, the interfaces
and similar.
are usually implemented as object interfaces supporting
polymorphism by late binding. While late binding allows
4 Basic concepts for Component-based connecting of components that are completely unaware of
Embedded Systems each other beside the connecting interface, this flexibility
In classic engineering disciplines a component is a self- comes with a performance penalty and increased risk for
contained part or subsystem that can be used as a building system failure. Therefore the dynamic component
block in the design of a larger system. In software deployment is not feasible for small embedded systems.
engineering, there are many different suggestions for Taking into account all the constraints for real-time and
precise definitions of components in component based embedded systems, we can conclude that there are several
software development. The best accepted understanding of reasons to perform component deployment and
component in the software industry world is based on composition at design time rather than run-time [4]: This
Szyperski’s definition [11]. From this definition it can be allows composition tools to generate a monolithic
assumed that a component is an executable unit, and that firmware for the device from the component-based design
deployment and composition can be performed at run-time. and by this achieve better performance and better
In the domains of embedded systems this definition is predictability of the system behavior. This also enables
largely followed, in particular the separation between global optimizations: e.g., in a static component
component implementation and component interface. composition known at design time, connections between
However the demands on the binary or executable from is components could be translated into direct function calls
not directly followed. A component can be delivered in a instead of using dynamic event notifications. Finally,
form of a source code written in a high-level language, and verification and prediction of system requirements can be
allows build-time (or design-time) composition. This more done statically from the given component properties.
liberal view is partly motivated by the embedded systems This implies that the component-based characteristic is
context, as will be discussed in below. mostly visible at design time. To achieve an efficient
Many important properties of components in embedded development process tools should exist which will provide
systems, such as timing and performance, depend on support for component composition, component
characteristics of the underlying hardware platform. Kopetz adaptation and static verification and prediction of system
and Suri [3] propose to distinguish between software requirements and properties from the given component
components and system components. Extra-functional properties.
properties, such as performance, cannot be specified for a There may also be a need for a run-time environment,
software component in isolation. Such properties must which supports the component framework by a set of
either be specified with respect to a given hardware services. The framework enables component
platform, or be parameterized on (characteristics of) the intercommunication (those aspects which are not
underlying platform. A system component, on the other performed at design time), and (where relevant) control of
hand, is defined as a self-contained hardware and software the behavior of the components.
subsystem, and can satisfy both functional and extra-
functional properties. Figure 2 shows different environments in a component life
cycle. The figure is adopted from [4].
4.1 Component-based approach for small Component model Composition framework Execution framework
embedded systems Components