Sie sind auf Seite 1von 6

COS: A Configurable OS for Embedded SoC Systems

Wasmatkar Rasika ,
Electronics Engineering Department, AISSMS’s IOIT, Pune 411001.
rasika.wasmatkar@gmail.com

increasing of system performance and


Abstract—as the increasing of system computing power, embedded OS plays a
performance and more and more important role in
Computing power, embedded systems are embedded systems to better and fully
more complicated and interactive. utilize system resources for better
Therefore, operating system (OS) plays a resource control, task and
more important role in embedded
systems to utilize various hardware and
memory management, real-time
software resources. However, no OS can performance and even power awareness.
meet all requirements of various Due to the characteristics of various
embedded systems. Due to the advance requirements of embedded products,
of reconfigurable processors, system porting OS to different hardware
requirements can be more dynamic. environments seems inevitable. Since
Embedded OS has becoming more critical reconfigurable processors have become a
in the development of embedded systems trend and can be more easily configured
and thus there is a strong need of according to the target application,
configurable embedded OS to better and
porting a suitable OS to a target platform
faster build up the target system. In this
paper, we propose a configurable OS, becomes more critical in the development
called COS, based on SOA (Service- of embedded systems because each
Oriented Architecture) for embedded SoC change in the target platform might result
(System on a Chip) systems to build an in modification or new porting of the
application specific OS according to the embedded OS. Therefore, there is a strong
system requirements. COS can be easily need in designing a fine granular
configured to better utilize the resources configurable embedded OS which allows
of the target embedded platform and the developers to create or modify kernel
have better support to the embedded
services according to the needs of their
application. Moreover, the COS can easily
extend new features or functionalities of embedded systems. Configurability of
other OSes and even be adapted to the embedded OS is important for optimizing
designs of other OSes. The systems with respect to specific
implementation of COS on an ARM characteristics. Although the kernel
platform to prove its configurability and components of
also evaluate its overhead. We believe some general-purpose OSes can be
that COS can be configured to meet the customized for application specific
various requirements in embedded SoC purposes, implementing a new component
systems and help to speed up the
may be very difficult. For example, it takes
embedded system development process.
much time and effort to understand and
Keyword: Configurable OS, Service- modify a monolithic kernel. Configurable
Oriented Architecture, SoC, Embedded OS enables developers to build their own
OS. system-specific OS and
makes it suitable for a wide range of
I. INTRODUCTION embedded applications. Configurability
also can ensure that the footprint is
In recent years, embedded systems have minimized as all unnecessary
been rapidly and widely spread. The functionalities and features can be easily
variability and fast-growing market makes removed from the kernel. In this paper, we
time-to-market and product life cycle of introduce COS for embedded SoC
embedded systems very short. With the systems. COS is the first to introduce the
idea of applying SOA to embedded OSes. designed for integration and evaluation of
COS kernel is embedded with general scheduling algorithms [4]. However, the
interfaces for kernel components, configurability of S.Ha.R.K is basically at
including memory management, scheduler level. Although it is a good
scheduler, interrupt handling interfaces, platform to test new scheduling
etc. A kernel component can be plugged algorithms, it is not
or unplugged to its interface according to suitable in embedded systems due to
the application needs. Services of other other part of the kernel cannot be
OSes can be implemented as components configurable as well. Carsten B¨oke and et
of COS and can therefore perform the al. presented the use of the DREAMS
specific functionalities which are most component library for rather different
preferable to the target embedded SoC classes of applications [1]. The DREAMS
system. This innovation will enable component library can be customized at
embedded system developers to work source code level and configured in a very
within a familiar and proven environment, flexible way. This approach is flexible and
facilitating code reuse, improved configurable based on the proposed
performance, and shorter development component library. However, the
cycles. The main idea of COS is to allow configurability of the proposed OS is thus
system developers to impose their limited and might be difficult to extend the
solutions proposed library because it does not
of requirements on the kernel emphasize on the abstraction of
components, which includes application interfaces. Michael Clarke and Geoff
functionality and platform specification, Coulson described the design of
whereas general-purpose OS has a dynamically extensible OS, DEIMOS [3].
constrained this kind of implementation. DEIMOS does not define a kernel entity
The interfaces of COS are open and but specifies services as modules which
standardized as abstraction layers to the can be loaded, configured and unloaded
COS kernel and thus it is easy to on demand by a Configuration Manager.
implement new components. However, some kernel services cannot be
Nevertheless, by the open and loaded at runtime, such as memory
standardized interfaces, the service management for which using virtual
components can be provided by open memory or not has to be determined in
source community as well as proprietary compile-time as kernel itself needs to be
contributors. As more and more loaded in the memory for execution.
developers work toward extending Therefore, its configurability is limited in
Functionalities and contribute their the hardware platform dependent way.
components, COS FLUX OSkit leads developers to a faster
can further meet more requirements of start point with a set of libraries of
different application domains and thus hardware dependent and messy codes
helps to shorten the development time including bootstrap, management, drivers,
and time-to-market. The rest of the paper etc, and thus save some development
is organized as follows. Section 2 presents time [8]. However, developers still need to
previous works on OS configurability. The implement the other parts of the OS
design according to their needs and the
and implementation of COS is presented in implemented OS may have performance
Section 3. Section 4 details an issues. We propose COS, which obtains
implementation of COS on an ARM higher configurability in
evaluation board and analyzes its both software and hardware dependent
performance impacts. Finally, Section 5 is considerations. COS enables developers to
the conclusion of this paper. build their own system-specific OS by
configuring OS service components via
II. PREVIOUS WORKS general kernel interfaces. Due to the
abstraction of the interfaces, new services
Paolo Gai and et al. proposed S.Ha.R.K., a can be easily implemented and thus the
dynamic configurable kernel architecture growth in functionality can be unlimited,
which makes COS very suitable for all configure the kernel with a real-time
kinds of embedded SoC systems. scheduler to meet the timing constraints
of the system, or a MMU-less memory
III. CONFIGURABLE OS ON SOA management is used for the target
platform without MMU. OS components
As shown in Figure 1, in order to meet using the COS interfaces can be
various needs of embedded applications, configured in two different methods.
we introduce the idea of SOA to design Services that are not used at system boot
general interfaces of OS components, time can be configured at runtime which
including scheduler memory management, would not cause the kernel size to be
interrupt handling, etc. Components of a unnecessary large when the component is
specific OS service can be “plugged” to not needed and loaded, such as real-time
the interface. OS kernel and embedded or power-aware schedulers. On the other
application need no modification to the hand, compile time configured
source code. COS can be easily configured components allow developers to control
to meet the components at the earliest stage.
requirements of various embedded Basically, these components are tightly
applications due to the idea of SOA. The coupled with the system operation and
components can be implemented in COS functionality and may affect the system
as monolithic kernel or in the user space performance a lot such as memory
as microkernel. COS design is able to be management and interrupt handling.
adapted to other OSes as different Compile time configurability gives the best
implementations of the COS. result in terms of code size because it can
be done at the individual statement level
in the kernel source code rather than at
the function or object level. This makes
compile time configurability even more
suitable for embedded systems and only
the necessary components are included in
the kernel image. Focusing on building
standardized interfaces first rather than
implementation does provide a right way
to reach configurability. Although the COS
interfaces are designed in a generic way
as much as possible, developers might
want to change the interfaces because of
performance or other new concerns. It is
possible to extend the interfaces or define
sub-interfaces within an interface to
extend the configurability of COS.
The proposed interfaces need to be
general to support IV. IMPLEMENTATION OF COS
various implementations and transparent
to both kernel and applications. From COS kernel calls the functions provided in
kernel’s viewpoint, the interface is an the proposed general interfaces when
abstraction layer between the kernel and requesting for OS services. The interfaces
some specific services. The configurability are function pointers that point to the
of COS also provides a standardized actual functions of the configured OS
mechanism to extend its functionality and components performing the services, such
allows systems to be built from a rich set as scheduling or disabling interrupts. The
of optional configurable components. actual functions of each services are
Developers are able to select components registered when kernel initializing for
with particular implementations that compile time configured components and
satisfy the specific requirements of the when loading into kernel for run-time
system. For example, developers can configured components. The COS design
can be applied to both existing be set via the timer interface which help
microkernel and monolithic kernel or even developers to specify time variables
to build a specialized new OS. When transparent to hardware timer.
implementing the COS design to an
existing OS, modification of the C. Scheduler
kernel source code is inevitable. We need The COS scheduler interface includes
to patch the target kernel with the function pointers and parameters of a
proposed interfaces and then substitute scheduler component. The COS kernel can
with the actual functions of selected register/unregister tasks to a scheduler,
components. The implementation of COS start/stop scheduling, obtain the next
based on monolithic ARMLinux kernel is executing task, etc through the scheduler
shown in Figure 2. interface. Therefore, on-line and off-line
scheduling algorithms
can be independently implemented as a
scheduler component without detail
knowledge and modification to the OS
kernel. Since schedulers are run-time
configured components, we also
implement corresponding system calls for
developers to select
The kernel and components communicate
a scheduler, register a task to a specified
through
scheduler, etc.
the general COS interfaces. For example,
kernel obtains the next executing task
D. Memory Management
from the scheduler via the scheduler
The COS memory management interface
interface. The scheduler interface has the
defines initialization, allocate/free memory
actual scheduling function of the selected
operations. It also maintains the number
scheduler in the system to perform
of total, used, and free memory and
scheduling. The scheduler will set the
pointers to free and used memory pool for
timer for the next rescheduling
kernel usage.
time via the timer interface.

A. Interrupt Handling
We divide the interrupt interface into two
E. File System
sub-interfaces, top half and bottom half.
Linux uses VFS (Virtual File System) as an
Top half functions can be considered as
abstraction layer for file systems to enable
part of a hardware abstraction layer
kernel to perform operations on various
between kernel and interrupt controller.
underlying file systems through same
Interrupt handling using simple
interface. In COS, we also adapt VFS as file
mechanism needs only the top half sub-
system interface. VFS defines general file
interface, such as μC/OSII. Developers can
operations including open(), read(),
register/remove an ISR of a specified IRQ
write(), llseek(), etc [2].
(Interrupt ReQuest line) and also execute
all ISRs (Interrupt Service Routines) when
V. CASE STUDY
necessary via the interface. Other
We apply the COS design to ARMLinux [6]
functions are used to initialize,
and port it on a Creator ARM9 evaluation
enable/disable, mask, clear the
board [7]. Components are implemented
IRQs on the system.
for important OS services to prove the
configurability of COS.
B. Timer
The COS timer interface acts as part of
A. Implementation
hardware abstraction layer between
We modify the ARMLinux kernel to
kernel and system hardware timers.
accommodate the COS interfaces and
Developers can initialize, start/stop, set
construct service components. When OS
interval and operating mode of a timer.
services are needed, the COS interfaces
Time unit for the specified timer can also
are invoked instead of the original overhead of interfaces without parameters
ARMLinux kernel calls. Since COS provides reconstructing, such as schedule() of the
general interfaces, the most effort is to scheduler interface, can be neglected due
redirect original kernel calls to the COS to the implementation of function pointer.
interfaces and re-construct parameters to In order to reduce the overhead of COS
pass interfaces, macros and inline assembly
to the components. Services of other OSes can be used to further reduce the extra
or new components function calls and parameters
reconstructing of current implementation.
Kernel components need to be carefully
implemented according to specific
requirements of target embedded system.
In our implementation of the paging
without MMU memory
management component, we disable the
MMU of the ARM9 core on the Creator
board to test the MMU-less memory
management service. Due to the hardware
limitation of the ARM9 processor, disabling
the MMU also disables the data cache [5],
which results in about 7 times degradation
in performance (Table III). It proves that
each service component needs to be
carefully selected or implemented
according to its application and platform
requirements. It also shows the benefit
from configurability of COS to easily meet
various requirements of embedded
systems.

need to conform to the COS interface.


Table I shows components of current COS
implementation. We implement several
components for each service [10], [9] and
test COS with CPU bound and I/O bound
tasks including a MP3 decoder using VI. CONCLUSION
various combinations of implemented In this paper, we introduce the strong
components and thus need of configurability in embedded OS
proves the configurability and feasibility of and present the idea and architecture of
COS. the configurable OS design (COS) for
embedded SoC systems. We show how to
B. Performance Evaluation apply service-oriented architecture (SOA)
In order to evaluate the performance of on OS design and separate
COS, we measure the overhead of implementation from interfaces.
proposed interfaces. Table II shows the Implementation issues of COS are also
overhead of COS interfaces in average and discussed. An implementation of COS
we can see the overhead is manageable. based on ARMLinux on an ARM9
The zero executing time is because actual evaluation board is presented and
value is less than a timer tick and cannot performance is analyzed to prove its
be measured. mem init() performs feasibility and configurability. We show
considerable kmalloc() and kfree() that functionalities of other OSes or new
operations during initialization and thus OS services can be easily implemented as
the overhead is much larger. The COS components by conforming to the
COS interface design. Moreover, COS can
accommodate to other existing OS
implementations as well. Since ”COS” is a
reverse of ”SOC”, we believe COS is very
configurable, can meet specific SoC design
[4] Paolo Gai, Luca Abeni, Massimiliano Giorgi, and
requirements, and can fully utilize the Giorgio Buttazzo. A new kernel approach for modular
embedded hardware and software real-time systems development. In the 13th IEEE
resources. Euromicro Conference on Real-Time Systems, pages
199–206, June 2001.
[5] ARM. Internet homepage. http://www.arm.com/.
REFERENCES 2006.
[1] Carsten B¨oke, Marcelo G¨otz, Tales Heimfarth,
[6] ARM-Linux. Internet homepage.
Dania Adnan El-Kebbe, Franz Josef Rammig, and
http://www.arm.linux.org.uk/. 2005.
Sabina Rips. (re-) configurable real-time operating
[7] Creator Development Board. Micortime Internet
systems and their applications. In the IEEE
homepage.
International Workshop on Object-oriented Real-time
http://www.microtime.com.tw/product/product.htm.
Dependable Systems (WORDS 2003), January 2003.
2004.
[2] M. Cesati and D. P. Bovet. Understanding the
[8] Flux Operating System Toolkit. Internet
Linux Kernel, 2nd Edition. O’Reilly, second edition,
homepage.
2003.
http://www.cs.utah.edu/flux/index.html/. 2005.
[3] Michael Clarke and Geoff Coulson. An architecture
[9] Chih-wen Hsueh and Kwei-Jay Lin. Scheduling
for dynamically extensible operating systems. In the
real-time systems with
4th International Conference on Configurable
end-to-end timing constraints using the distributed
Distributed Systems, 1998.
pinwheel model.
IEEE Transactions on Computers (SCI), 50(1), January
2001.
[10] C. L. Liu and J. Layland. Scheduling algorithms
for multiprogramming
in a hard real-time environment. Journal of the ACM,
10(1):46–61,
1973.

Das könnte Ihnen auch gefallen