Sie sind auf Seite 1von 23

REAL TIME OPERATING SYSTEMS

OUTLINE
Real Time Systems Classification of Real Time Systems Operating Systems Basics What is the need of RTOS Features of RTOS Differences between GPOS & RTOS RTOS Examples

WHAT IS A REAL TIME SYSTEM

A real-time system is any information processing system which has to respond to externally generated input stimuli within a finite and specified period.
the correctness depends not only on the logical result but also the time it was delivered. failure to respond is as bad as the wrong response. Examples: Flight Control System, Anti-lock Brakes Systems, GPS, Railway Signaling, ATM, Vending Machine, Mobile Phones, Mp3 Players,.

REAL TIME SYSTEMS

REAL TIME SYSTEMS

REAL TIME SYSTEMS - CLASSIFICATION

Hard Real Time Systems Soft Real Time Systems Firm Real Time Systems

HARD REAL TIME SYSTEMS


An overrun in response time leads to potential loss of life and/or big financial damage. Many of these systems are considered to be safety critical. Examples : Flight Control Systems, Space Missions, Railway Signaling System etc

SOFT REAL TIME SYSTEM


Deadline overruns are tolerable, but not desired. System performance degrades as more & more jobs (process) miss deadlines. There are no catastrophic consequences of missing one or more deadlines. Examples : Online Transactions, Mp3 players, Mobile Phones, Vending Machines, digital TV transmissions, cable and digital TV set-top-boxes, video conferencing, TV broadcasting, gaming equipment etc.

FIRM REAL TIME SYSTEM


The computation is obsolete if the job is not finished on time. Cost may be interpreted as loss of revenue. Example : Forecast System

WHAT IS AN OPERATING SYSTEM


A program that acts as an intermediary between a user and hardware of the computer. It organizes and controls the hardware and it is that piece of software that turns the collection of hardware blocks into a powerful computing tool. The tasks of an OS are:

Process Management Memory & Storage Management Device Management File Management

REAL TIME OPERATING SYSTEM


Real-time computing is where system correctness not only depends on the correctness of logical result but also on the result delivery time. So the Real Time Operating system should have features to support this critical requirement. The RTOS should have predictable behavior to unpredictable external events. A true RTOS will be deterministic under all conditions. These operating systems occupy little space from 10 KB to 100KB as compared to the General Operating systems which take hundreds of megabytes.

WHY OPERATING SYSTEMS FOR REAL-TIME APPLICATIONS?


Operating system is not a required component of any computing system. Example : Microwave Oven As the complexity of applications expands beyond simple tasks the benefits of an operating system far outweighs the associated costs. Since embedded systems (PDAs, cell phones, VCRs, industrial robot control) are becoming more complex hardware-wise with every generation, and more features are put into them in each iteration. Real-time Operating System allows real-time applications to be designed and expanded easily. The use of an RTOS simplifies the design process by splitting the application code into separate tasks.

SOME DEFINITIONS

Process : A program under execution Thread : A light weight process. A thread inherits the context of the process but uses only a subset of it so that switching between threads can be done quickly. Task: Task is the basic building block of software written under an RTOS. Each task in RTOS is in one of the following three states:
Running : The microprocessor is executing the instruction that make up this task. Ready : means that some other task is running but this task has things that it could do if processor becomes available. Blocked : This task has nothing to do right now even if microprocessor becomes available. Tasks get into this state because they are waiting for some external event.

Preemption: Preemption defines the capability to identify the task that needs a resource the most and allocates it the control to obtain the resource. Context Switching : The actual process of changing from one task to another is called a context switch. Scheduler : This piece of the operating system decides which of the ready tasks has the right to use the processor (go into running state) at a given time. There are many scheduling algorithms:

First in First Out Shortest job first Round robin Fixed priority pre-emptive scheduling

FEATURES OF A RTOS
Multitasking

and Preemptibility An RTOS must be multi-tasked and preemptible to support multiple tasks in realtime applications. The scheduler should be able to preempt any task in the system and allocate the resource to the task that needs it most even at peak load. Task Priority A good embedded RTOS should have provision for lot of priority levels. A number of high priority levels have to be dedicated to the system processes and threads.

Reliable & Sufficient Inter task Communication Mechanism For multiple tasks to communicate in a timely manner and to ensure data integrity among each other, reliable and sufficient inter-task communication and synchronization mechanisms are required. Control of Memory Management To ensure predictable response to an interrupt, an RTOS should provide way for task to lock its code and data into memory.

Predefined Short Latencies An RTOS needs to have accurately defined short timing of its system calls. Task switching latency: The time needed to save the context of a currently executing task and switching to another task is desirable to be short. Interrupt latency: The time elapsed between execution of the last instruction of the interrupted task and the first instruction in the interrupt handler. Interrupt dispatch latency. The time from the last instruction in the interrupt handler to the next task scheduled to run.

Scheduling

in RTOS

Fixed priority pre-emptive scheduling The OS assigns a fixed priority rank to every process, and the scheduler arranges the processes in the ready queue in order of their priority. Lower priority processes get interrupted by incoming higher priority processes.

Overhead is not minimal, nor is it significant. FPPS has no particular advantage in terms of throughput . Waiting time and response time depend on the priority of the process. Higher priority processes have smaller waiting and response times. Deadlines can be met by giving processes with deadlines a higher priority. Starvation of lower priority processes is possible with large amounts of high priority processes queuing for CPU time.

RTOS V/S GPOS


GPOS

Used for systems/applications that are not time critical. Scheduling based on High throughput. Too heavy & demands very high end hardware configurations. Unbounded latency Windows, Linux, Mac OS

RTOS Used for time critical systems. Priority based scheduling. RTOS is light weight and small in size. Bounded latency. RTX, QNX, VRTX, Windows CE, SYM/BIOS (specifically for DSP processors)

RTOS EXAMPLES
SYS/BIOS Created and offered by Texas Instruments (TI) . Use in a wide range of their embedded processors. It supports TMS 320 series, ARM etc. SYS/BIOS is a component of TIs Code Composer Studio integrated development environment. SYS/BIOS provides a wide range of system services to an embedded application such as preemptive multitasking, memory management and real-time analysis.

Windows CE 3.0 It is an Operating system rich in features and is available for a variety of hardware platforms. It exhibits true real-time behavior most of the times. But the thread creation and deletion has periodic delays of more than 1 millisecond occurring every second. The system is complex and highly configurable. The documentation does not give in depth knowledge about inner workings of the system though the APIs are well documented. The system is robust and no memory leak occurs even under stressed conditions.

REFERENCES
http://documentation.renesas.com http://en.wikipedia.org Real time Systems, Lecture Stefan M. Petters http://www.chibios.org/RTOS Concepts A textbook on Embedded System: Architecture, Programming and Design, Raj Kamal

Embedded Operating Systems for Real-Time Applications, IIT Bombay Seminar report

Das könnte Ihnen auch gefallen