embedded operating system
What is an embedded operating system?
An embedded operating system is a specialized operating system (OS) designed to perform a specific task for a device that is not a computer. The main job of an embedded OS is to run the code that allows the device to do its job. The embedded OS also makes the device's hardware accessible to software that is running on top of the OS.
An embedded OS often works within an embedded system. An embedded system is a computer that supports a machine. It performs one task in the bigger machine. Examples include computer systems in cars, traffic lights, digital televisions, ATMs, airplane controls, point of sale (PoS) terminals, digital cameras, GPS navigation systems, elevators and Smart meters.
Networks of devices containing embedded systems make up the internet of things (IoT). The embedded systems perform basic operations inside IoT devices, such as transferring data over a network without human interaction.
How does an embedded OS work?
An embedded OS enables an embedded device to do its job within a larger system. It communicates with the hardware of the embedded system to perform a specific function. For example, an elevator might contain an embedded system, such as a microprocessor or microcontroller, that lets it understand which buttons the passenger is pressing. The embedded software that runs on that system is the embedded OS.
In contrast to an OS for a general-purpose computer, an embedded OS has limited functionality. Depending on the device in question, the system may only run a single embedded application. However, that application is likely crucial to the device's operation. Given that, an embedded OS must be reliable and able to run with constraints on memory and processing power.
In the case of a Raspberry PI system on a chip, an SD card acts as the device's hard drive and contains the code that runs on the device. The SD card is removable, so its contents can be modified on demand. Various operating systems can run on Raspberry PI devices. The embedded OS makes the device's hardware -- such as USB and HDMI ports -- accessible to the application running on top of the OS.
Examples of embedded OS devices
Some examples of devices with embedded OSes include the following:
- ATMs
- cellphones
- electric vehicles
- industrial control systems (ICS)
- Arduino-based devices
Arduino is an Open Source platform with a microcontroller that processes simple inputs, such as temperature or pressure, and turns them into outputs. These devices have a basic embedded OS that acts like a boot loader and a command interpreter. An example of an Arduino-based device is a remote control car. The Arduino reads inputs from the car's controller and sends output information and commands to other components, such as the brakes.
Common uses of embedded OSes
Embedded OSes are put to a variety of uses, including the following:
- ATMs. ATMs have basic OSes that enable the machine to read a user's debit card and personal identification number input and perform bank account functions like withdrawal or checking balances. The OS does little else but react to user inputs and communicate with the ATM hardware.
- Cellphones. Cellphones require an OS like Android or iOS to boot the phone and enable applications to communicate with other phone hardware.
- Electric vehicles. Microcontrollers host embedded OSes that handle functions like braking or pressure sensing. For example, a certain amount of pressure on the front bumper may cause the airbag to go off. This type of function is known as reactive operation because it reacts to an input.
- Industrial control systems. Sensors are used in industrial control systems to measure factory conditions and send alerts if they become dangerous. Sensors contain an embedded OS that enable them to perform these tasks.
- Traffic lights. Embedded OSes enable a traffic light to cycle through different signals at programmed intervals.
- Basic input/output system. In some cases, BIOS could be considered an embedded OS because it is the firmware that enables a desktop computer's more complex OS to interact with the computer hardware.
Types of embedded OSes
Embedded OS are designed for the task they will perform. The various types of operating systems include the following:
- Multitasking operating system. A Multitasking OS can perform several tasks at once. It uses job scheduling to perform basic tasks. For example, a cellphone OS divides up CPU resources among multiple tasks.
- Real-time operating system. A real-time OS is designed to be reactive. It processes inputs when they are received and responds within a specific timeframe. If the response time falls outside of the specified time period, the system could fail. Real-time OSes sometimes use rate monotonic scheduling, which assigns priorities to tasks.
- Single loop control system. This type of embedded OS exercises control over a single variable. An example would be temperature control in a smart home. A smart thermostat measures the temperature in the house and if it exceeds the limit set by the user, turns off the heat.
Embedded vs. non-embedded OSes: What's the difference?
An embedded OS may reside on a chip within an electronic device. They are often limited in the scope of what they can do.
In contrast, a non-embedded OS runs from a hard disk or a solid-state drive. Non-embedded OSes, such as Windows 10 or Mac OS, are configurable and upgradable. They are designed for general-purpose use.
Another difference between embedded and non-embedded OSes is in how the operating system is coded. Embedded OSes are usually contained in a single executable image and execute one task. Desktop operating systems and network operating systems contain many applications.
Embedded OSes also have a minimal or no user interface (UI). Embedded OSes, on the other hand, have a more dynamic UI.
Embedded OSes and devices play a large part in the internet of things. Learn how NOR flash memory works well as an embedded device in automotive, medical and consumer devices.