You are on page 1of 25

REAL TIME OPERATING SYSTEM PROGRAMMING-II

COS AND VXWORKS BY N.SRG PERUMAL AP,HoD ECE SUDHARSAN ENGINEERING COLLEGE

Developer
O Developed by Jean J. Labrosse

Jean J. Labrosse designed it in 1992 C/OS-II name derives from MicroController Operating System

Characteristics
Multitasking Deterministic Portable as ROM image Scalable Preemptive RTOS Different Platforms support O Full source code availability O www.micrium.com Elegantly and very well documented in the book by its designer

Basic Feature
O Scalable OS only needed OS functions

become part of the application codes O Configuration file includes the user definitions for needed functions O Multitasking preemptive scheduler O Elegant code

Basic Feature
O It has a pre-certifiable software component

for safety critical systems, including avionics system clockA DO-178B and EUROCAE ED-12B, medical FDA 510(k), and IEC 61058 standard for transportation and nuclear systems, respectively O Source code has been certified by Department of Defense, USA for use in Avionics and in medical applications.

Applications
O Automotive, O avionics, O consumer electronics, O medical devices, O military, O aerospace,

O networking, and

systems-on-a-chip.

MUCOS real time kernel additional support


C/BuildingBlocks [an embedded system

building blocks (software components) for hardware peripherals, for example clock (C/Clk) and LCD (C/LCD)] C/FL (an embedded flesh memory loader) C/FS (an embedded memory file system) C/GUI (an embedded GUI platform), C/Probe (a real time monitoring tool),

continued.
O C/TCP-IP (an embedded TCP/IP stack), O C/CAN (an embedded Controller Area O Network bus) O C/MOD (an embedded Modbus ) and O C/USB device and C/USB host (an O embedded USB devices framework).

Code Language
O C and CPU Specific Codes in

Assembly

Source Files
O Master Header file, which has the #includes and

O O O O O O O

Processor dependent source files and ucos.ii.h and ucos.ii.c files os_cfg.h for Kernel building configuration file and os_cpu.h a header file for preprocessor definitions os_tick.c timer related codes file os_cpu_c. c preprocessor C Codes os_cpu_a.s12 An example of assembly codes file for 68HC12 os_mem.c for memory functions os_sem.c, os_mbox.c and os_q.c for semaphores, mailbox and queues

Macros
O OS_NO_ERR a MUCOS macro that

returns true in case no error is reported from a function O OS_MAX_TASKS user definable constant for specifying maximum number of tasks in user application

MUCOS Basic Functions


O System Level OS initiate, start, system

timer set, ISR enter and exit Task Service Functions create, run, suspend, resume, .. Task delay Memory allocation, partitioning

Continued.
O IPCs Semaphore, Queue and Mailbox O Same Semaphore function usable as O event flag, resource key and counting O semaphore O Mailbox one message pointer per O mailbox

O Queue permit array of message-pointers

VxWorks
O 1. VxWorks Features O

WindRiver High-performance, Unix-like,multitasking Environment scalable and hierarchical RTOS Host and target based development approach Supports Device Software Optimization a new methodology that enables development and running of device software faster, better and more reliably

VxWorks RTOS Kernel


O VxWorks 6.x processor abstractionlayer

The layer enables application design for new versions later by just changing the layer-hardware interface Supports advanced processor architectures ARM, ColdFire, MIPS,Intel

VxWorks RTOS Kernel


O Hard real time applications

Supports kernel mode execution of tasks Supports open source Linux and TIPC (transparent inter process communication) protocol

VxWorks RTOS Kernel


O Provides for the preemption points at kernel

Provides preemptive as well as round robin scheduling, Support POSIX standard asynchronous IOs Support UNIX standard buffered I/Os O Separate context for tasks and ISRs [Each task has a separate TCB, while ISRs a common stack]

O Schedules the ISRs separately and has

special functions for interrupt handling O Watchdog timers O Virtual I/O devices including the pipes and sockets (Sections 7.14 and 7.15) O Virtual Memory Management functions

VxWorks RTOS Kernel


O Power management functions that

enhance the ability to control power consumption O Automatic detection and reporting of common memory and other errors O Interconnect functions that support large number of protocols O APIs for IPv4/IPv6 dual mode stack

Host-Target Development Approach


Host Windows, Linux or Unix for Embedded Development and cross compiled for target system processor O RTOS ROM resident code downloaded to the using TCP/IP or serial port to a target board O Target has no virtual memory support and needed kernel functions are at the target ROM

Scalability
O Scalable OS only needed OS functions

become part of the application codes O Configuration file includes the user definitions for the needed IPC functions needed

Protected Environment
O Protection features for example, if a task

is expecting a message from another task, which is being deleted by using the taskdelete function, then RTOS inhibits the deletion No priority inversion problem the task gets an inherited priority when option of priority inheritance selected

Header Files
VxWorks.h header file kernelLib.h kernel library functions header file taskLib.h tasks library functions header file sysLib.h system library functions header file

VxWorks Basic Functions


O System Level OS initiate, start, system

timer clock rate set, ISR enter and exit, enable and disable Task Service Functions initiate,resume, activate, run, suspend, (now or after delay) Task control functions

VxWorks Basic Functions


O IPCs Semaphore, Queue and

Pipes,POSIX IPCs No Mailbox Queue permit array of messages Network Functions IO Functions

You might also like