20.11.2014 Views

Component-based approach for embedded systems - Artes

Component-based approach for embedded systems - Artes

Component-based approach for embedded systems - Artes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1<br />

<strong>Component</strong>-<strong>based</strong> <strong>approach</strong><br />

<strong>for</strong> <strong>embedded</strong> <strong>systems</strong><br />

Ivica Crnkovic<br />

Mälardalen University<br />

Department of Computer Science and Engineering,<br />

Mälardalen Real-time Research Centre<br />

Sweden<br />

http://www.idt.mdh.se/~icc<br />

2004-11-25<br />

2<br />

<strong>Component</strong>-<strong>based</strong> <strong>approach</strong><br />

• Building <strong>systems</strong> from (existing) components<br />

– Providing support <strong>for</strong> the development of <strong>systems</strong> as<br />

assemblies of components<br />

– Supporting the development of components as<br />

reusable units<br />

– Facilitating the maintenance and evolution of <strong>systems</strong><br />

by customizing and replacing their components<br />

application<br />

<strong>Component</strong><br />

#2<br />

<strong>Component</strong><br />

#1<br />

<strong>Component</strong><br />

#1<br />

<strong>Component</strong><br />

#<br />

2<br />

<strong>Component</strong><br />

#3<br />

<strong>Component</strong><br />

#4<br />

<strong>Component</strong><br />

#3<br />

<strong>Component</strong><br />

#4<br />

2004-11-25


3<br />

Implications<br />

• <strong>Component</strong> development is separated from system<br />

development process<br />

– Less programming ef<strong>for</strong>ts to build <strong>systems</strong><br />

– System verification and validation more difficult and more<br />

important<br />

– Different requirements management<br />

Requirements<br />

Specification<br />

Application<br />

development<br />

Find & Select<br />

Design<br />

Test<br />

Implementation<br />

Adapt<br />

<strong>Component</strong><br />

development<br />

Deploy<br />

Test<br />

Operation &<br />

Maintenance<br />

2004-11-25<br />

4<br />

Describing a <strong>Component</strong><br />

• To be able to describe a component completely the component<br />

should consist of the following elements:<br />

– A set of interfaces provided to, or required from the environment.<br />

– An executable code, which can be coupled to the code of other<br />

components via interfaces.<br />

• How to specify a component?<br />

black box<br />

white box<br />

grey box<br />

glass box<br />

2004-11-25


CBSE process issues<br />

5<br />

• Different types of <strong>approach</strong>es<br />

– Using components as well defined design units<br />

– Product-line <strong>approach</strong><br />

• Building many variants and versions of a products <strong>based</strong> on<br />

the same architecture and varying components. <strong>Component</strong>s<br />

are developed in-house<br />

– COTS (Commercial off the shelf) components<br />

• Building <strong>systems</strong> from existing components<br />

2004-11-25<br />

Example: The architecture of a car control<br />

system<br />

Infotaiment<br />

6<br />

gateway<br />

(CAN) BUS<br />

ECU<br />

brake<br />

ECU<br />

injection<br />

ECU<br />

Sensor Actuator<br />

Sensor<br />

Sensor Actuator<br />

Sensor<br />

Sensor Actuator<br />

Sensor<br />

Vehicle mechanics<br />

ECU – Electronic Control Unit<br />

2004-11-25


7<br />

Challenge – open and dependable plat<strong>for</strong>m<br />

Collision detection<br />

Vehicle stability<br />

Cruise control<br />

Antispin<br />

Global<br />

(complex)<br />

functions<br />

Engine Control Local brake Control Transmission ………<br />

local<br />

sensors<br />

Vehicle<br />

actuators<br />

Applications<br />

Middleware<br />

Input/output drivers<br />

Hardware<br />

ECU ECU ECU<br />

SOFTWARE COMPONENTS<br />

2004-11-25<br />

8<br />

How much is CBSE attractive <strong>for</strong> different domains?<br />

• Advantages from a business point of view:<br />

– Shorter time-to-market, lower development and maintenance costs<br />

• Advantages from technical and engineering point of view<br />

– Increased understability of (complex) <strong>systems</strong><br />

– Increased the usability, interoperability, flexibility, adaptability,<br />

dependability…<br />

• Advantages from strategic point of view of a society<br />

– Increasing software market, generation of new companies<br />

• CB-<strong>approach</strong> has been successful in many application domains:<br />

– Web- and internet-<strong>based</strong> applications<br />

– Desktop and office applications, Graphical tools, GUI-<strong>based</strong><br />

applications<br />

– In certain segments of telecommunication, consumer electronics…<br />

2004-11-25


9<br />

Do existing component technologies meet the<br />

requirements of <strong>embedded</strong> <strong>systems</strong>?<br />

• Widely-used component models (Microsoft COM/DCOM and .NET,<br />

Sun EJB,J2SEE, OMG Corba CM,…)<br />

– Focus on functionality, flexibility, run-time adaptability, simpler<br />

development and maintenance<br />

– Do not consider non-functional requirements<br />

• Timing properties (per<strong>for</strong>mance), resource consumptions<br />

• Reliability, availability, quality of services…<br />

Important questions <strong>for</strong> component-<strong>based</strong> development feasibility:<br />

• Which are the primary requirements in different domains?<br />

• Can component-<strong>based</strong> development provide solutions that meet these<br />

requirements?<br />

2004-11-25<br />

10<br />

Specific requirements of <strong>embedded</strong> <strong>systems</strong><br />

• Real-time requirements<br />

• Resource consumption<br />

– CPU, Memory, Power, Physical space<br />

• Dependability<br />

– Safety, reliability, availability<br />

• Life-cycle properties (long life <strong>systems</strong>)<br />

– Maintainability, expandability<br />

– Portability<br />

• Increasing interoperability<br />

2004-11-25


Basic concepts <strong>for</strong> <strong>Component</strong>-<strong>based</strong><br />

Embedded Systems<br />

11<br />

• Main concern<br />

– Predictability of different properties (on<br />

account of flexibility)<br />

• Difference between small and large<br />

<strong>embedded</strong> <strong>systems</strong><br />

2004-11-25<br />

<strong>Component</strong> models <strong>for</strong> small <strong>embedded</strong> <strong>systems</strong> vs.<br />

General-purpose component models<br />

12<br />

General-purpose components<br />

• Run-time composition (late<br />

binding)<br />

• Set of interfaces, “bugs” of<br />

services<br />

• Contractual-<strong>based</strong> interfaces<br />

• Not resource-usage aware<br />

• Coarse-grained<br />

• Portability - Binary independence<br />

(Black-box reuse)<br />

Small Embedded Systems<br />

• Composition time separated <strong>for</strong>m<br />

run-time<br />

• Optimization at configuration time<br />

(direct references, unneeded<br />

functionality removed)<br />

• Explicit context dependencies<br />

• Run-time environment (CPU,<br />

RTOS, resource constraints)<br />

• Fine-grained<br />

• Reuse & portability<br />

• white, glass, or grey box<br />

components<br />

• source code portability<br />

There is a need <strong>for</strong> component models dedicated to<br />

(small) <strong>embedded</strong> <strong>systems</strong><br />

2004-11-25


Examples of component models <strong>for</strong><br />

<strong>embedded</strong> <strong>systems</strong><br />

13<br />

• SaveCCM<br />

– Experimental (research) component model<br />

– Simple enough to be analyzable and predictable<br />

• Koala – Philips<br />

– Consumer electronics<br />

– Treats software components as hardware<br />

components<br />

• PECOS – ABB<br />

– Small fieldbus devices<br />

• Managing power consumption and real-time properties<br />

2004-11-25<br />

<strong>Component</strong>-<strong>based</strong> <strong>approach</strong> <strong>for</strong> LARGE<br />

<strong>embedded</strong> <strong>systems</strong><br />

14<br />

• the resource constraints are not the primary<br />

concerns.<br />

• The complexity and interoperability important<br />

• Minimizing the development costs<br />

• For this reason general-purpose component<br />

technologies are of more interest than in a case<br />

<strong>for</strong> small <strong>systems</strong>.<br />

2004-11-25


Widely-used component models and<br />

<strong>embedded</strong> <strong>systems</strong><br />

15<br />

• Direct use of component models<br />

– CORBA (telecommunication)<br />

– COM/DCOM, .NET – process industry<br />

• Improved component-models (with added functionalities)<br />

– OPC (OLE process control Foundation)<br />

• Restricted (use of) component-models to achieve<br />

predictability<br />

– Using only specification (IDL) , no multiple interface, etc.<br />

2004-11-25<br />

16<br />

OPC (OLE <strong>for</strong> Process Control)<br />

• industry standard <strong>for</strong> communication between<br />

components in field devices, automation equipment and<br />

business applications (generic driver)<br />

• data model<br />

• set of interfaces <strong>for</strong> COM<br />

– server interfaces<br />

– callback interfaces<br />

• managed by OPC Foundation (www.opcfoundation.org)<br />

2004-11-25


OPC: How does OPC Solve the Problem?<br />

Display<br />

Application<br />

Trend<br />

Application<br />

Report<br />

Application<br />

OPC OPC OPC<br />

17<br />

OPC OPC OPC OPC<br />

Software Software<br />

Driver Driver<br />

Software<br />

Driver<br />

Software<br />

Driver<br />

2004-11-25<br />

Example - Adoption of a general-purpose<br />

component model<br />

18<br />

ABB Controller - <strong>Component</strong>ization of a system<br />

• Requirements<br />

– Improve the development process<br />

• Distributed development<br />

• Shorter time-to-market Redefined architecture<br />

• Conditions:<br />

– Keep the main requirements (real-time) unchanged<br />

• Solution<br />

– <strong>Component</strong>ize the software architecture<br />

– Use of a subset of a component model (COM)<br />

2004-11-25


19<br />

Use of the <strong>Component</strong> Object Model (COM)<br />

• COM is a public specification (by Microsoft) which emphasizes<br />

separation of interfaces and implementation<br />

• A well-defined subset of the COM specification has been adopted<br />

• COM compliant interfaces can be used on plat<strong>for</strong>ms without COM<br />

run-time support<br />

• On plat<strong>for</strong>ms with COM run-time support:<br />

– Protocol handlers implemented as COM classes<br />

• On plat<strong>for</strong>ms without COM run-time support:<br />

– Protocol handlers implemented as C++ classes, which are statically<br />

linked with the framework<br />

2004-11-25<br />

Conclusion: What are the needs within Embedded<br />

Systems?<br />

• Need <strong>for</strong> component models and frameworks <strong>for</strong> <strong>embedded</strong><br />

<strong>systems</strong>.<br />

– the run-time plat<strong>for</strong>m must provide certain services, which however<br />

must use only limited resources.<br />

• Obtaining extra-functional properties of components in<br />

particular timing and per<strong>for</strong>mance properties.<br />

• <strong>Component</strong> certification<br />

• Plat<strong>for</strong>m and vendor independence<br />

• <strong>Component</strong> noninterference applications, (in terms of<br />

memory protection, resource usage, etc).<br />

• Tool support: The adoption of component technology<br />

depends on the development of tool support.<br />

20<br />

2004-11-25


21<br />

References<br />

SAVE “book”<br />

<strong>Component</strong>-Based Development of Safety-Critical Vehicular Systems<br />

1. Problem definition and scope<br />

2. Vehicular Embedded control <strong>systems</strong><br />

3. (Modeling of vehicular <strong>embedded</strong> control <strong>systems</strong>)<br />

4. System and software life-cycle processes<br />

5. <strong>Component</strong>-<strong>based</strong> software development<br />

6. Safety-critical and dependability aspects<br />

7. Real-time <strong>systems</strong><br />

8. Verification and testing methods<br />

9. (Case studies)<br />

ARTIST book – Roadmap and research <strong>for</strong> design of <strong>embedded</strong> <strong>systems</strong><br />

Advanced real-time<br />

<strong>Component</strong>-<strong>based</strong> <strong>approach</strong><br />

Flexible real-time<br />

2004-11-25<br />

22<br />

References<br />

• Conferences and Workshops<br />

– <strong>Component</strong>-<strong>based</strong> Software engineering Symposium:<br />

• http://www.sei.cmu.edu/pacc/CBSE7/<br />

• http://www.sei.cmu.edu/pacc/CBSE8/<br />

– Euromicro conference, CBSE track<br />

• http://www.idt.mdh.se/ecbse/2004/<br />

• http://www.idt.mdh.se/ecbse/2005/<br />

– WCOP International Workshop on <strong>Component</strong>-Oriented Programming<br />

• http://research.microsoft.com/~cszypers/events/wcop2004<br />

– International Working Conference on <strong>Component</strong> Deployment<br />

• http://cd04.cs.ucl.ac.uk/<br />

– Workshop on <strong>Component</strong> Composition<br />

2004-11-25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!