Analysis and comparison of several kinds of embedded real-time operating systems
VxWorks, μ Clinux, μ C/ OS-II and eCos are 4 kinds of of good performance real-time operating systems employed extensively. This text, through analyzing and comparing the main performance of these 4 kinds of operating systems, lectotype basis and applicable field of summing up them.
The introductions of 1 4 kinds of operating systems
VxWorks is the products of U.S.A. WindRiver Company, it is very extensive to employ in domains of embedded system at present, more high embedded operating system of the market share. VxWorks real-time operating system made up as to independent, built object module by more than 400, users can choose the appropriate module to cut out and dispose the system depending upon need; Offer based on priority task scheduling, move ahead simultaneously and communication, interrupt processing, timer, the intersection of memory and the intersection of person who manage and function among the task, it accords with POSIX (the protable operating system interface) that built-in Normal memory management, and multi-processor control procedure; And have by concise luminous user interface,in core even Ding with miniature to 8 KB.
μ C/ OS-II is developed on the basis of μ C-OS, it is the expert Jean J of U.S.A.'s embedded system. A structure that Labrosse writes with language C is small and exquisite, real-time kernel of mulitasking of the seizing type. μ C/ OS-II can manage 64 tasks, and offer functions such as moving ahead simultaneously and communication, time management and interrupt servicing,etc. among the task scheduling and management, memory management, task, carry out such characteristics as the space usage is small, the real-time and of good performance and expansibility is strong with high efficiency.
μ Clinux is a kind of outstanding embedded Linux edition, their full names are micro-control Linux, have seen from literal meaning meant that control Linux a little. Compared with canonial Linux, the kernel of μ Clinux is pygmy, but it has still inherited the key feature of Linux operating system, including good stability and moving the planting, API that strong network function, outstanding file system support, standard are abundant, and TCP/ IP network protocol,etc.. Because without MMU memory Administrative unit, the realization of its mulitasking needs certain skill.
eCos(embedded Configurable operating system) ,Namely embedded configurated operating system. It is a configurated, protable and facing the real-time operating system of deep embedded application with open source code. Unless maximum characteristic is flexible when disposing, it by modular design,parts key by little with assembly form, including running and chartering in kernel, language C storehouse and bottom layer etc.. Each assembly can offer a large number of dispositions to select (the real-time kernel can also be regarded as availably and disposed) ,Using the disposition tool that eCos offers can be disposed very conveniently, and make eCos meet different embedded application requirements through different dispositions.
2 perfomance analysis and comparing
Task management, task and cutting off synchronism and communication mechanism of one, it is the main performance of the real-time operating system to manage, cut off the management, filing system, support to hardware and transplant these respects systematically in memory. Analyze and compare on setting about from these respects the above-mentioned 4 kinds of operating systems as follows.
Task management is core and soul of the embedded real-time operating system, have determined the real-time performance of the operating system. It usually includes some such as priority setting up, much task scheduling mechanisms and time determinacies.
Embedded operation system support mulitasking, each task has priority, the more important the task is, the higher the priority entrusted should be. The arrangement of priority is divided into two kinds static priority and dynamic priority. Static priority means each task is given a priority before operation, and the priority change until system run; The dynamic priority refers to the priority (especially the priority of the utility program) of each task Can change in the systematic runtime dynamically.
2.1.2 Many task scheduling mechanisms
Task scheduling is mainly to coordinate the contention of the computer system resource of the task to use. To the system resource very deficient embedded system, task scheduling is particularly important, it influences the real-time performance of the system directly. Usually, many task scheduling mechanisms divide into the deployment in order to rotate on the basis of priority seizing deployment and slot.
On the basis of the seizing deployment of priority: Each task has a priority in the system, the kernel always operates CPU for the most high task of the priority in the ready attitude. If find systematically have in the ready queue than more high priority task of the task of running at present, put the present operation task in ready queue, call in the high priority task and run. The system adopts priority to seize the way to manage, can guarantee the important accident is dealt with in time.
The slot rotates and manages: Let the identical task in ready state of priority use CPU according to the slot, in order to prevent a certain task with priority to monopolize CPU for a long time.
In general cases, the embedded real-time operating system is adopted and rotated in the deployment mechanism combined in deployment on the basis of priority seizing deployment and slot.
2.1.3 Definability of time
The embedded real-time operating system Ningbo should have definabilities to count call and running time serving. The running time of the service of the system does not depend on the amount of the task of the utility program. Because of this characteristic, the system's time to finish a certain definite task is predictable. Table 1 has listed the deployment mechanisms of 4 kinds of operating systems specifically.
4 embedded real-time operating system support mulitasking is and different to some extent at the the intersection of task scheduling and mechanism at supporting the intersection of task and quantity just. VxWorks has efficient task supervisory functions, it supports the mulitasking, can distribute 256 pieces of priority, support priority person who seize debug and slot rotate deployment, preferably real-time nature. μ C/ OS-II kernel is designed for requirement for the real-time system and realized, only support on the basis of the seizing deployment of fixed priority; The scheduling method is simple, can meet higher real-time nature requirement. The intersection of μ and Clinux inherit standard mulitasking of Linux, realize the way at structure, divide into real-time process and ordinary process, adopt first-come-first-served and slot rotate deployment separately; Improve only to the middle-and-low grade embedded CPU characteristic, and does not support kernels to seize. ECos scheduling method is abundant, have offered two kinds of deployment devices based on priority (ascend the throne and pursue deployment device and multiple queue dispatcher device) ,Allow user choose one of these wither measurer while disposing, the adaptability is fine.