Topics Covered What is Real Time Operating System (RTOS)

Slides:



Advertisements
Similar presentations
A Sample RTOS Presentation 4 Group A4: Sean Hudson, Manasi Kapadia Syeda Taib.
Advertisements

Real-Time Library: RTX
Computer Systems/Operating Systems - Class 8
04/14/2008CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
CSE Fall Introduction - 1 What is an Embedded Systems  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)
Concurrency: Mutual Exclusion, Synchronization, Deadlock, and Starvation in Representative Operating Systems.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
MicroC/OS-II Embedded Systems Design and Implementation.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
1 Previous lecture review n Out of basic scheduling techniques none is a clear winner: u FCFS - simple but unfair u RR - more overhead than FCFS may not.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Real Time Operating Systems Lecture 10 David Andrews
Real-Time Systems Design1 Priority Inversion When a low-priority task blocks a higher-priority one, a priority inversion is said to occur Assume that priorities:
2-1 The critical section –A piece of code which cannot be interrupted during execution Cases of critical sections –Modifying a block of memory shared by.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CE Operating Systems Lecture 11 Windows – Object manager and process management.
Real Time Operating Systems
What Every Developer Should Know about the Kernel Dr. Michael L. Collard 1.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
Overview Task State Diagram Task Priority Idle Hook AND Co-Routines
RTX - 51 Objectives  Resources needed  Architecture  Components of RTX-51 - Task - Memory pools - Mail box - Signals.
ECGR-6185 µC/OS II Nayana Rao University of North Carolina at Charlotte.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
MicroC/OS-II S O T R.  MicroC/OS-II (commonly termed as µC/OS- II or uC/OS-II), is the acronym for Micro-Controller Operating Systems Version 2.  It.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
 Wind River Systems, Inc Chapter - 7 Intertask Communication.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
6.0 INTRODUCTION TO REAL-TIME OPERATING SYSTEMS (RTOS) 6.0 Introduction A more complex software architecture is needed to handle multiple tasks, coordination,
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
Where Testing Fails …. Problem Areas Stack Overflow Race Conditions Deadlock Timing Reentrancy.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Outlines  Introduction  Kernel Structure  Porting.
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
Real-Time Operating Systems RTOS For Embedded systems.
REAL-TIME OPERATING SYSTEMS
Module 12: I/O Systems I/O hardware Application I/O Interface
Processes and threads.
Process concept.
Real time systems RTS Engineering.
6.0 INTRODUCTION TO REAL-TIME OPERATING SYSTEMS (RTOS/RTK)
Applied Operating System Concepts -
REAL TIME OPERATING SYSTEM
Getting Started with the µC/OS-III Real Time Kernel
An Embedded Software Primer
Real-Time Operating Systems
Threads, SMP, and Microkernels
Computer System Overview
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Real-Time Operating Systems
Last Week Introduced operating systems Discussed the Kernel
Lecture 4- Threads, SMP, and Microkernels
EE 472 – Embedded Systems Dr. Shwetak Patel.
Computer Science & Engineering Electrical Engineering
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 10 Multiprocessor and Real-Time Scheduling
Intertask Communication
Real-Time Process Scheduling Concepts, Design and Implementations
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Process State Model -Compiled by Sheetal for CSIT
Real-Time Process Scheduling Concepts, Design and Implementations
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Topics Covered 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

What is Real Time OS (RTOS) RTOS Characteristics Processing must be done within a time constraint or the system will fail. All delays in the system will be bounded; from the retrieval of stored data to the time RTOS finishes the request. Types of RTOS Hard RTOS Soft RTOS

Standard for RTOS Standard requirement for RTOS POSIX 1003.1b by ISO/IEEE chapter. POSIX interfaces: Queued signals Scheduling Clocks and timers Asynchronous I/O Semaphore Message queues Memory management

VxWorks OS as RTOS

Real-Time Embedded Application Layer Structure Real-Time Embedded Application Internet Graphics Multiprocessing Java Support POSIX Library File System WindNet Networking Core OS: Wind Microkernal

Multitasking P R D S Ready – wait for CPU, Suspended – used primarily for debugging Ready – wait for CPU, a single primitive=create+activate Pended – blocked, wait t time for recourses. After t - Error. Delay – asleep for t time, after t goes to ready state. On a context switch, a task’s context is saved in TCB. All code executes in a single common space. Memory isn’t saved.

Scheduling, One CPU Priority-based preemptive scheduling Each task has priority (from 0 - highest to 255 - lowest). Each priority has its own queue. If two tasks are in the ready state, a lower priority task would be pre-empted by one of a higher priority. Round-robin scheduling After time slice for a task expires, another task with the same priority will execute during the given time slice. Preemption locks These locks prevent task context switching, but do not prevent interrupt handling.

Interrupt Service Code Via interrupts, the system is informed of external events. Interrupt Service Routines (ISRs) run outside any task context. Interrupt handling involves no task context switch. Limitations of ISR: All ISRs share the same stack ISR has no context that can be suspended Cannot take the semaphore, but can give the semaphores, releasing any task waiting on them. Cannot perform I/O through drivers except pipe.

Shared Code and Reentrancy Shared Code - a single copy of code executed by multiple tasks. Shared Code must be reentrant. A subroutine is reentrant if a single copy of the routine can be called simultaneously from several task contexts without conflict. Reentrancy Techniques: Dynamic Stack Variables Global and Static Variables Guarded by Semaphores Task Variables

Shared Code and Reentrancy, Continued Dynamic Stack Variables Task Stacks Common Function Tasks Task1( ){ ….. comFun(myData1) } myData1 comFun(yourData){ } Task2( ){ ….. comFun(myData2) } myData2

Shard Code and Reentrancy, Continued 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).

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

Intertask Communication, Shared Data Tasks Memory Access SharData 1. Access SharData SharData 2. Access SharData 3.

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

Special Semaphore Option (Not in POSIX) Semaphores, Continued Counting Semaphore Every time is semaphore is given count ++ Every time is semaphore is taken count -- If count=0, task that tried to take semaphore is blocked If semaphore is given and task is blocked, task is unblocked Is semaphore is given and no tasks are blocked, count ++ Special Semaphore Option (Not in POSIX) Timeout Time the task is willing to wait (time in ticks) in pended state. If time > timeout, ERROR occurs.

Intertask Communication, Message Queue 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.

Applications for VxWorks Some usage of RTOS Flight simulators Radio and optical telescopes Navigation systems Deep sea instrumentation Traffic control systems Modems Printers Digital cameras Hand-held computing devices Routers, switches, and other network devices … any systems where rigid time requirement have been placed on the operation of a processor or the flow of the data.

Thank You Any Questions ?

Bibliography VxWorks 5.4 Programmer Guide