Software
Embedded systems often do not need a full operating system. Some use specially-built small and simple operating systems that start very quickly, others do not need one at all. Embedded systems are not adapted as easily, but they are built to perform their tasks much more reliably. Because the hardware is simpler, it is also often cheaper to build and runs faster.
In contrast to this, a general-purpose computer needs to be ready for new device drivers and software to run hardware it doesn't know about yet, like new printers or hard drives. It needs to run different application programs.
As embedded systems get bigger, things that used to be only on general-purpose computers or even mainframes are now becoming common on embedded systems.
Some examples of operating systems, from simple to complex:
- Simple control loop - A timer and a loop is used to call different subroutines repeatedly. This is often made by one person for smaller systems.
- interrupt controlled - The tasks are started by different kinds of events. The event could be something timed (every ten seconds, for example) or by a button press or data received.
- nonpreemptive multitasking - Each task gets its turn to run, and when it finishes it calls a scheduler in the OS to run the next task.
- preemptive multitasking or multi-threading - A task can be stopped after some amount of time to let another task run for a while. No task can hog the system. At this level the system is considered to have an "operating system" kernel and can run tasks in parallel. This type of OS is usually bought from a company that only works on embedded operating systems.
Real-time operating systems include products like MicroC/OS-II, Green Hills INTEGRITY, QNX or VxWorks. Unlike MacOS or Windows 7, these operating systems are not known very well by most people. But they are used in many places where time and safety is very important. People use them every day and do not realize it.
Common examples of larger kernels are Embedded Linux and Windows CE. Although these do not have the tight time limits needed for a strict real-time system, they are becoming more common, especially for more powerful devices such as Wireless Routers and GPSs. They allow re-use of code in the public domain for Device Drivers, Web Servers, Firewalls, and other code. Software developers that are more comfortable writing applications for PCs will find this more familiar as well. If needed, an FPGA or other special hardware can be used for things that do need tight time limits.
Embedded systems are often in machines that are expected to run for years without errors, and in some cases recover by themselves if an error occurs. This means the software is usually developed and tested more carefully than that for personal computers, and unreliable mechanical moving parts such as disk drives and fans are avoided.
Places where safety and reliability are important:
- Some systems cannot safely be shut down for repair, or it is too difficult to repair. Examples include space systems (satellites, rovers), under-sea cables, and nuclear power plant controls.
- The system could kill people if it fails, such as aircraft controls, chemical factory controls, train signals, and heart defibrillators.
- The system will lose large amounts of money if it is shut down or if a mistake is made: Telephone switches, factory controls, cash registers, automated teller machines.
- Watchdog timer that restarts the embedded system if something stops working.
- Duplicate parts, where one system can take over if another one stops working.
- Software "limp modes" that provide partial function.
- Immunity Aware Programming
Ways to recover from errors — both software bugs such as memory leaks, and also soft errors in the hardware:
Comments
Post a Comment