Real Time operating System
Real Time operating System
Real time operating System (RTOS) is an operating system that serves the real-time systems. Before understanding the term “Real Time Operating System” we need to understand the two terms it comprises of i.e., Real Time Systems and Operating System.
An Operating system (OS) is simply a program which provides an interface between the hardware and the applications run by the user. It manages the hardware resources of a computer and ensures an easy to work and convenient environment for the end user.
Real-time systems are those systems which are defined not just by the accurate computation of result but also by the specified time constraints and deadlines within which the processing ought to be completed.
Real-time systems are used when there are rigid time requirements like missile systems, air traffic control systems, robots etc.
So, now it can be easily inferred that RTOS is an operating system that supports real-time applications by providing the correct result and, that too, within the deadline required.
Basic structure of RTOS is just like a general OS but it provides some additional mechanisms for the real-time scheduling of tasks.
Based on the strictness of the time constraints, real-time operating systems are classified as:
Hard real-time operating systems:
These operating systems are meant for the applications where time constraints are very strict and even the shortest possible delay is not acceptable.
These are mainly present in the life saving systems like automatic parachutes or air bags which are required to be readily available in case of any accident.
Soft real-time operating systems:
These kinds of operating systems serve the real-time applications in which the time constraints are somewhat less strict and a little amount of delay is acceptable.
For example, Live TV broadcast, Video Conferencing etc. Even if some delay is there, nothing catastrophic is going to happen.
The most widely recognized and common designs are:
Event driven – When an Event of higher priority needs overhauling or servicing just that moment tasks get switched ; called preemptive priority, or priority scheduling.
Time-sharing – On regular timed interrupt or fixed time quantum, and on events tasks get switched; called round robin. It gives smoother multitasking experience to process/user and giving the deception/illusion that the process/user has sole utilisation of resources
These designs mainly deals with three states of the process life cycle
1) Running : when CPU is executing a process, then it is in running state.
2) Ready : When a process has all the required resources and about to perform the Task, but because of the unavailability of CPU, it cannot start the process and it is still not in running state is known as the Ready state.
3) Blocked : when a process does not have all the required resources for execution, then it is in blocked state.
- Cooperative scheduling
- Preemptive scheduling
- Rate-monotonic scheduling
- Round-robin scheduling
- Fixed priority preemptive scheduling
- Fixed-Priority Scheduling with Deferred Preemption
- Fixed-Priority Non-preemptive Scheduling
- Critical section preemptive scheduling
- Static time scheduling
- Earliest Deadline First approach
- Stochastic digraphs with multi-threaded graph traversal
The major functions of the real time operating system are :
1. To meet the application requirements , it has to manage the processor and other system resources.
2. Respond to the system events and Synchronize with it.
3. To maintain the coordination between proccesses, feed data among proccesses efficiently.
Examples of RTOS processing:
1. Airlines reservation system.
2. Air traffic control system.
3. Systems that provide immediate updating.
4. Systems that provide up to the minute information on stock prices.
5. Defense application systems like as RADAR.
Components of RTOS
• The Scheduler: The order in which the tasks can be executed.
• Symmetric Multiprocessing (SMP): Mmultiple tasks managed by RTOS, so that parallel processing can be done.
• Function Library: It is the element of RTOS which acts as a interface so that it can connect kernel and application code. This application code sends the requests to the kernel via function library so that the application can give the desired result.
• Memory Management: Proper memory allocation.
• Fast dispatch latency or context switch time
• User-defined data objects and classes
Applications of Real Time Operating System
• Control systems: Performing calculations so that flight’s movement can be handled.
• Image processing (IP)
• Voice Over IP (VoIP)
Difference between in GPOS and RTOS
|General-Purpose Operating System (GPOS)||Real-Time Operating System (RTOS)|
|1) its for desktop pc, laptop.||
1) its for embedded application.
|2) It uses Process-based Scheduling.||
2) Time-based scheduling like round robin.
|3) Interrupt latency is not considered crucial||3) Interrupt latency is considered crucial. Interrupt lag should be minimal.|
|4) No priority inversion mechanism||4) Priority inversion mechanism can’t be changed by the system itself once its been set.|
|5) Kernel operations may or may not be preempted.||5) Kernel operation can be preempted.|
Disadvantages of Real Time Operating System
- Limited tasks
- Low multi-tasking
- Device driver and interrupt signals
- Low priority of tasks
- Thread priority
- Precision of code
- Complex algorithms
- Use heavy system resources
- Not easy to program
Frequently Asked Questions
- Operating System Concepts ( Multi tasking, multi programming, multi-user, Multi-threading )
- Different Types of Operating Systems
- Batch Operating Systems
- Time sharing operating systems
- Distributed Operating Systems
- Network Operating System
- System Boot
- operating system structure
- System calls
- Computer System organization
- Operating System Generation
- Process Concept
- Operating System Operations- Dual-Mode Operation, Timer
- Operations on Process
- Threads overview