Sunteți pe pagina 1din 19

Satish M 11891D5509

What is Real Time Operating System (RTOS)

Standard for RTOS


VxWorks Features as RTOS Layer Structure

Microkernal Functions:
Multitasking Scheduling Interrupt Service Code Shared Code and Reentrancy Intertask Communications Applications for VxWorks
2

RTOS Characteristics Types of RTOS

Standard requirement for RTOS


POSIX 1003.1b POSIX interfaces: Asynchronous I/O Semaphore Queued signals Scheduling Clocks and timers

Message queues

Memory management
4

Real-Time Embedded Application Internet File System

Graphics Java Support

Multiprocessing POSIX Library

WindNet Networking
Core OS: Wind Microkernal
6

R
S

Suspended

Ready Pended Delay


7

Priority-based preemptive scheduling

Round-robin scheduling

Preemption locks
8

Interrupt Service Routines (ISRs)

Limitations of ISR

Shared Code
tasks.

- a single copy of code executed by multiple

Reentrancy Techniques:
Dynamic Stack Variables

Global and Static Variables Guarded by Semaphores


Task Variables

10

Dynamic Stack Variables Tasks


Task1( ){ .. comFun(myData1) }

Task Stacks myData1

Common Function

comFun(yourData){

}
Task2( ){ .. comFun(myData2) }

myData2
11

Guarded Global and Static Variables Mutual-exclusion mechanism - only one task at a time can be in a critical section of the code. Task Variables Four byte variables are added to the task context block (TCB).

12

Types of Intertask Communications: Shared Data Message Queue Pipes - Virtual I/0 Network Intertask Communication Sockets Remote Procedure Call

13

Tasks
1. Access SharData

Memory

2.

Access SharData

SharData

3.

Access SharData

14

Allows a variable number of messages to be queued Any task or ISR can send a message to a queue. Multiple tasks can send and receive from the same message queue. Timeout Parameter: Send message: how long to wait for buffer space to place message.

Receive message: how long to wait to obtain message.

15

Semaphore - mechanism for mutual exclusion and intertask communication. Binary Semaphore
Semaphore available YES Task cont. Semaphore taken NO TimeOut= No_Wait YES Task cont. Semaphore not taken
16

NO

Task is pended for timeOut

Counting Semaphore

Special Semaphore Option

Timeout

Time the task is willing to wait (time in ticks) in pended state. If time > timeout, ERROR occurs.

17

Some usage of RTOS


Flight simulators Printers Digital cameras Hand-held computing devices Routers, switches, and other network devices

Radio and optical telescopes


Navigation systems Deep sea instrumentation

Traffic control systems


Modems

18

www.google.com

19

S-ar putea să vă placă și