Embedded systems are devices that perform a specific, dedicated function within a larger electronic system. As they contain both hardware and software, embedded systems have grown in complexity over the past fifty years as these areas of technology have developed. To cope with the growing complexity of these systems, it has become increasingly common for embedded systems engineers to customize embedded operating systems that facilitate efficient hardware and software interactions on their devices.
In this week's blog post, we're taking a closer look at the history of embedded operating systems. We'll flesh out the differences between embedded and computer OS and their applications, describe the impact of hardware and software industry development on embedded operating systems and investigate the diversity of embedded operating systems that are deployed around the world today.
The core function of any operating system is to coordinate program access to computing hardware and resources. You are probably already familiar with many of the common desktop computer operating systems, such as Microsoft’s Windows, Apple's macOS, or the open-source Linux. Desktop operating systems provide a user interface that makes it easier for users to access applications. They also coordinate the allocation of hardware resources to each application a user wishes to run on their computer.
In a desktop computer, the operating system is stored in non-volatile memory such that it is retained in memory when the computer is turned off. When the system is booted, the OS is copied into working memory called RAM where it can be accessed more quickly by the CPU.
As with desktop operating systems, the purpose of an embedded operating system is to coordinate program access to computing hardware and resources. The key difference is that an embedded operating system must be uniquely programmed to function effectively within the operational constraints or requirements that are often associated with embedded systems applications. These may include things like:
In the earliest embedded systems designs, software programs were relatively simplistic due to hardware constraints and it was more common for engineers to write application code as firmware, leaving out operating systems altogether. However, as microcontroller technology developed from 8-bit to 16-bit and later 32-bit, the increasing complexity of embedded computer systems meant that operating systems would be necessary to effectively manage the embedded software.
Today, there are hundreds of different embedded operating systems in existence. Development in the design and deployment of embedded OS has been driven by the need to support software applications that take advantage of rapidly advancing hardware. Over the past decades, both computing power and data storage have become more compact and affordable for embedded systems engineers. This means that smaller devices with lower power consumption can support more complex applications and store more data.
Embedded operating systems can be customized and configured according to the unique specifications of each embedded project. Depending on how the operating system handles multi-tasking, it may be referred to as a real-time operating system, or RTOS. An RTOS is an operating system that is capable of processing and responding to data inputs in real time, without any latency or buffer delays. Real-time operating systems are deployed in cases where time constraints are crucial and task delays may have catastrophic effects. Real-time operating systems can be classified in three ways:
A hard real-time operating system is deployed in applications where reliability is paramount and all tasks must be executed by the prescribed deadline. Hard real-time systems are precisely constrained such that timing, deadlines, and latency are all highly predictable. This is necessary, as any missed task in a hard RTOS is considered a catastrophic system failure.
In a soft real-time operating system, the goal is still to execute tasks reliably without missing deadlines. However, soft RTOS are typically deployed in applications where total reliability is unnecessary. As a result, soft RTOS are not constrained with precise operating rules to the same level as hard RTOS. A task whose deadline is missed will be completed later when the required computing power is available.
In a firm RTOS, some infrequent deadline misses are permitted. Still, the quality of the service may be degraded or nullified if too many deadlines are missed.
Beyond these three classifications, there are additional ways in which we can characterize embedded operating systems. The simplest Embedded OS examples can be described as a single system control loop, meaning that the program application serves to control one specific variable within a process. This type of operating system might be used in a smart thermostat that measures environmental temperature using a sensor and adjusts the temperature accordingly via actuators. Some embedded operating systems manage tasks using rate monotonic scheduling, an efficient priority assignment algorithm for task scheduling.
When the first embedded systems were developed in the 1960s, bare metal programming was often sufficient for the types of programs that needed to be executed. Today, embedded operating systems are used to facilitate effective task management and resource allocation as embedded systems contain more sophisticated hardware and more complex software programs.
Total Phase creates powerful debugging tools that help embedded engineers manage the complexities of product development and embedded OS programming. With products like the Beagle I2C/SPI Protocol Analyzer, embedded systems engineers and designers can streamline the software testing process with full transparency and reduce time to market.
Ready to learn more?