24-12-2012, 01:31 PM
A Seminar Report On REAL TIME OPERATING SYSTEM
1REAL TIME.docx (Size: 1.59 MB / Downloads: 64)
ABSTRACT
A real-time operating system (RTOS) is an operating system (OS) intended for real-time applications. Such operating systems serve application requests nearly real-time. A real-time operating system offers programmers more control over process priorities. ...
Real time Operating System is the key to many embedded systems and provides a platform to built application.
The heart of this embedded systems are real time operating system.
The real time operating system differ from the general purpose operating system in terms of timing behavior , output and in terms of application as well.
Based on the degree of tolerance in meeting deadlines Real Time Operating System is classified into 3 categories :
1. Hard Real Time Operating System.
2. Firm Real Time Operating System. And
3. Soft Real Time Operating System.
The features of Real Time Operating System are Multithreading and Preemptivity, Task priority, Priority inheritance , control memory management , etc.
The Architecture of Real Time Operating System includes Kernal , Task management, Schedular, Dispatcher, Task Syncronization, etc.
The Real Time Operating System is used in control of TV and washing machine, control of automobile engine, air conditioners , control of flights etc.
INTRODUCTON
Suppose a person is driving a car on a highway at a speed of 70 miles per hour. Now, somehow the car meets with an accident. Fortunately the airbag deployed at the right time and saved the life of the driver.
So, we see that airbag is a very good feature in a car which can save a life someday. But, did we think what would have happened if the airbag would have deployed a few seconds late? Yes, we would have lost a life. So just imagine the dependency on the accuracy of opening of the airbag.
So, what makes that airbag deploy at the right time? Well, welcome to the world of RTOS
RTOS stands for Real time operating systems.
A Real-Time Operating System (RTOS) comprises of two components, viz., “Real-Time” and “Operating System”.
An Operating system (OS) is nothing but a collection of system calls or functions which provides an interface between hardware and application programs. It manages the hardware resources of a computer and hosting applications that run on the computer. An OS typically provides multitasking, synchronization, Interrupt and Event Handling, Input/ Output, Inter-task Communication, Timers and Clocks and Memory Management. Core of the OS is the Kernel which is typically a small, highly optimised set of libraries.
Real-time systems are those systems in which the correctness of the system depends not only on the logical result of computation, but also on the time at which the results are produced.
DIFFERENCE: RTOS v/s GENERAL PURPOSE OS
Determinism:
The key difference between general-computing operating systems and real-time operating systems is the “deterministic " timing behavior in the real-time operating systems. "Deterministic" timing means that OS consume only known and expected amounts of time. RTOS have their worst case latency defined. Latency is not of a concern for General Purpose OS.
Task scheduling:
General purpose operating systems are optimized to run a variety of applications and processes simultaneously, thereby ensuring that all tasks receive at least some processing time. As a consequence, low-priority tasks may have their priority boosted above other higher priority tasks, which the designer may not want. However, RTOS uses priority-based preemptive scheduling, which allows high-priority threads to meet their deadlines consistently. All system calls are deterministic, implying time bounded operation for all operations and ISRs. This is important for embedded systems where delay could cause a safety hazard. The scheduling in RTOS is time based. In case of General purpose OS, like Windows/Linux, scheduling is process based.
Hard Real Time Operating System :
These type of RTOS strictly adhere to the deadline associated with the tasks. Missing on a deadline can have catastrophic affects. The air-bag example we discussed in the beginning of this article is example of a hard RTOS as missing a deadline there could cause a life.
Firm Real Time Operating System :
These type of RTOS are also required to adhere to the deadlines because missing a deadline may not cause a catastrophic affect but could cause undesired affects, like a huge reduction in quality of a product which is highly undesired.
Soft Real Time Operating System
In these type of RTOS, missing a deadline is acceptable. For example On-line Databases.
For a life saving device, automatic parachute opening device for skydivers, delay can be fatal. Parachute opening device deploys the parachute at a specific altitude based on various conditions. If it fails to respond in specified time, parachute may not get deployed at all leading to casualty. Similar situation exists during inflation of air bags, used in cars, at the time of accident. If airbags don’t get inflated at appropriate time, it may be fatal for a driver. So such systems must be hard real time systems, whereas for TV live broadcast, delay can be acceptable. In such cases, soft real time systems can be used.
FEATURES OF RTOS
The design of an RTOS is essentially a balance between providing a reasonably rich feature set for application development and deployment and, not sacrificing predictability and timeliness. A basic RTOS will be equipped with the following features :
i.Multitasking and Preemptibility :
An RTOS must be multi-tasked and preemptible to support multiple tasks in real-time 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.
ii. Task Priority :
Preemption defines the capability to identify the task that needs a resource the most and allocates it the control to obtain the resource. In RTOS, such capability is achieved by assigning individual task with the appropriate priority level. Thus,
it is important for RTOS to be equipped with this feature.
iii. Reliable and 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.
iv. Priority Inheritance:
To allow applications with stringent priority requirements to be implemented, RTOS must have a sufficient number of priority levels when using priority scheduling.
v. Predefined Short Latencies:
An RTOS needs to have accurately defined short timing of its system calls. The behavior metrics are:
• 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.
CONCLUSION
Real time Operating systems play a major role in the field of embedded systems especially for mission critical applications are involved. Selection of a particular RTOS for an application can be made only after a thorough study of the features provided by the RTOS. Since IC memories are getting denser scaled down versions of general operating systems are able to compete with traditional Real Time Operating Systems for the embedded product market. The choice of Operating System generally comes after the selection of the processor and development tools. Every RTOS is associated with a finite set of microprocessors and a suite of development tools.
Hence the first step in choosing an RTOS must be to make the processor, real-time performance and the budget requirements clear. Then look at the available RTOS to identify the one which suits our application.