Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Micro C Os Ii

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

MICRO C/OS II

INTRODUCTION:
Based on the source code written for μC/OS, and introduced as a commercial product in 1998,
μC/OS-II is a portable, ROM-able, scalable, preemptive, real-time, deterministic, multitasking kernel
for microprocessors, and digital signal processors (DSPs). It manages up to 64 tasks. Its size can be
scaled (between 5 and 24 Kbytes) to only contain the features needed for a given use. Most of μC/OS-
II is written in highly portable ANSI C, with target microprocessor-specific code written in assembly
language.
FEATURES:
 It is very small real time kernel.
 Memory footprint is only 20KB for a fully functional kernel.
 Highly portable, scalable, preemptive real-time, multi-tasking kernel.
 It can manage up to 64 tasks (56 user tasks available).
 It has connectivity with MicroC/GUI and MicroC/FS.
 It is ported to more than 100 microprocessors and microcontrollers.
 It is simple to use and simple to implement.
 Very effective compared to the price/performance ratio.
 It supports all types of processors from 8-64 bits.
ARCHITECTURE:

(Figure.1)
TASK STATE:
It is a multitasking OS. Each task is an infinite loop and can be in any one of the following five states,
 Dormant
 Ready
 Running
 Waiting
 Interrupt Service Routine (ISR)
(Figure.2)
TASK MANAGEMENT:
 After the task is created, the task has to get a stack in which it will store its data.
 A stack must consist of contiguous memory locations.
 It is necessary to determine how much stack space a task actually uses.
 Deleting a task means the task will be returned to its dormant state and does not mean that the
code for the task will be deleted. The calling task can delete itself.
 If another task tries to delete the current task, the resources are not freed and thus are lost. So
the task has to delete itself it uses its resources.
 A task can obtain information about itself or other tasks.
MEMORY MANAGEMENT:
 Each memory partition consists of several fixed sized memory blocks.
 A task obtains memory blocks from the memory partition. A task must create a memory
partition before it can be used.
 Allocation and deallocation of these fixed sized memory blocks is done in constant time and
is deterministic.
 Multiple memory partitions can exist, so a task can obtain memory blocks of different sizes.
TIME MANAGEMENT:
 A clock tick is periodic time source to keep track of time delays and time outs.
 Here, tick intervals vary from 10-100ms.
 The faster the tick rate, the higher the overhead imposed on the system.
 A task can be delayed and a delayed task can also be resumed.
INTER TASK COMMUNICATION:
 Inter task or inter communication in MicroC/OS takes place using,
1. Semaphores
2. Message mailbox
3. Message queues
 Task and Interrupt Service Routines, the interact with each other through an ECB (Event
Control Block).
APPLICATIONS:
 Used in embedded systems.
 Task states
 Kernels
 Assigning and managing tasks
 Managing memory and time
 Communication between tasks.

You might also like