Академический Документы
Профессиональный Документы
Культура Документы
MCKEGNEY
STUDENT #: 426 7519
7 JUNE 2000
RMC EEE 551 – QNX REALTIME OPERATING SYSTEMS
1. ABOUT QSSL
2. QNX 4 RTOS
This section will discuss the QNX 4 RTOS. Contents come from [QNX00] and [Krt98].
2.2 Microkernel
The QNX 4 microkernel has four main responsibilities:
• IPC: Inter-process communication mechanisms include blocking send(), receive(), reply()
and asynchronous signals and proxies. Message data is copied directly from one processes
address space to another’s, and message queues are not explicitly supported.
• Network Interface: The kernel provides a mechanism for fast and transparent IPC between
QNX nodes connected to a LAN.
• Scheduling: When multiple processes are ready to run at the same priority level, the kernel
uses the associated scheduling algorithm to choose which goes first. Supported algorithms are
FIFO, Round Robin, and adaptive (similar to round-robin, but if a process uses up its entire
time slice its priority is decremented).
• Interrupt redirection: When a hardware interrupt occurs, the kernel is responsible for
spawning the appropriate handler routine.
System processes are responsible for all other OS functionality; these include the Process
Manager, Filesystem managers, Device managers, and Network managers. In this way the RTOS
can be scaled to fit virtually any system requirements.
2.3 Process Manager
The process manager is responsible for creating new processes, and for managing process
resources. This is a required process (i.e. QNX 4 cannot be configured without it), and is the only
process that shares address space with the kernel.
QNX programmers are provided with four primitives for process creation:
• exec(): Temporarily replace the current process with another process.
• spawn(): Create a new process, and run it.
• fork(): Create a duplicate of the current process, and run it.
• tfork(): Like fork, but spawns a thread.
Depending on the primitive selected, different process information (e.g. process ID, data, open
files, etc.) will be inherited from the current process.
The process manager also manages timers, which are implemented using a simple mechanism:
the system clock delivers periodic interrupts, which are handled by the ISR in the kernel; the
system will update its ‘time-of-day’ variable to reflect the passing of time, and compare this with
the expiry times of all running timers; if a timer has expired, it will be put at the end of the queue
for its priority; when run, the timer will send either a signal or a proxy.
3.6 Filesystems
Filesystems are resource managers, providing services as defined in the POSIX API: (open(),
close(), read(), write(), lseek(), etc.). This implementation means that: filesystems can be started
and stopped dynamically; multiple filesystems can run concurrently; each filesystem has a
distinct and consistent pathname space. Neutrino supports the same filesystem types as QNX 4
(QNX, POSIX, NFS, etc.)
3.7 TCP/IP Networking
Neutrino supports the BSD TCP/IP protocol using the Neutrino Tiny TCP/IP stack resource
manager. Note that this is an alternative to FLEET networking, but necessary in order to
communicate with nodes that are not running Neutrino.
4. CLASSIFICATION
QNX 4 Neutrino
x86 MIPS
AMD: Elan SC300, Elan SC310, Elan SC400, IDT: R4700
Elan SC410
NEC: VR4102, VR4111, VR4300, VR5000
Cyrix: Media GX
QED: RM5260, RM5261, RM5270, RM5271
Intel: 386 EX, 486, Pentium, Pentium II,
Various: R4000, R5000
Pentium III, Pentium Pro, ULP 486
PowerPC
STMicroelectronics: STPC
Motorola: 401, 403, 603e, 604e, 750, MPC821,
MPC823, MPC860
x86
AMD: Elan SC300, Elan SC310, Elan SC400,
Elan SC410
Cyrix: Media GX
Intel: 386 EX, 486, Pentium, Pentium II,
Pentium III, Pentium Pro, ULP 486
Native Development:
• Watcom C/C++
• GNU Tools
Other:
• Photon developer’s toolkit
• Internet Appliance toolkit
• QNX In-Hand Toolkit
• TCP/IP Developer’s Toolkit
• WebPAD
• Third-party Development tools
4.3 Services
QNX 4 Neutrino
4.4 Footprint
Specific footprint information is difficult to find. The QNX 4 microkernel is approximately 12K
(which means that often it can fit completely in CPU cache). However, a minimal configuration
also requires that the process manager be included. The minimal Neutrino configuration is
slightly smaller, since the kernel can be run standalone. Every aspect of both QSSL RTOSs is
scaleable, from the basic operating system services to the GUI.
To demonstrate the small footprint of its software, QSSL is giving the “1.44M web challenge”.
From their website, they are offering a download that will fit on a diskette, containing the
following: QNX Realtime OS, Photon microGUI, HTML 3.2 web browser, Web server, TCP/IP
with PPP, Internet dialer. When you boot an x86 machine from the floppy, the components are
loaded into RAM.
4.5 Performance
QNX 4* Neutrino
Scheduling latency
7.8 usec (P133)
Network Throughput
1.1 Mbytes/s (10 Mbit Ethernet)
7.5 Mbytes/s (100 Mbit Ethernet)
*Based on system with Pentium/133 with an Adaptec 2940 Wide SCSI controller, a Barracuda
SCSI-Wide disk drive, a 100 Mbit PCI-bus Digital 21040 Ethernet card, and a 10Mbit ISA-bus
NE2000 Ethernet card.
4.10 Licensing
QNX RT-Platform will soon be available free of charge for non-commercial purposes. It
includes:
• QNX neutrino microkernel (single processor and SMP versions)
• OS modules (file systems, networking, etc.)
• Graphical windowing systems (Photon, X-windows)
• Utilities and libraries
• TCP/IP stacks
• GNU tool chain (GCC, G++, GDB, and graphical debugger)
Some source code will also be freely available shortly; only the kernel and other core portions of
the QNX platform will remain protected.
4.11 Reputation
Reputation is a subjective criterion, and should be judged accordingly. QSSL is known for
providing very elegant microkernel-based solutions. They are also known to be driven by their
major customers (particularly Cisco) – which means that if their major customer’s do not demand
a feature, then it will not be given high priority.
5. DISCUSSION
Strengths Weaknesses
Strengths Weaknesses
REFERENCES
[Krt98] Krten, R. Getting Started with QNX 4: A Guide for Realtime Programmers. PARSE
Software Devices, 1998.
[QNX97] QNX Software Systems Ltd. QNX Operating System: System Architecture (2nd
Edition). October 1997.
[QNX00] QNX Software Systems Ltd. Home Page. http://www.qnx.com. Available 2000.