Real-time operating systems (RTOS) are employed in situations where a great number of events, most of which are external to the computer system, must be accepted and processed quickly or under tight deadlines. Industrial control, telephone switching equipment, aircraft control, and real-time simulations are examples of such uses. The processing time of an RTOS is measured in tenths of seconds.
This system is time-limited and has a set end date. In this form of system, processing must take place within the limits set out. Otherwise, the system will be brought to a halt.
Airline traffic control systems, Command Control Systems, Airlines reservation systems, Heart Peacemaker, Network Multimedia Systems, Robots, and other real-time operating systems are examples.
There are three types of real-time operating systems:
- Hard real-time operating systems ensure that key tasks are accomplished within a certain amount of time.
A robot, for example, is employed to weld a car body. The automobile cannot be sold if the robot welds too early or too late, hence it is a difficult real-time system that demands complete car welding by robot almost on time.
- Soft real-time operating system: This operating system allows for some time flexibility. Multimedia systems, digital audio systems, and so on. In real-time systems, explicit, programmer-defined, and controlled processes are encountered. When dealing with a single external event, a distinct procedure is altered. When the linked event is signalled by an interrupt, the procedure is started.
- Multitasking is performed by scheduling processes to run independently from one another. Each process is given a priority level that corresponds to the relative importance of the event it is responsible for. The processor is dedicated to the processes with the highest priority. Priority-based preemptive scheduling is a sort of schedule employed by real-time systems.
- Firm Real-time Operating System (RTOS): This form of RTOS must also adhere to deadlines. Missing a deadline, despite its minor impact, might have unanticipated implications, such as a decline in product quality. Multimedia apps are a good example.
Characteristics of a Real-Time System
AN RTOS’S FIVE CHARACTERISTICS
- Determinism: If you repeat an input, you’ll get the same result.
- High performance: RTOS systems are quick and responsive, frequently completing tasks in a fraction of the time required by a traditional operating system.
- Safety and security: RTOSes are frequently employed in important systems, such as robotics or flight controls, where errors might have disastrous implications. They must have greater security standards and more reliable safety features to protect persons around them.
- Priority-based scheduling: Priority scheduling indicates that high-priority tasks are completed first, followed by lower-priority tasks. This means that the most critical task will always be executed by an RTOS.
- Small footprint: When compared to their conventional OS counterparts, RTOSes are a fraction of the size. For example, Windows 10 takes up about 20 GB after installation, including post-install updates. VxWorks®, on the other hand, is about 20,000 times smaller, with a file size in the low single digit megabytes.
THINGS TO KNOW ABOUT THE DIFFERENCES AND SIMILARITIES BETWEEN AN EMBEDDED SYSTEM AND AN RTOS
An embedded system is a computer that is integrated into a larger machine, such as a robotic arm’s microcontroller. Developers can utilise an open source general-purpose operating system (GPOS) like Linux in non-critical applications with some schedule freedom. Linux is feature-rich, adaptable, and well-known. Real-time operating systems are used in critical systems (whether they are safety critical or mission essential). The traits that distinguish an RTOS are frequently critical to its success.
A robotic arm in a plant, for example, must be predictable and dependable, and it must be able to stop instantly when employees enter its work area. Variability can lead to a waste of resources, problems with quality control, or injury.
The Use of RTOS in Embedded Systems
A real-time operating system is most commonly employed in an embedded system, which is a system that functions behind the scenes of a larger operation, due to its advantages. The RTOS is frequently devoid of a graphical user interface. Multiple operating systems are sometimes combined at the same time to give operational capability and the usability of a general-purpose OS.
Intelligent edge devices, also known as electromechanical edge or cyber-physical systems, frequently use RTOSes. This indicates that the device both generates and processes data. As an example, an automobile would be able to monitor its surroundings and respond to them on its own. Artificial intelligence or machine learning, or both, are frequently combined with real-time components in such devices to enhance the capabilities of the underlying structure.
Is it better to use an operating system or a real-time operating system?
The response time to external stimuli differs between an OS (Operating System) such as Windows or Unix and an RTOS (Real Time Operating System) found in embedded systems. OSs often offer a non-deterministic, soft real-time response, in which there are no promises about when each task will be completed, but they will endeavour to stay responsive to the user. An RTOS differs in that it often delivers a hard real-time response, meaning it reacts to external events quickly and predictably. Comparing the editing of a document on a PC to the operation of a precise motor control, for example, highlights the difference between the two.
Architectures for Real-Time Operating Systems
Apart from minor nuances, RTOS architecture is influenced by two design philosophies: monolithic kernel versus microkernel. Microkernel systems differ from monolithic kernel systems in that they compartmentalise distinct components of the architecture, whereas monolithic kernel systems run in a single space.
- Microkernel Operating Systems
Components are stored in different “rooms” in microkernel design, which are independent of one another but share a common area. It is possible to renovate a room without affecting those in the vicinity. However, getting from one to the other necessitates passing through the doorway and walking down the corridor, which takes time. Any action must return to the kernel before proceeding to the component it refers to, causing some actions to take significantly longer than they should.
Monolithic Systems are systems that have only one component.
Because there are no “walls” between the rooms in a monolithic system, you can move from one to the next considerably faster.
- Monolithic kernels
In this kernel, rather than implementing a small kernel, provide their own services while also regulating those of other areas. With the exception of exceptions, operations are carried out in kernel space, eliminating the need to return to the kernel on a regular basis and enhancing speed and performance. Making a modification in one area, though, could have consequences throughout the whole.
Embedded and Real-Time Operating Systems: A Changing Landscape
Methodologies that are new
The operating systems that power embedded systems are held to the same high standards as the embedded systems themselves. Real-time operating systems must stay up with technological advancements and use modern development methods. This involves being compatible with the frameworks, languages, and processes used by the new generation of embedded system developers while ensuring that security, safety, performance, and reliability are not compromised.
Maintaining Legacy Systems
Even new items are becoming obsolete due to technological breakthroughs that improve performance, connection, and design cycles. The challenge of how to deal with legacy systems arises as a result. Continuing to recode embedded software is no longer commercially viable. System designers, on the other hand, would prefer to reuse as much current code as feasible, especially when money has already been invested in software certification.
Virtualization and new hardware
Embedded systems and applications can now be consolidated because to advancements in multi-core–based hardware platforms. It is now possible to minimise the cost, size, and weight of the final shipping product by using a single chip that can include any number of CPUs from 2 to 64.
Embedded system development is also being accelerated by virtualization. Multiple embedded systems can now be virtualized and run on a single piece of hardware using a hypervisor. This is crucial for manufacturers who want to get the most out of their existing IP while also bridging the gap between old and new applications.
What factors should be taken into account while selecting an RTOS?
The RTOS scheduling algorithm, interrupt latency, and context transition durations will all play a role in the system’s responsiveness and determinism. The first crucial factor to examine is the type of response required – is it a hard real-time answer? This means that there are specific deadlines that, if not met, will result in the system failing. Would a non-deterministic, soft real-time response be a better option? In that circumstances, no guarantees can be made about when each task will be completed.
Micro kernels employ the bare minimum of system resources while providing limited but important task scheduling capability. Micro kernels provide a hard real-time reaction and are commonly employed with embedded microprocessors with minimal RAM/ROM, but they can also be used in larger embedded processor systems.
A full-featured OS, such as Linux or WinCE, might be utilised instead. These provide a feature-rich operating system environment, with drivers, GUIs, and middleware components typically included. Full-featured operating systems are slower, demand more memory, and require more processing power than micro kernels, and are mostly employed on powerful embedded processors with plenty of system resources.
- Open source or commercially licenced: There are a number of widely used, free open source RTOSs available, all of which are distributed under the GPL or modified GPL licences. These licences, on the other hand, may include copy left limits and provide limited protection. Professionally licenced RTOS products remove copy left restrictions and provide full indemnity and warranties for IP infringement. Furthermore, you have a single firm that provides assistance and is accountable for the quality of your product.
- Quality: What importance does the RTOS vendor place on quality in their organisation? Quality is more than just a set of code rules. Are the proper procedures in place to ensure that future products and support are of high quality? ISO 9001 certification is common among well-managed firms that value quality.
- For applications requiring certification to international design standards such as DO-178C and IEC 61508, pre-certified and certifiable RTOSs are available. These RTOSs provide important safety features as well as the design proof necessary by certification authorities to show that the RTOS development process complies with the applicable design standard.
- Licensing: You’ll need to think about not only the RTOS functionality and capabilities, but also the licencing arrangement that best fits your project budget and company’s “return on investment.”
- RTOS Vendor: Choosing the right RTOS vendor is just as crucial as choosing the right RTOS. In an ideal world, you’d like to establish a partnership with a supplier who can support both your present and future products. To accomplish so, choose a proactive provider with an excellent track record who collaborates with top silicon manufacturers to ensure that the latest processors and tools are supported.
Everything boils down to trust, product quality, and customer service quality.
The following are some of the benefits of real-time operating systems:
- Maximum consumption refers to the most efficient use of devices and systems. As a result, more production from all resources.
- Job Shifting — In these systems, there is relatively little time allotted for task shifting. It takes roughly 10 microseconds with earlier systems, for example. It takes 3 microseconds to switch from one task to another on today’s systems.
- Focus On Applications — Give priority to applications that are already executing, rather than those that are in the queue.
In an embedded system, a real-time operating system is used.
Because the size of the programmes is tiny, RTOS can be used in embedded systems such as transportation and other industries.
- Error-free — These systems are free of errors.
- Memory Allocation – In these systems, memory allocation is best handled.
The following are the disadvantages of real-time operating systems:
- Limited Tasks – Only a few tasks run at the same time, and they focus only on a few apps to avoid problems.
- Use Heavy System Resources – System resources aren’t always the best, and they’re also pricey.
- Complex Algorithms – The algorithms are extremely complicated and tough to write.
- Device Driver And Interrupt Signals – To respond to interruptions as quickly as possible, it requires specialised device drivers and interrupt signals.
- Thread Priority – Setting thread priority isn’t a smart idea because these systems aren’t prone to change jobs.
- Minimal Task Switching — The RTOS conducts the bare minimum of task switching.
When an RTOS is used, it is obvious that debugging can be a difficult task, and developing appropriate tools can be difficult. As systems get more complicated, debugging tools’ capabilities must evolve to meet the needs of embedded software developers.
Both developers and managers should be familiar with RTOS debugging. Even if the functionality is transparent (due to the RTOS/tools vendor’s handling of it), the developer can utilise this knowledge to comprehend the technology’s capabilities and limitations. A manager is capable of effectively allocating resources and making well-informed purchase decisions.