Linux embedded real-time operating system development and design (four)

xiaoxiao2021-03-06  104

2.3 Current real-time operating system

In this section, let's take a look at how the designer of some operating systems is to deal with the problems mentioned in the previous section.

The simplest solution is to change the scheduler of time. An example is the system introduced by [12]. Minix's Round-Robin scheduler is swapped in a priority scheduler. This method is acceptable due to non-page scheduling and page switched technology in Minix, if the response to the time is not required.

Some ways to use POSIX.1B-1993 real-time standards in UNIX systems. This standard specifies priority scheduling, locking user program pages, real-time signals, improved IPC and timers, and other features. It is more suitable for real-time applications according to these standards.

Linux is some operating system that supports POSIX.1B standard [12]. Since May 1, 1997, a scheduler and memory locking technique suitable for controlling is fully implemented in Linux, and the timer is also partially implemented. The kernel is unable to occupy the first, low timing accuracy, and high interruption delays still have not been resolved. Therefore, the POSIX.1b-compatible Linux operating system is only suitable for some soft-time processing.

Other operating systems that meet the POSIX.1B are QNX [26]. The QNX operating system is a microner operating system. The kernel is just four kinds of services: process scheduling, inter-process communication, low-level network communication, and interrupt dispatches. Other services, such as equipment drivers and file systems, implementing ways to work with user processes. This system kernel is very small (about 7kb) and very fast.

QNX is compatible with POSIX 1003.1 standard (programming interface) and POSIX 1003.2 standard (housing and applications). It is very convenient for developers who are familiar with UNIX. QNX provides standard UNIX components: compilers, debuggers, X-Windows, and TCP / IP.

Microenvironment has many advantages compared to the design of traditional single structures. Debugging the user program is simpler than the debug kernel module. If the user process runs in a separate address space (like QNX), memory management errors are isolated from each other in different modules. The driver can get a multi-thread benefit. There is also good tailorness. For example, QNX can reduce the size of the ROM below 100KB, or to extend to full-featured multi-machine development environments. Transplantation and maintenance of micron kernel systems are also simpler. A disadvantage is that the micronide is not so compact than the core of the single block structure.

For real-time microcides, it provides a lightweight process, fast context switch, and IPC. A real-time user process can interrupt the device driver, which is impossible in the kernel of the single structure. Since the micro-kernel operating system is very small, it can be convenient to calculate the worst case timing parameters, such as interrupt delay.

Most micro-kernel operating systems weakness is its performance. The operating system of the micro-core structure has a relatively heavy system overhead between processes and context exchanges. The micro-kernel operating system only provides simple system services. Therefore, more system calls are completed with the same task micro-core operating system compared to the operating system of the single block. Although some researchers believe that context switching, message transmission, etc. can be efficiently realized [2], in terms of performance, the operating system of the single structure is still more successful.

An example of a single structure operating system is VxWorks [27]. VxWorks is a proprietary real-time operating system with host / target. A Unix host is used to develop and run the program for non-real time. A VxWorks core called Wind runs real-time tasks on the target. Communication between machines uses TCP / IP networks.

Although VxWorks is not compatible with UNIX systems, it provides some functions that meet POSIX interface specifications, especially POSIX.1B real-time extensions. Most VxWorks APIs are proprietary.

In VxWorks, the kernel and tasks run in the same address space. In this way, the switch between the tasks is very fast, and the necessary system call overhead will be saved. A real-time connector allows dynamic loading tasks and system modules. These features have good scalability. A interactive similar C syntax shell is used to check and change the parameter value, calculate expressions, call functions, and simple debugging. This feature makes it easier to develop. The kernel and task run in the same address space also makes the system more vulnerable, and a module error is more likely to affect other modules. The REAL / IX operating system is also a single block structure. This is an operating system with complete UNIX features, which is originally from UNIX System V, transforming it with real-time processing capabilities. Its kernel is completely occupied. It is implemented by the core signal, providing mutex access system resources, which is better than traditional Sleep / Wakeup functions. The interrupt delay time is reduced using the semaphore replacement gate, which is easier to transplant to multiprocessor systems.

REAL / IX is a POSIX.1003 compatible operating system. This feature makes it easier to transplant the UNIX application. In addition to real-time scheduling, real-time capabilities include pre-allocating memory and file space, synchronization with non-synchronous I / O, enhanced IPC and timer, can be connected interrupts. The final feature allows the user process to process interrupts.

There is now a tend to use Windows NT to support real-time processing. As long as the reason is compatible with previous Windows, the previous application can be used. It is also desirable to use an operating system to do anything: office applications, services, and real-time control. Use an operating system to reduce the overhead of personnel training. Programmers can use a wide range of Win32 APIs. Microsoft's monopoly on the market is also a reason.

As in the literature [25], the core of Windows NT is not suitable for hard-time processing: Win32 API is not designed to be applied in real time, interrupt processing may cause an uncertain delay, and for embedded systems Windows NT is also a problem with the requirements of memory.

Microsoft In order to handle some of the questions mentioned above. Developed a Windows CE embedded real-time operating system, the Windows CE kernel supports multitasking in a manner that seizes priority. Windows CE can be cured into the ROM, starting from a ROM, and requires not high in memory RAM during use. Windows CE divides two steps: The first step is to perform the interrupt service subroutine ISR (Interrupt Service Routine); the second step is interrupt service thread IST (Interrupt Service Thread). The internal protribution process is performed as short as possible, most of the processing is placed in the IST, and the highest priority can be arranged to the interrupt service thread to ensure that IST runs as soon as possible without being occupied. It is convenient to familiarize with Windows programmers to develop and transform Windows applications with Win32 API compatible programming interface.

转载请注明原文地址:https://www.9cbs.com/read-125796.html

New Post(0)