This article analyzes and compares the features of the four Real-time Operating Systems (RTOs. They are: Lynx Real-Time Systems Company's lynxos, QNX software systems Company Limited's QNX and two representative real-time Linux-RT-Linux of the New Mexico Institute of Technology and Kurt-Linux of the University of Kansas. In recent years, real-time operating systems have been widely used in multimedia communication, online transaction processing, production process control, traffic control, and other fields, so they have attracted more and more attention. Basic Features * QNX is a distributed, embedded, and scalable real-time operating system. It follows posix.1 (Program Interface) and posix.2 (shell and tool), partially followed by posix.1b (Real-time extension ). It was first developed in 1980 and has become quite mature. * Lynxos is a distributed, embedded, and scalable real-time operating system that complies with posix.1a, posix.1b, and posix.1c standards. It was first developed in 1988. * RT-Linux is an embedded hardware real-time operating system that partially supports the posix.1b standard. * Kurt-Linux is not designed for embedded applications. Unlike hard real-time/soft real-time applications, they propose the concept of "strict (FIRM)" real-time applications, for example, for multimedia applications and ATM network applications, Kurt is a "strict" real-time system designed for such applications. Architecture Similarities and Differences The implementation of real-time systems is mostly the microkernel architecture, which makes the core small and reliable, easy to Rom curing, and can be modularized and scalable. In a microkernel system, the OS service module runs in an independent address space. Therefore, Memory Errors of different modules are isolated. However, it also has vulnerabilities. the overhead of inter-process communication and context switching is greatly increased. Compared with a large integrated kernel system, it must perform more system calls to complete the same task. * QNX is a micro-kernel real-time operating system with only four core services: process scheduling, inter-process communication, underlying network communication, and interrupt processing. Its processes run in an independent address space. All other OS services are implemented as collaborative user processes, so the QNX core is very small (qnx4.x is about 12 Kb) and runs extremely fast. * Currently, lynxos is not a micro-kernel-structured operating system, but it plans to use the so-called "Galaxy" technology to transform it from a large integrated kernel to a micro-kernel. This technology will be used in the Linux System 3.0. The new 28kb microkernel provides the following services: Core startup and stop, underlying memory management, error processing, interrupt processing, multi-task, underlying synchronization and mutex support. * RT-Linux implements a small real-time core that only supports underlying task creation, loading of interrupted service routines, underlying task communication queues, interrupt service routines (ISR), and Linux processes. The original non-real-time Linux core runs on this small core as a preemptive task, and all tasks run in the core address space. Unlike the micro-kernel and large kernel, it is a real-time exe (Realtime executive) architecture. Its reliability and maintainability are not ideal for telecom service systems. * The kernel of Kurt-Linux consists of the kernel and the real-time module. The kernel is responsible for real-time event scheduling. The real-time module provides specific real-time services for user processes. It does not belong to the microkernel structure. Scheduling Policy Analysis Task Scheduling Policies directly affect real-time performance. Despite the diversity of scheduling algorithms, most of the changes come from the monotonic rate algorithm (RM) and the earliest Term Priority Algorithm (EDF. The former is mainly used for static periodic task scheduling, and the latter is mainly used for dynamic scheduling. The two algorithms have their own advantages and disadvantages in different system states. The actual strategy adopted in commercial products is often a compromise between various factors. QNX provides posix.1b standard process scheduling: * 32 process priorities; * Preemptible priority-based body switching; * Optional Scheduling Policies: FIFO, rotation, and adaptability. The scheduling policy of lynxos is as follows: * Lynxos supports the thread concept and provides 256 global user thread priorities; * Hard real-time priority scheduling: rotation scheduling, quantitative scheduling, and FIFO scheduling policies are implemented for each priority; * FAST text switching and short blocking time; * Preemptible RTOS core. RT-Linux A simple real-time core is implemented under the Operating System. Linux runs in the kernel as a preemption task, with the lowest priority and can be preemptible by high-priority tasks at any time. * Users can write their own scheduling programs, which can be implemented as the core modules to be loaded; * Implemented scheduling programs include preemptible Scheduling Based on priority and EDF scheduling; * Priority-based scheduling uses the monotonic rate algorithm, which directly supports periodic tasks. Kurt-Linux It can run in two states: normal and real-time. In general, all processes can run, but some core services will lead to unpredictable interruption blocking. In real-time mode, only real-time processes are allowed to run. * Supports FIFO Scheduling Policies, rotation scheduling policies, and Unix time-based scheduling policies; * The SCHED-KURT scheduling policy is added, which is a static scheduling policy that uses a special scheduling file to record the parameters of the predefined process to be scheduled. From the brief description above, we can see that the first three scheduling policies are more standardized, especially the two commercial RTOS, which follow or partially follow the posix.1b real-time scheduling standard. Operating System Service comparison QNX system services: * Multiple resource managers, including various file systems and device management, support simultaneous running of multiple file systems, including posix.1 and POSIX file systems that provide full posix.1 and Unix syntax, supports embedded file systems with multiple flash devices and multiple file servers (such as Windows NT/95, LAN Manager, etc.) transparent access to SMB file systems, DOS file systems, CD-ROM file systems. * Device management. Provides high throughput and low overhead interface services between processes and terminal devices. * Supports graphics/windows. Including QNX windows, X Window System for QNX, and Remote graphical connection between Windows NT/95 and X Window systems. * TCP/IP for QNX. * The high-performance, fault-tolerant QNX network, fleet, converts all computers connected to the network into a logical supercomputer. * Transparent distributed processing. Fleet network processing is integrated with message passing and process management primitives to unify local and network IPC, making the network transparent to IPC. System services of lynxos: * Network and communication. Because UNIX/POSIX is used API, lynx is suitable for data communication and Internet applications. Due to the openness of the system, the network software can be easily transplanted to Lynx. Similarly, lynx provides key telephone communication protocols that are applicable to the infrastructure, operations, and multimedia applications of telecommunication systems. * TCP/IP protocol stack. Lynx comes with an optimized TCP/IP protocol stack that provides high-performance services, such as TCP Header prediction, advanced routing algorithms, IP-level multi-access broadcast, and link-level high-speed buffering. * Internet tools. Including: Telnet, FTP, TFTP, PPP, slip, embedded Java Virtual Machine with real-time scheduling, embedded HTTP Server, BOOTP, ARP/RARP, DNS domain name service, email, Perl, telephone communication protocol, etc. * Svr3 stream. The stream mechanism of lynxos provides core support for developing and porting stream-based Drivers and applications. * File system. Real-time Unix-like Hierarchical file systems: continuous file structure, with/without buffer, original partition and original device access. * Motif-based graphical user interface. * Distributed computing resources. SCMP is combined with multi-processing on VME bus, PCI bridge service, CompactPCI Hot-swap services, lynx/HA-DDS distributed data system. Linux system services: Recently, many Linux-based real-time applications have been developed, which have mature and rich resources. * UNIX users' development tools and applications are transplanted to Linux. * TCP/IP network protocol. * Various Internet client/server software. * X Window. * C/C ++, Java, and other language compilers. All of the above systems provide graphical interfaces, various network support tools, and other necessary tools. QNX is an operating system that is more in line with the traditional "distributed" concept. The goal is to turn the entire LAN into a large supercomputer, so that the existence of the network is transparent to users, file systems provide a wide range of services. However, the higher the degree of distribution, the higher the system overhead. While lynxos is designed to provide a wide range of network services, the biggest advantage of Linux is the economy. It can also be achieved through newsgroups or mailing. List quickly solves any problems encountered by users. Comparison of system openness For many large and medium-sized systems, most of the software is written on UNIX platforms. Therefore, whether RTOS provides POSIX/Unix API is very important. QNX openness: * Qnx posix compatibility and Unix-specific compilers, debuggers, and X Windows and TCP/IP are familiar to Unix programmers. * Multiple CPUs supported: AMD elansc300/310/400/410, am386 de/SE, and cyrix Mediagx, x86 processors (more than 386), Pentium series, STMicroelectronics stpc. * Multiple bus types: CompactPCI, Eisa, ISA, MPE (radisys), STD, and STD 32. PC/104, PC/104-plus, PCI, PCMCIA, Vesa, and VME. * Various peripherals: a variety of SCSI devices, IDE/Eide drivers, 10 M/M Ethernet Card, Token Ring Nic, FDDI interface card, multiple PCMCIA devices, flash memory, sound card, etc. The openness of lynxos: * Posix.1a, 1b, 1C, bsd4.4, and so on. 1003 or Unix programs can be easily transplanted to lynxos. * Multiple CPU boards are supported: CompactPCI (6u/3u) and standard PCI, VME/eurobus, PC/104, and PC/AT hardware. * Various peripheral adapters: 10/100 Baset Ethernet, SCSI interface, single/multi-channel serial controller, single/Duplex parallel port, clock, timer, IDE interface, high-resolution display adapter, etc. Linux openness: * You can get all Unix development tools. * You can use cheap and common hardware on the market. Through analysis, we can see that the above systems have their own advantages. Therefore, in the platform creation process, users should choose based on their actual needs and the cost-performance ratio. |