A Comparative Study of Software Component Models for

advertisement
A Comparative Study of Software Component Models for
Embedded Real Time Systems
Student:
Imran Afzal
MSc Computer Science with Software Engineering Profile
Department of Computer Science and Electronics (IDE)
Mälardalen University, Sweden
ain05001@student.mdh.se
Supervisor:
Frank Lüders
Department of Computer Science and Electronics (IDE)
Mälardalen University, Sweden
frank.luders@mdh.se
Examiner:
Ivica Crnkovic
Department of Computer Science and Electronics (IDE)
Mälardalen University, Sweden
ivica.crnkovic@mdh.se
Master Thesis (D Level)
Abstract
It is no doubt that at the moment time is so important for every one in every kind
of field. So it is the requirement of time to produce suck kind of products which consumes les
time. But now it is right to say that there are such products available in market which really
changes our lives. At the moment every manufacturing company trying to use such kind of
CPUs that really helps to develop the embedded systems. Even if we observe our daily life we
find such kind of thing s which we really ignored uses embedded systems. At the moment
there are different components are used to develop the embedded systems. The most
important component at the moment is Koala component which is developed by the Philips.
Philips used Koala in developing the consumer electronic products. Koala has its own
characteristics due to which Philips used it. There are also real time embedded systems which
use such kind of components. There are different kinds of real time systems. There is a main
idea behind real time system that they have to reply in a specific time to a specific task. There
is a complete a life cycle of the real time systems. There are also different areas in which
embedded systems are used at the moment. There is main advantage of Koala components
that there are different graphical functions for different files even up to 100Mbps.
Acknowledgements
With the name of Allah Almighty who is most beneficent and merciful. First I
would like to thank my supervisor Frank Luder due to his kindness and help which really
courage me to complete my thesis within the time. I am also thankful to Christen Sandberg
who really helps me in finding the room because such kind of work really needs your full
attention. I specially thanks to my Pakistani Friends who really help me during my whole
effort. A very special thanks to my whole family because they really courage me to do some
thing. The most important person in my family is my uncle Muhammad Afzal who really
courage me and put his all efforts to me. I am proud of being his Son because I think that if I
am at this stage due his efforts. He has a great dream to see me successful in my life. I hope
that I will fulfill my uncle’s Dream.
1 Introduction ............................................................................................................................. 4
2 Embedded Real Time Systems ................................................................................................ 5
2.1 History of Embedded Systems ......................................................................................... 5
2.2 What is Embedded System? ............................................................................................. 5
2.3 What is Real Time System? ............................................................................................. 6
2.4 Areas of Use ..................................................................................................................... 6
3 The koala Component Model .................................................................................................. 7
3.1 What is Koala? ................................................................................................................. 7
3.2 Koala Language................................................................................................................ 7
3.2.1 Requirements ............................................................................................................. 7
3.2.2 General Concepts ...................................................................................................... 8
3.2.3 Binding and Bind Time ............................................................................................. 8
3.2.4 Koala Components .................................................................................................... 8
3.2.5 Diversity interfaces ................................................................................................... 8
3.2.6 Product-Line Architecture ......................................................................................... 9
3.2.7 Creating Products .................................................................................................... 10
3.2.8 Handling Versions and Variants ............................................................................. 10
3.3 Koala Component Model for Consumer Electronics Software .......................................... 11
3.3 Koala Model ................................................................................................................... 11
3.3.1 Component .............................................................................................................. 11
3.3.2 Implementation........................................................................................................ 11
3.4 Koala Features ................................................................................................................ 12
4 From objected-oriented Programming to COM .................................................................... 13
4.1 Object Oriented Programming ....................................................................................... 13
4.2 What is a Component? ................................................................................................... 14
4.3 Component Object Model (COM) ................................................................................. 14
4.4 Comparing OOP and COM ............................................................................................ 15
5 Component Based Embedded Systems ................................................................................. 16
5.1 Framework for Component-Based Embedded Systems................................................. 17
6 Component-Based Software Engineering ............................................................................. 17
6.1 Component Requirement Analysis ................................................................................. 17
6.2 Component Development ............................................................................................... 18
6.3 Certification of Component ............................................................................................ 18
6.4 Customization of Components ....................................................................................... 19
6.5 Designing System Architecture ...................................................................................... 20
6.6 Integration of the System ............................................................................................... 20
6.7 Testing of System ........................................................................................................... 21
6.8 Maintenance of System .................................................................................................. 22
6.9 Quality Assurance for Component-Based Embedded Systems ..................................... 22
6.9.1 Life Cycle ................................................................................................................ 22
6.9.2 Quality Characteristics of Components ................................................................... 23
7 Conclusion ............................................................................................................................. 23
8 References ............................................................................................................................. 25
1 Introduction
A large area of computer systems is occupied by different types of embedded
systems. Now we can say that above 90% of the CPU’s are used in the development of
embedded systems. In the whole part of these embedded systems there are different categories
including very small and large systems as well. We all know that now there are a lot of
embedded systems involved in every kind of business. Even if we consider our daily life there
are a lot of embedded systems involved like Alarm Clock, Break Fast Machine, Home Safety
System, Traffic System, Automatic Doors, Telephone, Television, Mp3 Players, Camera,
PDA, Printer, Scanner and Mobile etc… As we all know that the Automobile industry in the
world is increasing day by day. If we consider an example of a Car, we will be surprised to
know that there are such a huge number of embedded systems involved in a car. A latest
model of can have round about 70 processors for different purposes like Engine Control,
Audio, A/C control, etc… Embedded Systems are mostly Processor based like General
Processors, Micro Processors and DSP. Real Time systems are mostly responsible to deliver
the correct results and also the time to deliver these results as well. We can consider a result
as wrong result if it does not meet the time line of the result i.e. Late result = Wrong result.
According to IEEE the definition of Embedded systems look like “An Embedded Computer
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).[5] Now according to IEEE definition it could be considered that
such kind of embedded systems are just like real time systems. The reason behind such kind
of real time systems is that the result of system, because here we also consider the time factors
to achieve the result except that we consider the logical factors. Now we can define
Embedded real time systems that “A system in which computer performs as a part of a large
system and interact with external devices directly.” In general it is better to say that the use of
component based technologies is better in development of embedded systems. There are also
different design requirements for general purpose and embedded systems. Like for general
purpose systems we have to consider the performance only. But for Embedded system we
have to consider a lot of things like Timing, Cost sensitivity, Power consumption, Size and
Weight, Safety and Reliability and Time to market. We also have to consider component
acquisition, compatibilities, upgrades etc… COM and Koala are two different component
models used for different purposes. COM is mostly used for general purpose model. Mostly
we use COM in desktop and IS domains. But on the other hand Koala is mostly used for the
development of embedded systems now a day. Koala Component technology is basically
introduced and used by Philips. Philips used Koala components in the development of
software in consumer electronics. There is model through which most Koala components
interact is called pipes-and-filters. Then the result of this model is used by different threads.
There is another component technology which is alternate to the koala component technology
called Robocop component technology. The main purpose of this technology is just to cover
the different aspects of embedded system’s development. There is also a technology for the
development of small embedded systems, developed by Arcticus systems is Robus
Component Model. At the moment this technology is used by Volvo Construction Equipment.
Now we can say that there are different Component Models used for the development of
embedded systems. Every one tries to develop such an efficient system which consumes less
time. Some one can ask that why we do not use one component for embedded systems. But
experiences have shown that different component have different characteristics. As we know
that different platforms require different requirements at different levels so we try to use such
a system which cover more of the requirements. Now just because of such reasons we use
different components for the development of embedded systems but the basic principle behind
the development never changes.
2 Embedded Real Time Systems
Generally speaking embedded systems represent some general functionality.
Now the reason behind the using of CPUs is basically due to complex functionalities of
embedded systems. Now there are embedded systems both for ultra small systems and for
huge systems as well. It is also a true factor that there are different requirements for both the
systems. Due to this reason different characteristics of embedded systems refer to its
requirements. In the mean time there are also some non-functional characteristics due to
which design of an embedded system becomes challenge e.g.
A system fails if it does not meet the real time dead line. In real time properties there are also
response time, time to execute in worst case, general execution time, deadline etc…
We mentioned that there different requirements for small and large systems, so it concerns
with the resource consumption. Now the main issue behind this requirement is the size of the
system.
There is another requirement of the embedded system is considered with its time period i.e.
Life Cycle. We know that embedded system is a part of a computer system so normally an
embedded system has a very strong connection with its environment. There are such
embedded systems available in the market having long life in different fields. The main
advantage of long life is to reuse the software and hardware technologies. It is necessary for a
long life system to accept these challenges.
Some time we have to concern with low power consumption. To reduce the size of code we
have to concern with low manufacturing cost.
Mostly there are limited resources in embedded devices. In such kind of limitations there are
certain important things like memory, power of processing and also the power related to
battery. If we compare with other domains then it is difficult to increase the resources from
different aspects like technically and economically. [6]
There are such embedded systems available now in which the interaction with hardware
devices is very obvious. [6]
2.1 History of Embedded Systems
There were some embedded systems in the beginning of 60’s but Apollo
Guidance was the first modern embedded system. It was such an important embedded system
that every flight towards moon needs two such kind of embedded systems. When Apollo
Project was under development Apollo Guidance Computer performs a very big role and also
it was considered as a huge risk to use it. But then they also need to reduce the size and
weight as well. Now due to this reason the risk increased very much. Then the first massproduced embedded system released in 1961 known as D-17. Actually it was a guidance
computer used for the Minuteman missile. [3]
2.2 What is Embedded System?
We can define an embedded system as a computing device without any
controlling device like key board, mouse etc… It is not the responsibility of Embedded
Systems to provide the standard computing devices. In general we can define an embedded
system as a computing system carrying strong hardware and software integration which we
use to perform a devoted function. But it is subjective definition of embedded systems. It is
just because of such systems which are integral part of another system i.e. system within a
system. Such kind of embedded systems can find normally in daily entertainment devices like
digital set-top box (DST). A/V decoder is an example of such kind of embedded systems
because it is an integral part of the DST. As we know the working of A/V decoder that it takes
single multimedia stream as input and it generates audio and video frames as output. But
some time embedded systems work as a stand alone system like router.
Some important examples of embedded systems are Personal Computers, ATMs,
Environmental Monitoring Equipment, Heating System, Cooling System, Ventilating System,
Security System, Elevators, Robotics, Global Positioning System (GPSs), Real Time Control
Systems Supervisory and Data Acquisition.[2]
2.3 What is Real Time System?
There is an important aspect of every Real Time System (RTS) is to meet the
time line. Every RTS has to respond a certain set of external inputs. Then RTS has to process
these inputs and finally responds to control different peripherals connected with system after
taking the appropriate decisions. There is also a definition of RTS by Donald Gilles that “A
real-time system is one in which the correctness of the computations not only depends upon
the logical correctness of the computation but also upon the time in which the result is
produced. If the timing constraints are not met, system failure is said to have occurred.” [4] It
is necessary that the design of RTS specifies the timing requirement. RTS also have to ensure
that its performance will be correct and according to time. If we consider the time constraints
there are three types of time constraints.
Hard: if the system replies late and also incorrect then it shows that the system is failed. The
example is medical equipment used for the monitoring of human body.
Soft: if the RTS response within an average time as defined by the requirements. The example
of such RTS is airline reservation system.
Firm: if RTS has both the properties of Hard and Soft. The example of such a RTS is patient
ventilator.
2.4 Areas of Use
In the era of Component development the use of embedded systems is very
common in almost every field of life. Every manufacturing company is trying to use the
component technologies to develop different kind of embedded systems. Figure 2.0 illustrates
the use of embedded systems in different aspects of life. From figure it clear that mostly we
use embedded systems in Communication/Telecommunication/ Networking fields. Also there
are 10% embedded systems are used in other different domains like in our daily life.
Figure 2.0 Overview of Using Embedded System in Different Areas [1]
3 The koala Component Model
3.1 What is Koala?
Actually Koala is a small animal who likes to climb. But I have no concern with
that animal because I have to work on Koala Component technology which is developed and
used by Philips. There are some main aspects related to Koala Language. Koala is basically a
component model and a language which describes the architecture and it is used to develop a
lot of products by using different kinds of component.
3.2 Koala Language
There are certain important aspects in Koala language. [13]
3.2.1 Requirements
When Koala was designed there were three main requirements found in 1996.
As Koala used to develop different products so they develop a technique through which
different components could be easily composed into different products. This technique is used
as the main approach in developing different products.
The following technique should be able to work in an environment like resource-constrained
e.g. television and video recorders etc.
In order to control the complexity of products the architecture should be precise as much as
possible.
3.2.2 General Concepts
There is a small set which is known as inter face and consist of small set of
elements related semantically. Type interface describes the syntax and semantic of related
elements. There is an interface instance which is used to implement an interface within a
component. The component is used as a unit for reusing. There is a unit of code known as
module. But it is always a part of component. To connect an interface to another interface we
need a cable or interface binding. It is also used to connect an interface to module or module
to an interface. There could be a situation that we have to connect a list of interfaces to
another special list of interfaces then we need a switch. Finally we also need a place to store
all components, interfaces and data type definitions known as repository.
3.2.3 Binding and Bind Time
The concept of binding and bind time could be easily understood by an example
described. We consider a product P having two different components A and B and also
consider that A uses B. Now if A uses B then its mean that A has the right to call a function of
B. It is also clear that both the components are compiled separately. But the call of A is bound
by a linker to use the functions in B. There are two possibilities of occurring binding like Link
Time and some time Run Time as well. As there are different component technologies which
usually arrange runtime binding to accomplish the product binding. In such kind of situations
component A use a pointer to a function. Mostly Koala is used in such a resource-constrained
environment. In such kind of environment mostly binding is known and fixed at product time
above 90% but such kind of binding varies from product to product.
3.2.4 Koala Components
A component of Koala contains a code and interacts with its environment but
only in one way which is identified as Explicit. There are different Koala components but
they have no connection with each other i.e. they are independent. The configuration of Koala
consists of components list and also a list of connections between different components.
There is also a third party involved in the working of component A and B to work together.
The result of A and B points to configuration C known as third party binding. Configuration
has no interfaces around border and it is just a top level component. There are different
products which have different kinds of component. There is also possibility of using different
instances of a specific component type. Such concept is known as multiple instantiation. To
describe the connections between components interfaces are used. Similar to COM and Java,
there are different related functions contained in an interface. Definition of interface is used to
describe the prototype and semantic of functions. On the other hand components need the
instances of interfaces. Interfaces provided by Koala are similar as provided by COM and
Java. A single component of Koala can provide a lot of interfaces. There is also some Koala
components which contain require interfaces, such kind of interfaces used to communicate
with its component’s environment by using explicit connection points. These kinds of
components are controlled by a third party. This concept is present in COM but its optional to
use.
3.2.5 Diversity interfaces
To parameterized different components of Koala there are diversity interfaces.
But there is no such a specific method for this purpose in Koala. It can be performed by using
any technique of binding in Koala by bounding requires interfaces. There are also some
expressions in Koala which are used for optimization reasons. By using such kind method it
could be possible to introduce a component specific set of parameters. It is very important to
know that there are such kinds of software available in the market now in which diversity
products are known by the components at low-level.
3.2.6 Product-Line Architecture
To gather different kinds of components by using the provided services to match
required services, Koala has such facilities to perform such kind of operations. But there is an
important condition to perform such kind of operation that all the components follow the
Koala model. There are also possibilities in Koala that architectural components do not match
each other. To avoid such kind of mismatches it is necessary to define a set of simple
architectural rules. There should be an initialization interface provided by all kinds of
components. There are different components in Koala model so every component has its own
interface. The component that can not control the hardware specifies a very simple interface
like IInit that has only a single function init. Such kind of components also provides some
complicated functions as well like IPower. Sometimes there are such situations that a majority
of components require functionality of other components while initializing.
There is another rule in Koala Model which concerns with Multithreading. There are a lot of
small and independent activities in different kinds of control software used for consumer
electronics. A basic example of such kind of activities is a control loop which is used to
control and measure the quality of image. Such kinds of activities have different behaviors
like hard, relatively hard and soft in real time systems. To differentiate between high level
and low level frequency tasks we use a real time kernel having anticipatory scheduling. But
there are still two problems arises…
As reusable components are different for different products so it is complicated
for them to make so many assumptions regarding the architecture of the products. Now there
is a technique to solve the first problem known as thread sharing. There are different software
having different activities use pumps, and to process the message there are different message
queues with different functions and to activate the pump function there is also a logical thread
as well. There are different pump engines which serve as physically threads and also control
the pumps. Such a technique can also be used as a solution to the second problem.
Third rule in Koala Model is known as notification. The example of such kind of rule is a TV
system. If the broad cast does not receive signals then there must be a sign of error like no
sound etc… There is also another example related to this rule is the searching of frequency for
the next available station. Now such kind of action could take few seconds or one minute as
well. So there should be some response about the search either the station is found or not.
In different products the sign of notification is attached to a single client but it could be
different for different products. To differentiate these notifications we have to model these
notifications as outcalls by using optional requires interfaces. We can differentiate the whole
architecture of the product into three different layers…
A computing platform layer is developed to utilize the hardware
implementation.
A platform related to an A/V/data is developed to utilize the audio, video and
data processing hardware.
There are also some layers of applications and services as well.
There are different components related to these three layers which can use the components of
each other. Like the components of first layer could be used by the components related to
second layer. At the same time components related to both first and second layer could be
used by the components of third layer. To control a specific subdomain there is a specific set
of subsystems obtained by every layer.
3.2.7 Creating Products
There are different components involved in Koala Model which are stored in a
storage area known as repository. The repository is such a storage area that contains a set of
packages. These packages also contain different items like set of components and interface
definitions but theses are different from each other by their type like Public or Private. Now
only one team can develop a package also in one location as well. The process of creating
product is not very difficult. To create a product first of all a private directory structure is used
to download a subset of packages. After this process a top level definition of component is
created. Due to this process it becomes easy to instantiates and binds different components
from that storage place which is known as repository. Mostly compound components are used
in this process. Now from here it is decided that either the product is developed or not, if the
product requirements do not match the existing component then from basic components we
can create the new components. Also there is another situation when the existing basic
components does not meet the requirements then we have to create new basic components.
The whole process to generate the product is known as bottom up approach.
3.2.8 Handling Versions and Variants
There is a domain of system to handle the variants and versions of different
components and products which is called Configuration Management. There are two main
reasons due to which it could be difficult to handle the diversity present in a product by CM
system. Some time we believe that diversity is a very important part of basic architecture of
the product but CM system does not allow the diversity to keep inside the architecture
normally in practice. There are such a products developing now or in future where we have to
handle the maximum diversity at runtime but in the mean while it is very difficult for CM
system to handle the diversity at runtime because CM system can only handle at compile
time.
Due to these reasons there are certain aspects which arise….
We use such a CM system which has complete rights to control our software;
there should also source code and documentation issues be involved.
There is another possibility that we do not use the CM system for permanent
branches but also use for products having very short life.
There is another issue that for all permanent diversity present in different
developing products we use only Koala model.
Now as we already know that a single team has the responsibility of each package at only
single location but now it is also known that the CM system of each package maintained by
itself as well. Now due to this characteristic it is possible that all the files of a package in its
full version maintained by the specific package CM system. In the mean while the customers
of that package have the access to its normal releases. The consistency issues with in that
package have to maintained by development team of that package so the users do not have
any concern the consistency of the package. They just have to concern with consistency
between the different packages. To handle the variation within a package there are different
Koala compound components which vary from product to product.
3.3 Koala Component Model for Consumer Electronics
Software
To develop different software related to consumer electronics, object-oriented
approach is ideal to use. A lot of Consumer Electronics (CE) using at present include
embedded systems. As the CE start developing there were not so many challenges but a few
years ago there were three major problems as described…
First there was a problem related to the size and complexity of software using in
developing individual products.
The second major problem related to developing products is diversity of
products and also software used to develop that product.
The third major factor was related to the time of development.
3.3 Koala Model
In the designing phase of Koala there is a difference between component and
configuration development. Builders of component do not make any kind of assumption
related to configurations. The reason behind this issue is that components are used in
configuration. In the same way the designers related to configuration are not allowed to make
changes according to their requirement in components.
3.3.1 Component
Components of koala are combination of different things like design,
development and reusing is most important. As it is described earlier that interfaces are used
by components to communicate with its environment. There are a lot of functionalities
provided by a component by using an interface. In considered model, require interfaces are
used to access every kind of peripheral functionality. Such kind of interfaces is also used to
access the general services including memory management. The example of such kind of
interfaces is TV. As in TV there is a tuner (hardware device) that receives signals through
antenna as input and then filters all the signals to find the required station and finally
generates the output signal at a transitional frequency. There is description language to define
the component boundaries known as Component Description Language (CDL). There are two
different names are used to label the interface like long and other.
3.3.2 Implementation
In koala all components are independently designed. Interfaces are used to
communicate each other. At the time of configuration the binding of interfaces is late. There
is a header file generated by Koala with renaming macros as shown in figure 8.0… [10]
8.0 Overview of Static Binding Implementation
3.4 Koala Features
One of the important tools using for Koala is Koala Viewer. There are certain
vital features of Koala Viewer as described… [11]
Designers have different experiences with Koala like testing and designing for
other designers.
For over four years Koala has been tested in different ways. From different
testing experiences it has been confirmed that Up-and-running-times of above hundred hours
is common even with a lot of simulation updates.
There is another feature related to output of Koala which assures that the
development with Koala is very rapid. There are different graphical functions in Koala for a
huge number of simulation files which are over 100Mbps have been optimized.
Another feature is related to user friendly environment. Like there are a lot of
function used by mouse and keyboard.
There are different standard formats related to industry in which some are
described below…
Meta-Software-Hspice (binary)
Start-Hspice (ascii and binary, .ac .sw .mt)
Smart-Spice (float, xdr and double)
Berkeley-Spice (ascii and binary)
Raw (a format of Koala)
Mud-Pack (tool for analysis of power-network)
There are also different ways to write Koala like…
Matlab (ascii)
Raw
In Koala for enabling the offline-functions and also for saving the configuration
there is a simple scripting language is used.
There is an advanced bus-editor used in Koala but not originate in different
available tools using at commercial level. Bus-editor is used in Koala for a specific purpose
like to convert the signals from analog to digital quantized.
In Koala there are a lot of internal functions are used like…
To perform arithmetic functions there are different arithmetic
operators like +,*,-, /, % etc…
To perform different logical operations there are different logical
operators like! ^ | &
There are operators used for equalizing/nonequalizing like < > ^^
There are also certain operators to perform different kinds of
mathematical functions like cos, sin, tan, log, pow etc…
In Koala there are also certain operators used to perform advanced
mathematical operations like derivation, mean, standard derivation, integration etc…
There are also some design oriented functions available in Koala
as well like threshold, trigger, sample etc…
There are different constants related to electrical and
mathematical.
Now in Koala there is powerful and user-friendly editor called Equation Editor
is used to integrate all such kind of function and operators for different functions.
In Koala there are also different Library function named as Koala Library. In
Koala different kinds of functions related to read and write are stored in Koala Library.
There is another feature of Koala that it also runs on different kinds of Unix
platforms like SunOS04, Sun Solaris X86, Sun Solaris, Linux ELF and DEC OSF4.
4 From objected-oriented Programming to COM
It is very common to use different programming languages now. Now the world
of technology has been divided into two parts due to programming languages, one is the
original data and the second one is the different operations performed on that data. Normally
data is static unless any kind of operation changed its nature. There are different methods and
operations performed on the data that have no lasting state, but they are very helpful in their
use to affect the nature of data. Now here we describe only two main language concepts like
object oriented Programming and Component Programming. There was a language developed
in 1967 by Ole-Johan Dahl and Kristen Nygaard considered as the first language having the
concepts of Object Oriented language.
4.1 Object Oriented Programming
Object Oriented Programming normally condensed as OOP. There are different
programming languages based on Object Oriented concepts. OOP was started at the end of
1960s just to cover some crisis related to different softwares. The basic idea in OOP is to
design the computer in such a way that it looks like a collection of individual units and
different objects as well which have some affects on each other. As there are different objects
in a computer program which have certain characteristics like receiving messages, then
process on data according to the situation and also to contact other objects by sending
messages. There are also certain mistakes in OOP which are made by different programmers.
Some of them are described below… [7]
Classes and Roles
Data types and interfaces
Levels of abstractions
Policy and mechanism
Application and platform
Relation between uses and is-allowed-to-use
Run-time and compile-time
Aggregation and inheritance
Function application and message passing
Concept of analysis and designing of classes
Interface and implementation
Levels of details
4.2 What is a Component?
Component is a part of software that can be reused and it is in binary form.
There is another property of the component that it can be used by other components as well.
To develop a software component that is binary-compatible, COM is used as the main
stipulation for that software. Actually COM is not a language but it serve as a compiler. COM
can be build in any kind of language, in the mean while it allows the developers to build such
components that can correspond to each other without any hesitation. There are different
examples of COM like ActiveX Components, EJB’s and Beans. These different technologies
are developed and implemented by Microsoft and Sun Microsystems as well. When there was
no concept of .NET there was different method to use the COM, its objects have to be
registered inside the registry of window. The main objective of this was to use the objects by
client programmers. [8]
4.3 Component Object Model (COM)
Component Object Model is a framework of Microsoft. Com is used for
developing and also to provide supporting to component objects in a program. It includes
same facilities Broker Architecture (CORBA). There are also some other interfaces and
programming tools included in COM like COM+, Distributed Component Object Model
(DCOM) and ActiveX. For interaction of objects and to support remote object invocation
COM provides a binary structure. COM enhance the concept of object Oriented Programming
(OOP) by providing the facilities of encapsulation, polymorphism and reusability of software.
Due to reusability reason COM has become a dominate language for developing reusable
software. There are two main requirements which have to satisfy every COM interface. The
first one is that a pointer of COM always points to an array which contains pointers of virtual
function. Other one is about the inheritance of COM interface that it always inherits from an
unknown interface. There are three methods to perform this inheritance like QueryInterface ()
use for the navigation of same object instances occurred in between interfaces, AddRef () is
used for the incrementing of reference counts and last one is Release () used for the decrement
of reference counts.
COM is very popular and common software component model used for desktop
and server side applications. Today COM has been replaced by another new technology called
.NET for same purposes. Generally speaking COM is more suitable for development of
embedded systems. There is a very basic concept of COM is about its interface. It means that
the interfaces have no concern with the components that use them and those who implement
them. There is an Interface Definition Language (IDL) is used by COM to identify the objectoriented interface. Infect the interfaces are just like object-oriented due to a solid reason that
the classes use their operations and then after invoking a reference is passed to a specific
instance of the class. There is also a run-time format used to access the interface pointers.
There is also a policy related to instantiation. The main advantage of such kind of policy is
ensuring the facility to install different kinds of components can be installed at different times
in a system. The use of interface nodes in COM can be described as shown in figure 7.0…
Interface Pointer
Method Code
Interface node
Instance Data
VTABLE
Figure 7.0 Format of Interface nodes
4.4 Comparing OOP and COM
There are certain main advantages of OOP, but the most important advantage is
data encapsulation. It means that there is very close relation between items and procedures of
data. There is another strong feature is inheritance in OOP. It means that we can derive an
object from a general object which is similar to general. We can easily understand the concept
of inheritance by an example i.e. [15]
Class M ( )
{
Public:
Integer s
}
Class N: public M
{
Public:
}
It is very clear that class N is inherited from Class M. Class N has no data member. Class N
will inherit the same data member from class M because when a class is inherited from
another class then it includes the whole data members of the class from which it is inherited.
There is another advantage of OOP that it allows to create, maintain and modify the existing
code in a program just like a new object created by the existing one by just a small change in
existing one. For the development in graphical user interface there is a nice framework in
OOP that is also used for code libraries. Now in these libraries it is possible to update and
modify the components related to supplied software by different programmers. But there are
certain other main advantages of OOP like… [9]
 Simplicity
 Modularity
 Modifiability
 Extensibility
 Maintainability
 Re-usability
There are certain main advantages of COM. There is no need to build the
complete application each time in COM. There is the facility to rebuild only single
component. In COM development, in COM first of all component interface is developed,
which shows the fact that everything work together. There are also some important principles
of Component programming like… [12]
Binary Compatibility
Version Control
Location Transparency
Component-based security
Difference between interface and implementation
Independency of language
Binary Compatibility
There are also certain main differences between component and object oriented
programming like…
In OOP we focus on relationship of classes and then a large binary executable is
used to merge all the classes that are used. While in Component programming the main focus
is on code modules that are interchangeable and also such modules work independently. It is
possible to factor business logic in different kinds of fine-grained classes but if we compile all
these classes once then the end result of the classes is monolithic binary code. If there are
different source files and more than one developer’s effort on identical code base then they
have to share those file. In OOP the concept of reusing is known as white box reuse. The main
reason behind this is to know about every kind detail about the implementation of OOP
application. While in Component-based applications the reusing process is called black box.
The main objective of black box reuse is to access the existing component and we do not need
to know about its internal implementation. Binary-compatible interface is used as the basic
unit of the component based programming. But in OOP object is used instead of interface.
Similarly object is the basic unit used for reusing while in component based programming
interface is used as basic unit for reusing. There is another difference between OOP and
component based programming is the language independency. Like in component based
programming there is no need to contact client in developing the server which is not possible
in OOP [12]. There is an important thing that it is not possible to define OOP, Modular
Programming and CBSE without storm. There are different definitions are available for each
other but some of these available definitions are similar to each other and also oppose each
other as well. Modular programming means that we break our software system into different
parts as it is performed in CBSE. We can say that modular programming is a subset of CBSE.
It means that CBSE is a type of Modular programming, but there are some extra qualities to
be found in that form. OOP is also an extended form of modular programming which is pretty
similar to CBSE. But in mean time there are some different features in OOP than CBSE even
if they are similar in definitions. There are certain concepts of OOP which leads it to be a
Modular programming like inheritance, encapsulation and polymorphism. [14]
5 Component Based Embedded Systems
It has become a true factor that embedded systems are facing a lot of problems
now, the reason behind this issue is just due to cost of hardware and need for different
products. The example of such component based embedded systems are smart cell phones,
PDAs and different devices related to home or industrial requirements. To solve such a
problem it is necessary to develop such efficient systems to overcome these problems in very
short time. Even now in such an advanced environment there are such systems which are still
developed by assembler or using C language. Now there are such embedded systems which
are platform dependent, such systems are difficult to upgrade port and customize. There is
another drawback of these systems that they are not reusable. But component technology
provides the facilities to develop such a natural units for reuse.
5.1 Framework for Component-Based Embedded Systems
A framework is a combination of different things like constraints which are
related to components and also among their relations to each other. But there are also some
good feature obtained from those constraints included in a framework. Before identifying
development platform for developing component-based embedded systems, it is necessary to
identify the whole transportation for different components. It is just because of a reason that
component is used as the basic unit in component-based embedded systems.
Now in the market different languages have been developed which use different techniques
like Visual basic uses Visual Basic Control which are known as VBX and Java beans are used
in Java. To make the development of application easier there are different tools to share and
distribute the application. But there are special underlying services which are used by all of
those approaches by providing communication and coordination which is necessary in the
development process of the application. The communication among the components is
possible through Plumbing which is the infrastructure of components. As there are different
technologies have been developed but there are three of them have become standard which
are OMG’s CORBA, Microsoft’s Component Object Model (COM) and Distributed COM
(DCOM). There is also another knows as Sun’s JavaBeans and Enterprise JavaBeans. It is
mentioned that Koala Model is another technology used for developing different embedded
systems now.
6 Component-Based Software Engineering
Now to describe the quality assurance of component-based embedded systems
there is a model. It is a true factor that the process to develop the simple system is very
different from embedded system. So the QA Model should describe the both Components
involved in the development and the whole system. Now there are certain standards available
which are used to control different activities related to the Quality of the whole development
process of the software, in such systems there are ISO9001 and CMM are well known. The
QA model can be described as in figure 6.0.
Component
Quality
Assurance
Model
Embedded
System
Figure 6.0 A Quality Assurance Model for both Embedded System and Components
Now in QA Model there are certain important aspects related to the whole
development process of a component-based embedded system. [6]
6.1 Component Requirement Analysis
Requirement analysis process of a component describes the different aspects
related to the documentation, understanding, validating and also the management of the whole
process. The main objective to design the requirement analysis is concerned to find the
required requirements to develop an embedded system. The requirement analysis process can
be described in a figure 6.1.
Figure 6.1 Overview of Requirement Analysis process
6.2 Component Development
Now the time to implement the whole requirements gathered during the
requirement Analysis as described in figure. The main purpose of the component development
process is to the final product and interfaces. It is necessary that component development
should help to satisfy the results according to the requirement. An embedded system consists
of both types of components i.e. Hardware and Software the whole process is described in
figure 6.2.
Figure 6.2 Overview of Component Development process
6.3 Certification of Component
There are certain features involved in the process of certification of a component
i.e. Component outsourcing, Component Selection and Component Testing. The main
purpose of certification to test either the components involved in the system meet the
requirements or not as described in the figure 6.3.
Figure 6.3 Overview of Component Certification process
6.4 Customization of Components
Now after the certification of components involved in the development of
embedded systems, the next step is to customize the components which involved certain
important aspects. The requirements have been updated so that the components are modified
according to the requirements. Then there are some important changes in development just to
make the components able to run on the platform of embedded system. Now as there are
certain components which involved can increase the quality and performance are upgraded.
So we can say that the main purpose of Customization is to make the components able to run
in the embedded environment as describes in the figure 6.4.
Figure 6.4 Overview of Component Customization process
6.5 Designing System Architecture
In the designing phase the architecture of an embedded system which is
component based is designed by evaluating and selecting different components involved in
the designing process. The main objective of designing the architecture is to gather the
requirements, clear the requirements of the system, after finding the requirements we have to
choose the suitable architecture for the system and finally after all these details we think about
the implementation requirements like language for programming, platform etc… The whole
process of designing the architecture can be describes as shown in figure 6.5.
Figure 6.5 Overview of Component Designing Architecture process
6.6 Integration of the System
Now in this process the whole selected components are assembled into a final
system according the architecture of the embedded system. The main objective of integration
is to get the final system as described in the figure 6.6.
Figure 6.6 Overview of Component Integration process
6.7 Testing of System
There are certain important aspects related to the testing of the system like
system should satisfied the specified requirements and also mention the defects in the system
and also correct those defects in the implementation phase of the system as described in the
figure 6.7.
Figure 6.7 Overview of Component Testing process
6.8 Maintenance of System
The main purpose after designing the complete system, provide some services
and some activities related to the maintenance. It would be beneficial to use the system after
the delivery. The whole process can be described as in figure 6.8.
Figure 6.8 Overview of Component Maintenance process
6.9 Quality Assurance for Component-Based Embedded
Systems
There are different issues related to the quality assurance which could be
described as…
6.9.1 Life Cycle
Since the development process of an embedded system includes the selection of
different components and after that those components are assembled together instead of
programming the whole system from graze. So it is clear that the life cycle of traditional
embedded system software is different from component-based embedded system.
However the overall life cycle of component-based embedded software can be described as …
[6]
1. Requirements Analysis.
2. Selection, construction, analysis and evaluation of embedded software
architecture.
3. Customization and Identification of components
4. Embedded system integration.
5. Testing of Embedded System.
6. Maintenance of Software.
6.9.2 Quality Characteristics of Components
There is a lot of work has been done on the development of component-based
embedded software. Even then there are two main questions related to the development of
such kind of embedded systems.
The first question is related to the quality i.e. how can we certify the quality of
different components using in the development process of a component-based embedded
system.
The second question is related to the overall system developed by different
components.
To overcome these two questions the system must have some extra qualities like the system
should be promoted to describe the whole quality control related to different components and
the system as well. To know about the size there should be metrics. These metrics are also
used to measure some other things related to the components and whole system as well like
complexity, reliability and reusability. To know about different components and systems
which are already existed there are different tools are used but these tools should be decided
first. It is very necessary to know that how we can find the quality of a component in order to
judge the component. But now after some research on quality characteristics related to
components and the whole system as well, it is calculated that these are few like
Functionality, Usability, Reliability, Testability, Interface and Maintainability.
As it is mentioned that there should be some metrics to assure the quality of components,
these metrics should have some qualities i.e.
Size
There are certain factors related to the cost i.e. it covers reuse cost and quality.
Now it is expected that the size could be small or large. If the size is small then it is related to
cost and if it too big then it is related to quality.
Complexity
It has also the facts related to cost and quality. A simple component is not
useful to use for reuse but if it is too much complex then is has the fact on quality.
Reuse Frequency
If a component is used in such a huge numbers then it affects the component
features.
Reliability
It concerns with certain factors relates to failure-free.
7 Conclusion
Now it’s very easy to say that embedded systems are very important to compete
the requirements of current era. And there are different components used to develop the
embedded systems. Now there are different CPUs are used due to certain important
functionalities of the embedded systems. The effort to develop the embedded systems started
in 1960’s. The first mass-produced embedded system launched in 1961. The embedded
systems are computing devices controlled without any kind of key board or mouse. Real time
systems are such systems to have the ability to meet the requirement within the required time
under any kind of circumstances. There are a lot of things involve in Koala Components like
interface, binding and bind time, diversity interfaces and product line architecture. Koala has
some important features like rapid development. There are also some important features like
Meta-Software-Hspice, Start-Hspice, and Smart-Hspice etc… There are also some features
related to different functions like logical, arithmetic etc… There is a complete life cycle
related to the development of embedded systems. So now it has become a true factor that
Embedded Systems have become a important part of our lives in order to save the time.
8 References
[1] Introduction of Real-Time Embedded System Design,
http://people.cs.vt.edu/~cameron/cs4504/quan.pdf#search=%22Introduction%20of%20RealTime%20Embedded%20System%20Design%22, (09-09-2006)
[2] Gang Quan, Introduction of Real-Time Embedded System Design,
http://web.cecs.pdx.edu/~mperkows/temp/real-time-embeddedsystems.pdf#search=%22Introduction%20of%20RealTime%20Embedded%20System%20Design%22
[3] Embedded system overview, http://en.wikipedia.org/wiki/Embedded_systems
[4] Sandeep Agrawal, Pankaj Bhatt. Real-time Embedded Software Systems An Introduction, August
2001.
[5] Ivica Crnkovic, Component-based approach for embedded systems, Mälardalen University,
Department of Computer Science and Engineering Sweden.
[6] Xia Cai, Michael R. Lyu, and Kam-Fai Wong. Component-Based Embedded Software
Engineering: Development Framework, Quality Assurance and A Generic Assessment Environment,
International Journal of Software Engineering and Knowledge Engineering Vol. 12, No. 2 (2002) 107.
[7] Object-oriented programming, http://en.wikipedia.org/wiki/Object-oriented_prog Component
Programming in Dotnet ramming#Fundamental_concepts, (30-12-2006).
[8] Component Programming in Dotnet, http://www.csharphelp.com/archives/archive270.html
[9]
Object
Oriented
Basic
http://eprints.ecs.soton.ac.uk/857/03/html/node3.html
Concepts
and
Advantages,
[10] Rob van Ommering, Frank van der Linden, Jeff Kramer and Jeff Magee, London, The Koala
Component Model for Consumer Electronics Software,
[11] Koala, http://www.eleceng.adelaide.edu.au/Koala/ (19-09-2006)
[12] Juval Löw, Programming .Net Components, Pblish By O’Reilly.
[13] Ivica Crnkovic & Magnus larsson, Building reliable Component-based Software Systems, 158053-327-2.
[14] Component-Based Software Engineering for Consumer Electronics,
http://www.nexwave-solutions.fr/frontend/whitepapers/CBSE_for_Consumer_Electronics(1).pdf.
[15] Randy Charles Morin, OOP Concepts by Example,
http://www.kbcafe.com/articles/OOP.Concepts.pdf,
Download