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

Supervisor:

FrankLüders

Department of Computer Science and Electronics (IDE)

Mälardalen University, Sweden

Examiner:

Ivica Crnkovic

Department of Computer Science and Electronics (IDE)

Mälardalen University, Sweden

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

2 Embedded Real Time Systems

2.1 History of Embedded Systems

2.2 What is Embedded System?

2.3 What is Real Time System?

2.4 Areas of Use

3 The koala Component Model

3.1 What is Koala?

3.2 Koala Language

3.2.1 Requirements

3.2.2 General Concepts

3.2.3 Binding and Bind Time

3.2.4 Koala Components

3.2.5 Diversity interfaces

3.2.6 Product-Line Architecture

3.2.7 Creating Products

3.2.8 Handling Versions and Variants

3.3 Koala Component Model for Consumer Electronics Software

3.3 Koala Model

3.3.1 Component

3.3.2 Implementation

3.4 Koala Features

4 From objected-oriented Programming to COM

4.1 Object Oriented Programming

4.2 What is a Component?

4.3 Component Object Model (COM)

4.4 Comparing OOP and COM

5 Component Based Embedded Systems

5.1 Framework for Component-Based Embedded Systems

6 Component-Based Software Engineering

6.1 Component Requirement Analysis

6.2 Component Development

6.3 Certification of Component

6.4 Customization of Components

6.5 Designing System Architecture

6.6 Integration of the System

6.7 Testing of System

6.8 Maintenance of System

6.9 Quality Assurance for Component-Based Embedded Systems

6.9.1 Life Cycle

6.9.2 Quality Characteristics of Components

7 Conclusion

8 References

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 ConstructionEquipment. 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 mass-produced 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.4Areas 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.0Overview 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.1Requirements

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.2General 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.3Binding 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.