The operating system refers to the computer programs used to manage and control the computer hardware and software resources, which are directly run on the computer as the most basic system softwareall the other software runs on top of the operating system. According to the application field, the operating system can be divided into several categories, such as desktop operating system, server operating system, mobile operating system, and embedded operating systems.
Desktop operating system refers to the operating system running on the personal computer; the current mainstream desktop operating system is Microsoft's Windows operating system; in addition, Linux and macOS are desktop operating systems.
Server operating system refers to the operating system running on large servers, such as cloud servers, database servers, network servers, etc. The current mainstream server operating system is Linux, but Microsoft's Windows server operating system also occupies a part of the market.
Mobile operating system refers to the operating system running on mobile phones, PADs, and smart TVs. Google's Android and Apple's iOS both belong to the mobile operating system. Traditionally, mobile devices like mobile phones and PADs are also embedded devices, but as the chips used by mobile devices become more powerful, the difference is obviously larger between the mobile operating system and the traditional embedded device, so that the mobile operating system is classified separately.
An embedded operating system is an operating system that is used in an embedded system. Embedded systems are widely used and easier to understand. All computers are embedded devices except servers, personal computers, and mobile devices. Embedded systems are everywhere in our lives, from military equipment to civilian affairs, from industrial control to network applications. The following are some typical embedded device examples; also lists some embedded operating system applications.
FIGURE 1.1 Applications for common embedded operating systems.
Consumer electronics: a variety of information appliances, such as digital televisions, set-top boxes, digital cameras, audio equipment, videophones, home network equipment, washing machines, refrigerators, smart toys, etc.
Industrial control: a variety of intelligent measuring instruments, digital control devices, programmable controllers, controlling machines, distributed control systems, field bus instruments and control systems, industrial robots, mechatronic machinery, automotive electronics, etc.
Network applications: including network infrastructure, access equipment, mobile terminal equipment, shared bicycles, water and electrical meters, Internet of Things (IoT) terminal equipment, etc.
Military equipment: for all kinds of weapons control (such as artillery control, missile control, intelligent bomb guidance, and detonating devices); tanks; warships; bombers; and land, sea, and air military electronic equipment; radar; electronic counter-military communications equipment; and a variety of special equipment for field operation command.
Others: all kinds of cash registers, POS systems, electronic scales, bar code readers, commercial terminals, bank money counting machines, IC card input equipment, cash machines, ATMs, automatic service terminals, anti-theft systems, and a variety of professional banking peripherals and medical electronic equipment.
An embedded system is a computer system that is fully embedded on a device or inside a device and is designed to meet specific needs, such as the common embedded system in daily life, including TV set-top boxes, routers, refrigerators, microwave ovens, mobile phones, etc. They all have certain functions: the TV set-top box used to play TV shows on the network, and similarly, the router is used to select the optimal path and forward the network message correctly. Such systems are highly specialized and relatively single in functionality, usually only for specific external input processing, and then give the corresponding results, so that the embedded system only needs to have just enough but a small number of hardware resources to complete the required specific functions, and thus the cost can be effectively controlled.
General computer systems, on the other hand, do not have specific needs, but do everything possible to meet requirements. Even when constructing hardware systems, consider the changes in requirements over the next few years. For example, when people buy computers, they want to get as much high-end performance as possible for multimedia, games, work, etc.
As shown in , the hardware equipment of the embedded system consists of a number of chips and circuits, including the main control chip, power management, and JTAG interface used in the debugging of the development phase, and may also contain some data acquisition modules, communication modules, audio/video modules, and so on.
FIGURE 1.2 Hardware block diagram of embedded system.
The real-time performance of the system refers to the correct response to external events in a fixed amount of time. During this time, the system will do some processing, such as input data analysis, calculation, processing, and so on. And outside of this time, the system may be idle and do some spare work. Take a mobile terminal as an example: when a phone dials in, the system should be ringing in a timely manner to inform the host of a call and ask whether to answer, and when the telephone is not dialing in, people can use it to do some other work, such as listening to music, playing games, and so on.
From the earlier example, we can see that the real-time system is a demand-oriented system, for real-time tasks need to respond the first time, and non-real-time tasks can make way for real-time events when they arriveit is called preempted. So a real-time system can also be thought of as a hierarchical system, and tasks of different importance have different priority levels: important tasks can be prioritized for response, and non-essential tasks can be postponed appropriately.
Real-time calculations can be defined as a type of calculation in which the correctness of the system depends not only on the logical result of the calculation but also on the time at which the result is produced. There are two key points, that is, done correctly and within a given time, and the importance of these two points is equivalent. If the calculation results go wrong, this will not be considered a correct system, and if the calculation results are correct but the calculation has taken time away from the required time, this will also not be considered a correct system. A real-time system is shown in .
FIGURE 1.3 Real-time system.
For input signals and events, the real-time system must be able to respond correctly within the specified time, regardless of whether these events are single events or multiple events, synchronous signals, or asynchronous signals.
Example: Suppose a bullet is fired from 20 meters away into a glass, the speed of the bullet is v m/s, then after t1 = 20/v seconds, the bullet will break the glass. And if a protection system takes the glass away after detecting a bullet, assuming the whole process lasts t2 seconds, and if t2 < t1, the glass won't be broken; this is the real-time system.
Next page