Analysis and comparison of four kinds of real-time operating systems _unix Linux

Source: Internet
Author: User
Tags compact error handling posix

The characteristics of four real-time operating systems (RTOS) are analyzed and compared in this paper. They are: Lynx Real-Time Systems Inc. 's LynxOS, QNX Software Systems Limited, and two representative real-time linux--Kansas at Rt-linux and Kurt-linux University of the New Mexico Institute of Technology.

In recent years, the real-time operating system has been widely used in many fields such as multimedia communication, online transaction processing, production process control, traffic control and so on, and it has attracted more and more attention.

1. Overview of basic Features

QNX is a distributed, embedded, scalable, real-time operating system. It follows Posix.1, (program Interface) and POSIX.2 (shell and tools), partially following posix.1b (real-time extensions). It was first developed in 1980 and is now quite mature.
LynxOS is a distributed, embedded, scalable, real-time operating system that follows the posix.1a, POSIX.1B, and posix.1c standards. It was first developed in 1988.
Rt-linux is an embedded hard real-time operating system that partially supports the POSIX.1B standard.
Kurt-linux is not designed for embedded applications, unlike hard (hard) real-time/soft (soft) real-time applications, they present the concept of "strict (firm)" Real-time applications, such as multimedia applications and ATM network applications, and KURT are "rigorous" real-time systems designed for such applications.

2, the system structure similarities and differences

The implementation of real-time system is a micro-kernel architecture, which makes the core compact and reliable, easy to rom-curing, and can be modular expansion. In the micro-kernel structure system, the OS Service module runs in a separate address space, so the memory errors of different modules are isolated. But it also has weaknesses, and the overhead of interprocess communication and context switching is greatly increased. Compared with the large integrated kernel system, it must do the same task by making more system calls.

QNX is a micro-kernel real-time operating system with a core of 4 services: process scheduling, interprocess communication, underlying network communication, and interrupt processing, and the process runs in a separate address space. All other OS services are implemented as collaborative user processes, so the QNX core is very compact (qnx4.x approx. 12Kb) and runs extremely fast.

LynxOS is not yet a microkernel-structured operating system, but it plans to use so-called "Galaxy" technology to transform it from a large integrated kernel into a microkernel, a technology that will be introduced in LynxOS 3.0. The new 28Kb microkernel provides the following services: Core start and stop, underlying memory management, error handling, interrupt handling, multitasking, low-level synchronization, and mutex support.

Rt-linux implements a small real-time core that only supports low-level task creation, interrupt service routines loading, underlying task communication queues, interrupt service routines (ISR), and Linux processes. The original Non-real-time Linux core runs on the small core as a preemptive task, and all tasks are run in the core address space. It is different from the microkernel and the large kernel, and belongs to the real time EXE (Realtime Executive) architecture. Its reliability and maintainability are not ideal for telecommunication service systems.

The Kurt-linux core consists of two parts: the kernel and the real-time module. The kernel is responsible for scheduling real-time events, and real-time modules provide specific real-time services for user processes. It does not belong to the microkernel structure.

3, Scheduling strategy analysis

Task scheduling strategy is a factor that directly affects real-time performance. Although the scheduling algorithm is varied, it is mostly changed by the monotone rate algorithm (RM) and the earliest term priority algorithm (EDF). The former is mainly used for static periodic task scheduling, the latter is mainly used for dynamic scheduling, and the two algorithms have advantages and disadvantages in different system states. The practical strategies used in commercial products are often a compromise of various factors.

QNX provides posix.1b standard process scheduling:
32 process priorities;
Preemptive, priority-based text switching;
Optional scheduling strategy: FIFO, rotation strategy, adaptive strategy.
LynxOS Its scheduling strategy is:
LynxOS supports threading concepts and provides 256 global user thread priorities;
Hard real-time priority scheduling: A rotation scheduling, a quantitative scheduling and a FIFO scheduling strategy are implemented on each priority level;
Fast text switching and blocking time is short;
Preemption of the RTOs core.

Rt-linux
Under the operating system to achieve a simple real-time core, Linux itself as a preemptive task in the nuclear operation, the lowest priority, at any time by the high-priority task preemption.
Users can write their own scheduler, they can be implemented as the core module can be loaded;
The implemented scheduler has: Preemptive scheduling based on priority and EDF dispatching;
Priority-based scheduling uses the monotonic rate algorithm, which supports cycle tasks directly.

Kurt-linux
Can be run under two states: normal state and real-time state. In the normal state, all processes can run, but some core services will bring the unpredictability of interrupt masking. Real-time mode allows only real-time processes to run.
It supports FIFO scheduling strategy, rotation scheduling strategy and UNIX time-sharing scheduling strategy.
The Sched-kurt scheduling strategy is added, which is a static scheduling strategy that uses a special dispatch file to record the predefined parameters of the scheduled process.

From the above, we can see that the first three kinds of scheduling strategies are more standard, especially two kinds of commercial rtos, follow or part follow the POSIX.1B real-time scheduling standards.

4, operating system services comparison

4.1 QNX System Services:

Multiple resource managers, including various file systems and device management, support multiple file systems running simultaneously, including a POSIX file system with full posix.1 and UNIX syntax, embedded file systems that support multiple flash devices, and support for multiple file servers such as Windows NT/95, LAN Manager, etc.) transparent access to SMB file system, DOS file system, CDROM file system, etc.
Equipment management. Provide large throughput and low overhead interface service between process and terminal equipment.
Graphics/window support. Includes QNX windows, X Window System for QNX, and remote graphics connections to MS Windows nt/95 and X Window systems.
TCP/IP for QNX.
The high-performance, fault-tolerant QNX network--fleet makes all computers connected to the network become a logical supercomputer.
Transparent distributed processing. The integration of Fleet Network processing with message delivery and process management primitives unifies the local and network IPC, making the network transparent to IPC.

4.2 LynxOS System Services:

Network and communication. Because the use of Unix/posix Api,lynx is ideal for data communications and Internet applications. Because of the openness of the system, the network software can easily be transplanted to the lynx. Similarly, Lynx also provides key telephony protocols that apply to infrastructure, operations, and multimedia applications of telecommunications systems.
TCP/IP protocol stack. Lynx's own optimized TCP/IP protocol stack provides high-performance services such as TCP head prediction, advanced routing algorithms, IP-level multicast, and link-level high-speed buffering.
Internet Tools. Includes Telnet, FTP, TFTP, PPP, SLIP, embedded Java Virtual machine for real-time dispatch, embedded HTTP server, BOOTP, arp/rarp, DNS domain name service, email, PERL, telephone communication protocol, etc.
SVR3 flow. The LynxOS flow mechanism provides core support for developing and porting streaming based drivers and applications.
File system. Real-time Unix-like hierarchy file system: Continuous structure files, with buffer/no buffering, raw partitions, and raw device access.
Graphical user interface based on motif.
Distributed computing resources. SCMP is combined with multiple processing on VME bus, PCI bridge service, CompactPCI Hot-swap Services, LYNX/HA-DDS distributed Data System.

4.3 Linux's system services:

Recently, many Linux based real-time applications have been developed, and they are mature and rich in resources.

UNIX users ' development tools and applications are ported to Linux.
TCP/IP network protocol.
Various Internet client/server software.
X Window.
Language compilers for C + +, Java, and so on.

The common features of the above systems are the graphical interface, various network support and other necessary tools. QNX is a more traditional "distributed" concept of the operating system, the goal is to turn the entire LAN into a large supercomputer, so that the presence of the network transparent to the user, the file system provides a wealth of services. However, the higher the level of distribution also means that the overhead of the system increases. LynxOS is focused on providing a rich network of services, while the biggest advantage of Linux is the economy, but also through newsgroups or mailing

5, System open contrast

For many large and midsize systems, most software is written for UNIX platforms, so it is important that RTOs provide a Posix/unix API.

5.1 QNX's openness

QNX's POSIX compatibility and its Unix-featured compilers, debuggers, X windows, and TCP/IP are familiar to UNIX programmers.
Supports a variety of CPU:AMD elansc300/310/400/410, Am386 de/se, Cyrix MediaGX, x86 processors (more than 386), Pentium series, STMicroelectronics Stpc.
Multiple buses: CompactPCI, EISA, ISA, MPE (Radisys), STD, STD 32, pc/104, Pc/104-plus, PCI, PCMCIA, VESA, VME.
Various peripherals: A variety of SCSI devices, Ide/eide drives, 10m/100m Ethernet cards, Token ring network card, FDDI interface card, a variety of PCMCIA devices, flash, sound card and so on.

The openness of 5.2 lynxos

Compatibility with POSIX.1A, 1b, 1c, and BSD4.4 makes it easy to migrate to LynxOS with POSIX 1003 or UNIX-compliant programs.
Supports a variety of CPU motherboards: Includes COMPACTPCI (6U/3U) and Standard PCI, Vme/eurobus, pc/104, and pc/at hardware.
Various peripheral adapters: 10/100baset Ethernet, SCSI interface, single/multi-channel serial controller, single/duplex parallel port, clock, timer, IDE interface, high resolution display adapter, etc.

5.3 Linux's openness

Users can get all the development tools for UNIX.
You can use hardware that is cheap and common on the market.

Through analysis, we can see that the above systems have advantages, therefore, in the platform to build the process, users should be based on their actual needs and combination of performance and price ratio to choose.

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.