Vous êtes sur la page 1sur 2

International Journal of Scientific & Engineering Research, Volume 1, Issue 1, October-2010 1

MUCOS RTOS for Embedded Systems


A Purushotham Reddy, A R Reddy, R Elumalai

Abstract— Real-time operating system (RTOS) is a very useful tool for developing the application on embedded boards with
least software development effort. Though number of RTOS products are available in the market, µC/OS-II is a freeware with
minimum facility and more popular among the hobbyist, researchers and small embedded system developers. The µC/OS-II
supports preemptive scheduling which is not efficient with respect to processor utilization. As a result, this may lead to missing
deadline of the task assigned and hence may cause system failure. In this paper, a Rate Monotonic scheduling (RM), which is
a better scheduling method when compared to preemptive technique, is implemented on µC/OS-II and its operation in terms of
task execution and processor utilization are discussed. This paper presents the RM Analysis (RMA) on µC/OS-II with two
different types of hardwares: 1) Low end microcontroller i.e 8051 based system and 2). High end system based on ARM9 is
used. Two tasks 1). Advanced encryption standard (AES) and 2) Message display on text and graphic display are taken to
demonstrate the RMA. The software tools Keil IDE, SDCC compiler and Phillips Flash Magic are used for implementation of
tasks on 8051 embedded development board. The ARM developers Suite v1.2 and DNW are used for implementation of tasks
on ARM9 development board. In addition to the above said tasks additional tasks like Real time clock interface, graphical LCD
interface and UART interface for communication with computer is also implemented. The scaled-version of µc/os-ii with multiple
tasks uses 4 kB of flash and 512 bytes of RAM in 8051 board. The entire MUCOS RTOS in ARM9 with multiple tasks uses
29.23 kB of flash and 596.36 kB of RAM. The results obtained indicate optimum utilization of processor with RMA scheduler for
realizing low cost software for developing the application on embedded boards with least software development effort.

Index Terms— Embedded systems, RTOS, Keil IDE, ARM9, AES, µc/os-ii and Microcontroller.

—————————— ——————————

1 INTRODUCTION

R eal-time operating system (RTOS) is useful for de-


veloping the application on embedded boards with
least software development effort. The human effort
of source code with well-documented comments in the
source code. It is a well-tested source code and has been
ported to thousands of devices. It has a built-in preemp-
needed for implementing µc/os-ii is less compared to tive scheduler. But, it does not support a rate-monotonic
other RTOS’s. Among the available RTOS’s µc/os-ii is scheduler. In this paper, it is proposed to implement a
suitable for various controllers and processors, since it is rate-monotonic scheduler in µc/os-ii and will be dis-
low cost and easily available. The µc/os-ii supports cussed in this paper.
preemptive scheduling and not efficient with respect to The microkernel approach is based on the idea of only
processor utilization. placing essential core real-time operating system func-
Processor utilization is a measure of CPU loading. Im- tions in the kernel, and other functionality is designed in
proving the CPU loading is difficult since embedded pro- modules that communicate through the kernel via mi-
cessor need to complete the tasks within the deadlines. nimal well-defined interfaces. The microkernel approach
Rate Monotonic Analysis (RMA) helps to achieve opti- results in easy reconfigurable systems without the need to
mum CPU loading for running real-time tasks with time rebuild the kernel.
deadlines. In RMA, most frequently used task gets high- The µC/OS-II kernel is implemented completely in soft-
est priority. Optimum utilization of resources by meeting ware and is a well-used real-time operating system for
the deadlines is discussed in this paper. embedded systems. It is written as a monolithic kernel in
This paper presents implementation of RMA in µc/os-ii. the language of ANSI C with a minor part in assembler
For this, µc/os-ii is simulated into Keil IDE[2] and RMA for context switching.
code is appended to it. ROM image file is ported into 8051 The paper is organized as follows. Section II describes
based microcontroller flash and tested for scheduling Configurable parameters for µc/os-ii. Section III describes
with RMA. MUCOS RTOS code is also ported in ARM 9 the implementation of scheduler on low-end and high-
board and the performance parameters are discussed. end hardware board. Section IV describes the analysis of
The scaled-version of µc/os-ii with multiple tasks uses 4 results. Section V describes the conclusion of this work.
kB of flash and 512 bytes of RAM in 8051 board. The en-
tire MUCOS RTOS in ARM 9 with multiple tasks uses 1.1 CONFIGURABLE PARAMETERS IN µc/os-ii
29.23 kB of flash and 596.36 kB of RAM. The results indi-
cate optimum utilization of processor with RMA schedu- It is necessary to configure the parameters so that only the
ler for realizing low cost software and hardware for de- required features are built into the target system. The
veloping embedded system. code size is reduced from 10,000 lines to 5,500 lines by
A micro-kernel operating system (µc/os-ii) writ- suitable configuration of parameters.
ten by John J Lebrosse is a freeware for peaceful research
purpose. The source code is written in C language which
is compliant to ANSI ‘c’ format. It has about 10,000 lines
2 International Journal of Scientific & Engineering Research, Volume 1, Issue 1, October-2010

For Complete Paper need to contact:


ijser.editor@ijser.org
IJSER – copyright required from author

Vous aimerez peut-être aussi