COS: A Configurable OS for Embedded
SoC Systems
28 January 2015
by,
Prateek Anand
CONTENTS
 INTRODUCTION
 CONFIGURABLE OS ON SOA
 IMPLIMENTATION OF COS
 CASE STUDY
 ADVANTAGES OF ECOS
EMBEDDED SYSTEMS
An embedded system is a combination of computer
hardware and software, and perhaps additional
mechanical or other parts, designed to perform a
dedicated function.
CONFIGURABILITY
An embedded system must lend itself to flexible
configuration so that only the functionality needed for a
specific application and hardware suite is provided.
NEED FOR CONFIGURABILITY
 OSes can be customized for application specific purposes.
 Time and effort to understand and modify is less compared
to monolithic kernel.
 Unnecessary functionalities and features can be easily
removed from the kernel.
 Enable embedded system developers to work within a
familiar and proven environment,.
CONFIGURABLE OS ON SOA
A. Hardware Abstraction Layer (HAL)
The HAL is software that presents a consistent API to the
upper layers and maps upper-layer operations onto a
specific hardware platform. Thus, the HAL is different for
each hardware platform.
B. COS Kernel
The COS kernel provides the core functionality needed for
developing multithreaded applications:
ocreate new threads in the system
oControl over the various threads in the system
oScheduleing, determining which thread should
currently be running
oIntegration with the system’s support for interrupts and
exceptions
Contd…
C. User space
The user space is a software layer provided for the
facility of application programs and user interface
software.
IMPLIMENTATION OF COS
A. Interrupt Handling
Developers can register/remove an ISR of a specified IRQ
(Interrupt ReQuest line) and also execute all ISRs (Interrupt
Service Routines) when necessary via the interface. functions are
used to initialize, enable/disable, mask, clear the IRQs on the
system.
B. Timer
The COS timer interface acts as part of hardware abstraction
layer between kernel and system hardware timers. Developers
can initialize, start/stop, set interval and operating mode of a
timer.
C. Scheduler
The COS kernel can register/unregister tasks to a scheduler,
Therefore scheduling algorithms can be independently
implemented as a scheduler component without detail
knowledge and modification to the OS kernel.
D. Memory Management
The COS memory management interface defines initialization,
allocate/free memory operations. It also maintains the number
of total, used, and free memory and pointers to free and used
memory pool for kernel usage.
E. File System
Linux uses VFS (Virtual File System) as an abstraction layer
for file systems to enable kernel to perform operations on
various underlying file systems through same interface.
VFSdefines general file operations including open(), read(),
write(), llseek(), etc [2].
Case study
A. Implementation
We modify the ARM Linux kernel to accommodate the COS
interfaces and construct service components.
Service Component Config. Method
Interrupt Handling Top/Bottom Half
Top/Bottom Half w/ tasklet
Compile Time
Scheduler Rate Monotonic
Earliest Deadline First
Pinwheel
Round Robin
Run-Time
Memory
Management
Paging with MMU
Paging without MMU
Partition and Block
Bitmap
Compile Time
File System EXT2
RAMFS
VFAT
Run-Time
TABLE I
COMPONENTS OF THE COS IMPLEMENTATION
B. Performance Evaluation
In order to evaluate the performance of COS, we measure the
overhead of proposed interfaces.
Mem Manage. Component Allocate (μs) Access (μs)
Paging with MMU 316 137
Paging without MMU
208 994
Paging with MMU (D Cache
disabled)
742 876
TABLE II
PERFORMANCE IMPACT OF MMU AND D CACHE
MAIN ADVANTAGES OF ECOS
Configurability:
It can be configured in great detail at compile time, which avoids
the need to add unwanted code to the library to be linked with the
application code.
Portability
eCos is designed to be portable to a wide range of target
architectures and platforms, including 16, 32 and 64 bit
architectures, microcontrollers and DSPs
COS: A Configurable OS for Embedded SoC Systems

COS: A Configurable OS for Embedded SoC Systems

  • 1.
    COS: A ConfigurableOS for Embedded SoC Systems 28 January 2015 by, Prateek Anand
  • 2.
    CONTENTS  INTRODUCTION  CONFIGURABLEOS ON SOA  IMPLIMENTATION OF COS  CASE STUDY  ADVANTAGES OF ECOS
  • 3.
    EMBEDDED SYSTEMS An embeddedsystem is a combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a dedicated function. CONFIGURABILITY An embedded system must lend itself to flexible configuration so that only the functionality needed for a specific application and hardware suite is provided.
  • 4.
    NEED FOR CONFIGURABILITY OSes can be customized for application specific purposes.  Time and effort to understand and modify is less compared to monolithic kernel.  Unnecessary functionalities and features can be easily removed from the kernel.  Enable embedded system developers to work within a familiar and proven environment,.
  • 5.
  • 6.
    A. Hardware AbstractionLayer (HAL) The HAL is software that presents a consistent API to the upper layers and maps upper-layer operations onto a specific hardware platform. Thus, the HAL is different for each hardware platform. B. COS Kernel The COS kernel provides the core functionality needed for developing multithreaded applications: ocreate new threads in the system oControl over the various threads in the system
  • 7.
    oScheduleing, determining whichthread should currently be running oIntegration with the system’s support for interrupts and exceptions Contd…
  • 8.
    C. User space Theuser space is a software layer provided for the facility of application programs and user interface software.
  • 9.
    IMPLIMENTATION OF COS A.Interrupt Handling Developers can register/remove an ISR of a specified IRQ (Interrupt ReQuest line) and also execute all ISRs (Interrupt Service Routines) when necessary via the interface. functions are used to initialize, enable/disable, mask, clear the IRQs on the system. B. Timer The COS timer interface acts as part of hardware abstraction layer between kernel and system hardware timers. Developers can initialize, start/stop, set interval and operating mode of a timer.
  • 10.
    C. Scheduler The COSkernel can register/unregister tasks to a scheduler, Therefore scheduling algorithms can be independently implemented as a scheduler component without detail knowledge and modification to the OS kernel. D. Memory Management The COS memory management interface defines initialization, allocate/free memory operations. It also maintains the number of total, used, and free memory and pointers to free and used memory pool for kernel usage.
  • 11.
    E. File System Linuxuses VFS (Virtual File System) as an abstraction layer for file systems to enable kernel to perform operations on various underlying file systems through same interface. VFSdefines general file operations including open(), read(), write(), llseek(), etc [2].
  • 12.
    Case study A. Implementation Wemodify the ARM Linux kernel to accommodate the COS interfaces and construct service components. Service Component Config. Method Interrupt Handling Top/Bottom Half Top/Bottom Half w/ tasklet Compile Time Scheduler Rate Monotonic Earliest Deadline First Pinwheel Round Robin Run-Time Memory Management Paging with MMU Paging without MMU Partition and Block Bitmap Compile Time File System EXT2 RAMFS VFAT Run-Time TABLE I COMPONENTS OF THE COS IMPLEMENTATION
  • 13.
    B. Performance Evaluation Inorder to evaluate the performance of COS, we measure the overhead of proposed interfaces. Mem Manage. Component Allocate (μs) Access (μs) Paging with MMU 316 137 Paging without MMU 208 994 Paging with MMU (D Cache disabled) 742 876 TABLE II PERFORMANCE IMPACT OF MMU AND D CACHE
  • 14.
    MAIN ADVANTAGES OFECOS Configurability: It can be configured in great detail at compile time, which avoids the need to add unwanted code to the library to be linked with the application code. Portability eCos is designed to be portable to a wide range of target architectures and platforms, including 16, 32 and 64 bit architectures, microcontrollers and DSPs