Description: Are you aware of real time operating system that is one of the OS. Here we discuss about real time OS, some commercial RTOS and also their requirements that are needed.
Real Time Operating Systems: An Operating System
Did you know that there is RTOS (Real Time Operating System) that is also known as Embedded System. A real-time system is an operating system whose correctness involves both the logical correctness of outputs and their timeliness. It must satisfy response-time constraints or risk severe consequences including failure. Real-time systems are classified as hard, firm or soft systems. In hard real-time systems, failure to meet response-time constraints leads to system failure. Firm real-time systems have hard deadlines, but where a certain low probability of missing a deadline can be tolerated. Systems in which performance is degraded but not destroyed by failure to meet response time constraints are called soft real-time systems.
The design of a real-time operating system is essentially a balance between providing a reasonably rich feature set for application development and deployment and, not sacrificing predictability and timeliness. It observes that the choice of an operating system is important in designing a real-time system. Designing a real-time system involves choice of a proper language, task partitioning and merging, and assigning priorities to manage response times. Language synchronization primitives such as Schedule, Signal and Wait simplify translation of design to code and also offer portability.
Some Features of RTOS
The desirable features of an RTOS include the ability to schedule tasks and meet deadlines, ease of incorporating external hardware, error recovery, low task switching latency, small footprint and overheads. The kernel is the core of an OS that provides task scheduling, task dispatching and inter-task communication. Usually the kernel can serve as an RTOS while commercial RTOSs like those used for air-traffic control systems require all of the functionalities of a general purpose OS.
The OS has to provide
- Task management (scheduling, dispatching, creation and termination of tasks etc.)
- Synchronization (for resource sharing)
- Interrupt handling (manipulate and monitor the interrupt descriptor table-IDT) to service hardware interrupts)
- Memory management (virtual memory and dynamic memory allocation)
- Programmable clocks and timers
- Inter-task communication (sockets, pipes, FIFO, shared memory etc.).
Commercial Real Time OS
In this we select a prominent commercial real time operating system for each class of real-time application. For small memory devices Windows CE has been discussed, for hard real-time systems Lynx OS, for embedded applications Vx-Works, Jbed for the Java platform and pSOS for an object-oriented operating system.
Requirements needed for Real time Operating System
The following are the basic requirements of an RTOS:
(i) Multi-tasking: To support multiple tasks in real-time applications, an RTOS must be multi-tasking. The scheduler should be able to preempt any task in the system and give the resource to the task that needs it most. An RTOS should also handle multiple levels of interrupts to handle multiple priority levels.
(ii) Dynamic deadline identification: In order to achieve preemption, an RTOS should be able to dynamically identify the task with the earliest deadline. To handle deadlines, deadline information may be converted to priority levels that are used for resource allocation. Although such an approach is error prone, nonetheless it is employed for lack of a better solution.
(iii) Predictable synchronization: For multiple threads to communicate among themselves in a timely fashion, predictable inter-task communication and synchronization mechanisms are required. Ability to lock/unlock resources is one of the ways to achieve data integrity. To illustrate this point, Java methods can be declared with the keyword synchronized.
(iv) Sufficient Priority Levels: When using prioritized task scheduling, the RTOS must have a sufficient number of priority levels, for effective implementation. The scheduler makes the priority of the accessing task equal to that of the resource. After a task releases a resource, its priority is returned to its original value. However, when a task’s priority is increased to access a resource it should not have been waiting on another resource.
In this article, we get to know about the basic requirements of an RTOS. Designing an embedded system using an RTOS may help lower cost and the time to market. If an application has real-time requirements, an RTOS provides a deterministic framework for code development and portability. To meet the needs of commercial multimedia applications, low code size and high peripheral integration is needed.
Reliability in complex real-time systems could be achieved using multilevel specifications that check the correctness of systems at compile-time and run-time. This is continuing to investigate a few more RTOSs of interest.