Wednesday, January 3, 2024

QNX Neutrino 6.1 (2001) - Widely successful but underappreciated outside embedded (part 1 - intro/history)

(this is a slightly edited transcript of part 1 of my YouTube video review of QNX 6.1; here is part 2)

Developer: QNX Software Systems (later acquired by BlackBerry)
Release date: 2001
Family: Unix-like
         * Functional Unix
          * QNX
Kernel type: Microkernel (QNX/L4-type)
Platforms supported: ARM32, POWER/PPC, MIPS, SuperH, x86-32

QNX 6.1's desktop

QNX is one of the earliest and most successful microkernel OSes, with the first version being released in the early 80s. It has been deployed in many kinds of embedded systems, with a few notable examples being some CANDU nuclear reactors, the heat shield inspection camera on later Space Shuttle missions, late-model
GE locomotives
, and quite a few automotive infotainment systems. The Unisys ICON computers used in some schools in the Canadian province of Ontario back in the 80s and early 90s ran early QNX versions. BlackBerry also based the PlayBook and BB10 OSes on it. Up until 2014 it was possible to run it as a desktop OS. However, despite being quite successful in the embedded market, it has had little direct influence on anything else.

Architecture and related systems

It is a functional Unix, in other words, it has an API and shell environment that are highly compatible with genetic Unices like System V and BSD. 


QNX's place in the Unix-like family

However, it is not derived from AT&T or BSD code, nor is it derived from Linux, and is based on a rather different architecture than any of those systems. Due to its unconventional architecture, it has a few advantages over conventional Unices. If you want more information on the classification of Unix-like OSes I have made a blog post and video explaining it in more detail.


For those who are unfamiliar with microkernel architecture, it means that the kernel - the lowest level and most privileged part of the OS - is ideally reduced to providing only basic multitasking, memory management, and communication between tasks. The rest of the OS is implemented as a collection of tasks running on top of the microkernel. This is quite unlike mainstream OSes, which are all based on monolithic kernels, with higher-level subsystems like device drivers, disk filesystems, and networking in the kernel. 

 

Comparison of generalized monolithic and microkernel systems

Architecture of QNX Neutrino (not all system tasks shown)

Since microkernel OSes run most of the OS as memory-protected tasks, well-designed ones are significantly more secure, stable, and extensible than those based on monolithic kernels. I have made a blog post and video explaining microkernel architecture in more detail.

The only working OSes of which I am aware that have significant architectural influence from QNX are VSTa, OpenBLT, and WiNGS, all of which are long abandoned hobby OSes from the late 90s and early 2000s. 

VSTa 1.6.8 (2002); x86 PC (QEMU)

 
OpenBLT 2000-05-17; x86 PC (QEMU) 

WiNGS (WoC 2004); Commodore 64 (VICE)


WiNGS, showing contents of a few directories
 
WiNGS; GUI

There are several other OSes that happen to resemble QNX in various ways but as far as I know no other OS has much direct QNX influence. There was also a slightly later project to write a direct QNX clone in x86 assembly called RadiOS, but this was abandoned in a pre-alpha state and was never able to run anything other than a simple test program. I am also writing my own QNX-like OS, but it is still in a very preliminary state at the moment. I did a presentation on this for FOSDEM 2022, and the source is available on GitLab

 


History


The first version of what would become QNX was written in 1980 by Gordon Bell and Dan Dodge, who were students at the University of Waterloo taking a course in real-time OS development. They founded Quantum Software Systems the same year to commercialize the OS they wrote for the course. They had worked with an early research microkernel OS from Waterloo called Thoth, which seems to have been a significant architectural influence on QNX, with the earliest versions of QNX being the most similar to Thoth. A few other OSes besides QNX were architecturally inspired by Thoth although none of them was quite as successful as QNX.

QNX's history can be divided into three major stages, which are distinct enough to be considered as a family of three separate OSes based on a similar architecture rather than just as successive versions of the same system. There is no binary compatibility between the three stages, and source compatibility is only partial. 

QNX Classic

The first stage of QNX (which I like to call "QNX Classic") includes the early alphas and betas as well as major versions 1 and 2. The earliest beta versions spelled the name as QUNIX but this was changed fairly early on in order to avoid trademark infringement. 

QUNIX 0.4 (1981); IBM PC 5150 (PCE)
 

Despite the spelling and official pronunciation being changed to QNX, it is still relatively common to hear it pronounced as QUNIX to this day. QNX Classic was Unix-like but was not quite a functional Unix. For instance, it used a filesystem model that was sort of DOS-like with per-filesystem root directories identified by drive number prefixes, as well as reserved names for non-disk device files. Many of the commands were rather different from their Unix equivalents as well. 

QNX 1.2 (1983); IBM PC XT (PCE)

QNX 1.2 shell showing files and tasks

Later versions of QNX 2 introduced a GUI called QNX Windows, which looks similar to Open Look on SunOS and Solaris although it is based on a custom window server rather than X11. 

QNX 2.21 (1989); x86 PC (86Box)

QNX 2.1, showing file manager and Mandelbrot set viewer

The earliest versions of QNX ran on both x86 and 6809, but 6809 support was dropped at a fairly early point. The x86 versions were 16-bit only, with the beta and 1.x versions being real-mode only and 2.x adding support for protected mode. Later versions did have support for some 386 features but were still almost entirely 16-bit.

QNX 4


QNX 4 was the second stage of QNX (version 3 was just another name for version 2 running in protected mode), with the first version being released in 1990. Around the release of 4.0, the company changed their name from Quantum Software Systems to QNX Software Systems. Unlike QNX Classic, QNX 4 was a functional Unix with high POSIX compatibility, although it was still a bit nonstandard in some ways. Later versions of QNX 4 introduced a new GUI called Photon, resembling a mixture of Motif and Windows 9x, based on an all-new custom window server, although QNX Windows continued to be supported. 

QNX 4.25 (1997); x86 PC (QEMU)

QNX 4.25

Real-mode support was dropped, but early versions were still 16-bit only. Full support for 32-bit protected mode was added later on, although QNX 4 continued to be x86-only. 16-bit support was dropped in later versions. This was the version that the somewhat well-known demo disks from the late 90s were based on. These had a minimal system including Photon and a fully functional browser on a single floppy, showing off how lightweight a QNX system can be while still having a fair bit of functionality.

The QNX 4.25 demo disk system

The QNX 4.25 demo showing the process listing

QNX Neutrino

The third and current stage is QNX Neutrino, which spans 5 major versions, with the first being released in 1996. Neutrino added better support for multithreading and better compatibility with code ported from Linux compared to QNX 4, and was generally more standard. Support for non-x86 architectures was also added. Support for QNX Windows was dropped and Photon continued to be the primary GUI up until version 6.6. 6.4 introduced yet another custom window server, this time a compositor just called screen, but this is intended only for embedded use and doesn't include any applications or desktop environment. Neutrino 1 and 2 were targeted at lower-end embedded systems and didn't support self-hosted development, with QNX 4 continuing to be developed alongside Neutrino for a while. 

QNX Neutrino 2.0 (1998); x86 PC (QEMU)

Several version numbers were skipped and the version after 2.1 was 6.0, which supported self-hosting and replaced QNX 4 as the main version. It also introduced Photon 2, with a new GUI theme that looked quite different from Photon 1 under previous versions of QNX 4 and Neutrino, although it is still fairly similar functionally. Early in the development of QNX 6, Gateway, who owned the Amiga platform at the time, made a deal to base a new version of AmigaOS on it, but this fell through pretty quickly and I'm not sure if anything ever became of it other than a few GUI mockups. 

Amiga QNX desktop (mockup?)


Amiga QNX desktop (mockup?)

Amiga QNX desktop (mockup?)

I suspect that the vaguely Amiga-like appearance of Photon 2 might be a remnant of the Amiga partnership. However, this wasn't quite the end of the QNX-Amiga relationship because Haage and Partner would release an Amiga emulator for QNX called AmigaXL, although this was mostly just a self-contained 68k Amiga emulator with a few hooks into the QNX desktop rather than a complete QNX-based replacement for classic AmigaOS. 

Moving on to more recent releases, QNX 7.0 was released in 2017, with one of the biggest additions being support for 64-bit processors, both x86 and ARM. The current version as of this video is 8.0, released in 2023, with the main focus being scalability to higher numbers of cores.

Acquisitions and mobile derivatives

In 2004, QNX Software Systems was acquired by Harman International, and in 2007 some of QNX's source was released publicly under a rather restrictive license, although this wouldn't last long because they were acquired by BlackBerry in 2010, who immediately discontinued public source access. BlackBerry would then go on to base the PlayBook OS and the BB10 smartphone OS on QNX. 

BlackBerry Tablet OS 1.0 (2011); BlackBerry PlayBook
 
BB10 (2013?); BlackBerry Z10

Unfortunately, neither was particularly successful due to limited native application support and a sub-par Android compatibility layer. Despite their failures at basing mobile OSes on it, QNX is still one of BlackBerry's biggest products since it continues to be widely used in embedded systems.


I am planning on reviewing earlier versions of QNX eventually as well. I started with Neutrino 6.1 because I consider it to be the height of QNX on the desktop, and it was also the first version of QNX I used. It seems that they were trying to promote QNX as a desktop OS at the time, with the entire OS including development tools being free to download for non-commercial use, and it was popular enough that a few online archives of downloadable software such as Tucows carried QNX software. In fact, Tucows was how I discovered QNX when I saw it in the list of platforms. It was even possible to install QNX in a folder on a Windows partition and boot it from the Windows boot menu, similar to later versions of BeOS. After 6.1, general desktop use slowly became less and less of a priority. The later versions left out some things like some of the development tools from the freely available non-commercial distribution, and eventually desktop and self-hosting support were dropped in version 6.6 with the removal of Photon. QNX has always made more money on embedded systems than anything else and competing in the commercial desktop OS market has been rather difficult since the late 90s and hasn't gotten any easier, so it isn't particularly surprising that they let desktop support fall by the wayside.

Part 2

No comments:

Post a Comment

QNX Neutrino 6.1 (2001) - Widely successful but underappreciated outside embedded (part 2 - tour of installer and running system)

(this is a slightly edited transcript of part 2 of my YouTube video review of QNX 6.1; here is part 1 )   Installation Native installer QNX...