What is a Real-Time Operating System (RTOS)?
A Real-Time Operating System (RTOS) is an Operating System which can guarantee execution of different tasks on one or more processors within a specified time. Real-Time Operating Systems execute Real-Time tasks, typically used in industrial control, defense, aerospace, automobile and medical applications. Few of the popular Real-Time Operating Systems include VxWorks, Integrity, PikeOS, FreeRTOS, LynxOS, Micrium, Real-Time Linux and Keil RTX. The design of RTOS differs from GPOS in the implementation of scheduling policies and handling of interrupts. The task schedulers implemented in RTOS provide more control to the developers over assigning priorities.
Features of Real-Time Linux
Linux kernel gets Real-Time capabilities with the inclusion Preempt RT patch. This link provides a step-by-step guide on how to build fully preemptible Real-Time Linux kernel using Preempt RT patch and how to build a simple Real-Time application. The Real-Time Linux project was initiated to coordinate the efforts around mainlining Preempt RT. The Real-Time Linux kernel implements several scheduling policies. They are divided into non real-time and real-time policies. SCHED_OTHER, SCHED_IDLE, SCHED_BATCH are the normal scheduling policies and SCHED_FIFO, SCHED_RR, SCHED_DEADLINE are Real-Time policies available in Linux kernel.
So if you want to use Linux to control an industrial welding laser,
I have no problem with your using PREEMPT_RT."
The POSIX API provides the interface for developing Real-Time applications running under Preempt RT. The scheduling policy as well as the priority must be set by the application developer explicitly.
How Real-Time Linux is Better?
It is Free of Cost. Real-time Linux is open-source with a GNU General Public License (GPL). Commercial RTOSs offer a variety of proprietary licenses. The purchase of commercial RTOS (includes licenses, BSPs, tools and support) typically involves huge amount of cash, which may be tremendous for small to middle scale firms. Moreover, the purchased licenses expire after specified duration and need to be renewed. Real-time Linux can be used, modified and installed on multiple devices without paying a cent.
It is Open Source. Real-time Linux is open source, whereas commercial RTOSs are typically closed source. Since it is open-source, the Real-Time features in Linux are heavily tested, researched and improved. Similarly, the application developers get a lot of freedom to modify its source to meet user requirements.
It has Comparable Real-Time Performance. The Real-Time performance of different RTOSs can be compared by measuring latencies in task switching and interrupt handling. Although, Linux was developed as GPOS and Real-Time features were added later in the kernel, research has shown that the performance of Real-Time Linux is comparable to commercial RTOSs. The Preempt RT patch implements various Real-Time mechanisms in vanilla Linux kernel, making it a good choice for embedded Real-Time applications.
It has Extensive Hardware Support. A wide range of hardware vendors support Real-Time Linux, understanding its popularity and open-source model.
It has Superior IDE and Tool Support. Real-Time Linux supports a huge range of Integrated Development Environments (IDEs) and tools. For developers, Real-Time Linux offers familiar and efficient GNU utilities, best CLI interface, all popular IDEs and POSIX compliant APIs.
It has Small Kernel Size. A lot of effort has been made to reduce Embedded and Real-Time Linux kernel size and boot time. Various configuration settings are available for reducing kernel size during build time. If you know your board, you can build Real-Time Linux kernel as small as 1 Mega Byte.
It has Simple Development Setup. In a typical setup, development is carried out on general purpose computers running standard Linux, Windows or Mac. The developed application is cross-compiled to be run and tested on target platform powered by a RTOS. One advantage of using Real-Time Linux on target board and standard Linux on development workstation is that many features of developed application may be tested on workstation itself without the need of target board. If there are enough resources on target embedded system, some developers prefer to carry out development directly on target system, to avoid the hassle of setting up host / target configuration.
It has Extensive Documentation. Since Real-Time Linux is well-known and open source, it has exhaustive documentation and online help available. This link provides necessary documentation to quick start the development of Real-Time application using Real-Time Linux.
Conclusion
The Real-Time Linux kernel seems promising for a wide range of applications, due to the benefits specified above. As it is free of cost, any application can be developed and tested using Real-Time Linux at first, before purchasing costly licenses for a commercial RTOS. Real-Time Linux is highly suitable for small to medium firms with limited budget, and in cases where strict safety certifications are not mandatory.
Comments
Post a Comment