Developing Reusable Software Components for Embedded …ltahvild/courses/ECE750-11-S09/... ·...

29
Developing Reusable Software Components for Embedded Systems ECE750-T11 Component-Based Software Systems Spring 2009 Babak Omidi Tony Zhao Group 6 - Project Presentation 1 Date: July 13, 2009

Transcript of Developing Reusable Software Components for Embedded …ltahvild/courses/ECE750-11-S09/... ·...

Developing Reusable Software Components for Embedded Systems

ECE750-T11 Component-Based Software SystemsSpring 2009

Babak OmidiTony ZhaoGroup 6 - Project Presentation 1Date: July 13, 2009

Developing Reusable Software Components for Embedded Systems 2July 13, 2009

Agenda

DefinitionsBackgroundMotivationLiterature SurveyProblem FormulationPlatform Independent Abstraction Architectural Style

Developing Reusable Software Components for Embedded Systems 3July 13, 2009

Definitions – Embedded System

A computer system that is part of a larger system and performs some of the requirements of that system; for example, a computer system used in an aircraft or rapid transit system (IEEE,1992) [1].98% of all computers systems are embedded systems [1].

Developing Reusable Software Components for Embedded Systems 4July 13, 2009

Definitions – Architecture and Architectural Style

Architectural styles are recurringorganizational patterns and idioms [2].An architecture is a conceptual model of how a system’s components are defined and developed, and how they interoperate [3].An infrastructure is the implementation of the conceptual model [3].

Developing Reusable Software Components for Embedded Systems 5July 13, 2009

Definitions – Software Component

Software Component as defined by Szyperski:

A software component is a unit of compositionwith contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties [4].

Developing Reusable Software Components for Embedded Systems 6July 13, 2009

Background – Software Component Elements

To be able to describe a component completely and to ensure its correct integration and updating, the component should consist of the following elements [5]:

A set of interfaces provided to, or required from, the environment. These interfaces are particularly for interaction with other components.An executable code, which can be coupled to the code of other components via interfaces.

Developing Reusable Software Components for Embedded Systems 7July 13, 2009

Background – Liberal View of Software Component Elements

Some researchers believe that the strict view of Software Component Elements does not work well with the special requirements of embedded systems (e.g. reliability, safety and timing) [1].Liberal View: To be able to describe a component completely and to ensure its correct integration and updating, the component should consist of the following elements [1]:

A set of interfaces provided to, or required from, the environment. These interfaces are particularly for interaction with other components.A source code, which can be coupled to the code of other components via interfaces.

Developing Reusable Software Components for Embedded Systems 8July 13, 2009

Background – Liberal View of Software Component Elements

Source code does not necessarily need to be modified to adapt the component.However, source code is needed to be compiled on the target platform.Some have chosen to keep a repository of component variants which are optimized on multiple target platforms [6].

Developing Reusable Software Components for Embedded Systems 9July 13, 2009

Motivation

Software reuse is goodRecent analysis of more than 13 000 problem reports collected by the mobile phone company Ericsson in Grimstad, Norway, has shown that software reuse does result in significantly fewer problems and better stability [7].reused components have significantly lower defect-densitythan non-reused ones [7].

Component Based Software Engineering (CBSE) enables software reuse [1,8,9]

Developing Reusable Software Components for Embedded Systems 10July 13, 2009

Motivation Cont’d

The growing complexity of embedded systems requires methods that improve reusability [10].Software for embedded systems is typically monolithic and strongly platform-dependent [11].

Developing Reusable Software Components for Embedded Systems 11July 13, 2009

Motivation Cont’d

Other advantages of using CBSE for embedded systems [11] are:

Shorter development timeBetter maintainability

Developing Reusable Software Components for Embedded Systems 12July 13, 2009

Motivation Cont’d

Most existing and well known component architectures are not suitable for embedded systems in their current form [12] (e.g. Pipe and Filters, N-Tiered, Layered, Blackboard and MVC).Component models such as .Net, J2EE and CORBA Component Model (CCM) cannot be used for embedded systems [12].

Developing Reusable Software Components for Embedded Systems 13July 13, 2009

Literature Survey

[6] proposes a repository of components that contains variants and versions of the software optimized for each target platform.

Waste of storage spaceThe component developer needs to predict all future uses of the component. This is not feasible.

Developing Reusable Software Components for Embedded Systems 14July 13, 2009

Literature Survey

“Open Implementation” defines principles for system decomposition and interface design [13].

Requires the programmer to tune the underlying implementation at composition time. Forces the programmer to learn the specifics of the component.The component cannot be treated as a blackbox

Developing Reusable Software Components for Embedded Systems 15July 13, 2009

Literature Survey

Component models developed are often targeted to specific application domains[12]:

PECOS [11]Koala [15]

They do not address the issue of platform specific code.

Developing Reusable Software Components for Embedded Systems 16July 13, 2009

Literature SurveyFIRSL (Flight Instruments Reuse & Standardization Library) provides a modified system architecture for Flight Software (FSW) [14]

FIRSL publishes standardized API’s for reusable device functions Components are open source code unitsA step in the right direction which needs to be formalized and generalized!

Developing Reusable Software Components for Embedded Systems 17July 13, 2009

Problem Formulation

Need to separate hardware independent functionality from hardware specific functionality

This needs to be done at the highest level of abstractionA new Architectural Style needs to be developed.

Developing Reusable Software Components for Embedded Systems 18July 13, 2009

Problem Formulation Cont’d

*From class notes

Developing Reusable Software Components for Embedded Systems 19July 13, 2009

Proposed Architectural Style – Platform Independent Abstraction

...

...

...

... Hardware/Simulation Layer

Operating System Layer

Interface Mapping Layer

Hardware Independent Layer

Developing Reusable Software Components for Embedded Systems 20July 13, 2009

Platform Independent Abstraction - Example

...

...

...

... Hardware/Simulation Layer

Operating System Layer

Interface Mapping Layer

Hardware Independent LayerPlay MP3 Play Video

Audio Control Mapper

Hardware Specific Audio Control

Physical Audio Control

Send Fax Make Call

Dialing Interface Mapper

Hardware Dialing Control

Physical Dialing Control

Developing Reusable Software Components for Embedded Systems 21July 13, 2009

Platform Independent Abstraction –Example Cont’d

Detailed architectural model to be provided in the next presentation.

Essentially a layered architectureEach layer communicates only with the layer below it.Layers below have no knowledge of the layers above.Increasing abstraction towards the top layerMaintainability, Reuse, Portability (replacing layers to work within a different context)Difference is that each layer exports multiple interfaces

Developing Reusable Software Components for Embedded Systems 22July 13, 2009

Platform Independent Abstraction –Example Cont’d

Disadvantages of Layered Architecture are not applicableUniversally applicable – components by definition cannot spread around different layersPerformance is not affected since the levels of indirection get resolved at compile timeDetermining the correct abstraction level is achieved by definitionLayer bridging is not allowed

Developing Reusable Software Components for Embedded Systems 23July 13, 2009

Proposed Architectural Style - DetailsHardware Independent Layer

Contains all components not dependent on the underlying hardware.All hardware specific details are abstracted away.Components could be composite components.

Interface Mapping LayerThese are simple components.Translate hardware functionality into hardware independent calls.

Operating System LayerPipes calls to the Hardware/Simulation Layer.

Hardware/Simulation LayerPerforms/simulates operations requested.

Developing Reusable Software Components for Embedded Systems 24July 13, 2009

Advantages of Platform Independent Abstraction

The majority of the software belongs to the Hardware IndependentLayer. This includes the logical flow control which is most susceptible to errors.Development of the system is done on a desktop computer and the Hardware Independent and Interface Mapping Layer components are then transferred to the hardware platform. This approach hastwo advantages:

Since desktop computers are much faster than embedded systems, development and testing times are reduced significantly; ultimately improving time-to-market.Development of such a system can be done by software engineers that are not necessarily familiar with the target hardware. This enables the utilization of stronger software developers as supposed to hardware engineers who might not be as proficient in developing software applications.

Developing Reusable Software Components for Embedded Systems 25July 13, 2009

Proof of ConceptIn order to demonstrate the effectiveness of the “Platform Independent Abstraction” architectural style, we will be implementing a simple application that will be run on 2 embedded systems in addition to the hardware simulator. In order to do this, we will:

Develop and test the Hardware Independent and Interface Mapping components on a windows machine with the help of a hardware simulator.Transfer the components to the target platforms without any modifications and demonstrate 100% component reuseThe two targeted platforms will be an ARM4I and an x86 processor.

Developing Reusable Software Components for Embedded Systems 26July 13, 2009

References[1] I. Crnkovic. “Component-based approach for embedded systems.”Ninth International Workshop on Component-Oriented Programming, Oslo, 2000. [2] David Garlan and Mary Shaw. An Introduction to SofwareArchitecture: Advances in Sofware Engineering and Knowledge Engineering, volume 1. World Scientific Publishing, 1993. [3] Israel Ben-Shaul, James W. Gish, and William Robinson. "An Integrated Netwrok Component Architecture", IEEE Software, Volume 15, Issue 5, pp. 79-87, September 1998.[4] C. Szyperski. Component Software: Beyond Object-Oriented Programming. ACM, Press and Addison-Wesley, New York, N.Y., 1998.[5] He Jifeng, Liu Zhiming and Li Xiaoshan. Component Calculus. The United Nations University, International Institute for Software Technology, Report No. 285, 2003.

Developing Reusable Software Components for Embedded Systems 27July 13, 2009

References Cont’d[6] Mikael Åkerholm, Joakim Fröberg, Kristian Sandström, IvicaCrnkovic. "A Model for Reuse and Optimization of Embedded Software Components", 29th International Conference on Information Technology Interfaces, 2007, pp. 567-572.[7] P. Mohagheghi, R. Conradi, O.M. Killi, H. Schwarz. “An Empirical Study of Software Reuse vs. Defect-Density and Stability.” 26th International Conference on Software Engineering (ICSE’04), 2004, Edinburgh, Scotland, pp. 282-292.[8] Patrick Tessier, Sébastien Gérard, Chokri Mraidha and Jean-Marc Geib. “A Component-Based Methodology for Embedded System Prototyping”, Proceedings of the 14th IEEE International Workshop on Rapid System Prototyping (RSP'03), 2003, p.9. [9] I. Crnkovic and M. Larsson. Building Reliable Component-Based Software Systems. Artech House publisher, 2002.

Developing Reusable Software Components for Embedded Systems 28July 13, 2009

References Cont’d[10] Severine Sentilles, Anders Pettersson, Dag Nystrom, Thomas Nolte, Paul Pettersson and Ivica Crnkovic. “Save-IDE - A tool for design, analysis and implementation of component-based embedded systems”, 31st International Conference on Software Engineering, 2009.[11] Michael Winter, Christian Zeidler and Christian Stich. "The PECOS Software Process", Workshop on Components-based Software Development Processes, ICSR 7, 2002.[12] Ihor Kuz, Yan Liu, Ian Gorton and Gernot Heiser. “CAmkES: A component model for secure microkernel-based embedded systems”Journal of Systems and Software, volume 80, issue 5, May 2007, p.687-699.[13] G. Kiczales. “Beyond the Black Box: Open Implementation”. IEEE Software, Volume 13, Issue 1, January 1996, pp. 8, 10-11.

Developing Reusable Software Components for Embedded Systems 29July 13, 2009

References Cont’d[14] D. Mathur, B.W. Edwards, J. Goldstein, H. Nguyen, J. Pine, B.A. Plante, J.C. ThackerAn Approach for Designing Reusable, Embedded Software Components for Spacecraft Flight Instruments, 11th IEEEReal Time on Embedded Technology and Applications Symposium, Pages: 106 – 115, 2005.[15] Rob van Ommering , Frank van der Linden , Jeff Kramer , Jeff Magee, The Koala Component Model for Consumer Electronics Software, Computer, v.33 n.3, p.78-85, March 2000.