When we hear the term operating system, the first thing that comes to mind is the software programs used in desktop and laptop computers, such as Microsoft Windows, Linux, Ubuntu, etc., as well as Android for smartphones. In fact, most digital electronic devices run some form of operating system developed for microcontrollers. The development of microcontrollers has paved the way for numerous embedded system applications that play a crucial role in our daily lives.
One such system we have recently heard about is the Real-Time Operating System, or RTOS for short. An RTOS is an operating system used for real-time applications, meaning it processes data within specified time constraints. QNX and VxWorks are two different real-time operating systems primarily used in industrial and academic environments. The purpose of this article is to provide a fair comparison of the two.
What is QNX?
QNX is a commercial real-time operating system originally developed for embedded systems, initially created by Quantum Software Systems in the early 1980s. This Canadian company later changed its name to QNX Software Systems and was eventually acquired by Research in Motion (RIM), which used it as the foundation for its BlackBerry 10 OS and the later popular BlackBerry Playbook. The version of the operating system used in the Playbook is QNX Neutrino, which is built on a true microkernel architecture. QNX was the first commercially successful microkernel-based operating system. Essentially, QNX is a Unix-based operating system that features a true microkernel design and a modular architecture, where elements of the operating system run as tasks called resource managers, allowing developers to disable any functionality they deem unnecessary for a specific system. The best part about QNX is that it is based on message-based inter-process communication.
What is VxWorks?
VxWorks is a real-time operating system specifically designed for real-time applications with embedded systems for distributed computing. It is a proprietary real-time operating system developed by Wind River Systems, a California-based company that specializes in developing embedded software for smart connected systems. VxWorks is the industry-leading RTOS and has been building embedded systems and devices for over thirty years. It features a monolithic kernel with extensive inter-process communication and synchronization capabilities. Each build of VxWorks is unique because its architecture allows the entire operating system to operate in kernel space, meaning all kernel services and user services reside in the same address space, which enhances the execution speed of the operating system. It provides debugging capabilities, performance monitoring, memory management, CPU scheduling, and other operating system functionalities through system calls.
Differences Between QNX and VxWorks
1. Foundation of QNX and VxWorks
Both are very unique real-time operating systems specifically designed for real-time applications with embedded systems, each loaded with different components with varying functionalities. Both systems are widely used in large industrial and academic environments and have been in operation for decades. QNX was developed as a commercial RTOS by Quantum Software Systems in Canada in the early 1980s and was acquired by RIM in 2010. VxWorks is proprietary software developed by Wind River Systems based in California, a leading industry player specializing in building embedded software for smart connected products and systems.
2. Architecture of QNX and VxWorks
Both operating systems utilize real-time kernels for processing critical task applications, meaning the systems must withstand real-time constraints to ensure responses within predefined time constraints, also known as deadlines. The main distinction lies in the architecture – while QNX is based on a message-passing architecture, VxWorks is suited for a shared memory architecture. Message passing is fundamental to kernel design, allowing the system to pass information from one task to another or to multiple tasks within the system. Shared memory architecture refers to systems with their dedicated address space for physically distributed memory.
3. Core of QNX and VxWorks
One of the main differences between the two real-time operating systems is that QNX is a microkernel-based OS, while VxWorks is a monolithic kernel. A microkernel acts like a small operating system that uses system calls to manage essential services such as address space management, thread management, and inter-process communication. It refers to the need for a limited set of primitives and minimal software dependencies to implement the OS. On the other hand, a monolithic kernel manages all essential services and user-defined services in protected kernel space, including inter-process communication. As a monolithic kernel, VxWorks operates independently.
4. Scheduling
Each thread or process in QNX has its own priority. In QNX, all processes run on a priority-driven preemption basis, meaning the highest priority process accesses the CPU first, with priority levels ranging from 0 to 31. Scheduling is done in real-time, and each thread inherits its parent’s default priority. When two threads share the same priority, QNX employs other scheduling methods such as FIFO, round-robin, and sporadic scheduling. In contrast, VxWorks only utilizes two scheduling algorithms: priority-based preemptive scheduling and round-robin scheduling. Together, they provide users with greater control for effective scheduling.
Conclusion
Both are kernel-based real-time operating systems suitable for real-time applications that require processing and completing tasks within predefined time limits (i.e., deadlines). Both have been in business for over 25 years and specialize in the development of embedded products and systems, but that is where all similarities end. QNX is a microkernel-based real-time operating system that is particularly interesting due to its message-passing architecture, which is well-suited for creating reliable distributed systems. VxWorks, on the other hand, is a monolithic kernel based on a shared memory architecture, making it highly suitable for large industrial environments such as automotive systems, avionics, consumer electronics, and more.