Analysis and Comparison of four real-time operating system features

Source: Internet
Author: User
Article Title: Analysis and Comparison of four real-time operating system features. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.