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.
1. Overview of Basic Features
QNX is a distributed, embedded, and scalable real-time operating system. It follows posix.1 ,(ProgramInterfaces) and posix.2 (shell and tools), partially following 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.
2. 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. It provides only four types of 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 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 introduced in lynxos 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 microkernel and large kernel, it is a real-time EXE (Realtime executive) architecture. Its reliability and maintainability are not ideal for telecom service systems.
Kurt-Linux has two core components: kernel and 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.
3. Scheduling Policy Analysis
Task Scheduling Policies directly affect real-time performance. Although SchedulingAlgorithmThere are many different types of algorithms, but most of them come from changes in 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 and 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 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;
A SCHED-KURT scheduling policy is added, a static scheduling policy that uses a special scheduling file to record the parameters of a 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.
4. Comparison of operating system services
4.1 QNX system services:
A variety of resource managers, including various file systems and device management, support for 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 and LAN Manager) SMB file system, DOS file system, and CDROM file system.
Device management. Provides high throughput and low overhead interface services between processes and terminal devices.
Graph/window support. Including QNX windows, X Window System for QNX, remote graphical connection to MS Windows NT/95 and X Window systems.
TCP/IP for QNX.
The high-performance, fault-tolerant QNX network, fleet, turns 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.
4.2 system services of lynxos:
Network and communication. Because UNIX/POSIX APIs are used, 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 combined with multi-processing on VME bus, PCI bridge service, CompactPCI Hot-swap services, lynx/HA-DDS distributed data system.
4.3 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.
5. Comparison of Open Systems
For many large and medium-sized systems, most of the software is written on UNIX platforms. Therefore, it is important for RTOs to provide POSIX/Unix APIs.
5.1 QNX openness
Qnx posix compatibility and the Unix-specific compilers, debuggers, X Windows, and TCP/IP provided by QNX are familiar to Unix programmers.
Supports multiple CPUs: AMD elansc300/310/400/410, am386 de/SE, cyrix mediagx, x86 processor (more than 386), Pentium series, STMicroelectronics stpc.
Multiple bus types: CompactPCI, Eisa, ISA, MPE (radisys), STD, 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 cards, Token Ring NICs, FDDI interface cards, multiple PCMCIA devices, flash memory, sound cards, and so on.
5.2 openness of lynxos
Posix.1a, 1b, 1C, bsd4.4, and other compatibility make it easy for programs that follow POSIX 1003 or are used for UNIX to be transplanted to the lynxos.
Supports multiple CPU boards: CompactPCI (6u/3u) and standard PCI, VME/eurobus, PC/104, and PC/AT hardware.
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.
5.3 openness of Linux
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.