Linux – Advantages of using a RTOS such as QNX or VxWorks instead of Linux

linuxreal timertosvxworks

When developing a solution that requires a real-time operating system, what advantages would an operating system such an QNX or VxWorks have over Linux?

Or to put it another way, since these operating system are designed specifically for real-time, embedded use – as opposed to Linux which is a more general system that can be tailored to real-time use – when would you need to use one of these operating systems instead of Linux?

Best Answer

Some embedded systems (a) need to meet difficult real-time requirements, and yet (b) have very limited hardware (which makes it even more difficult to meet those requirements).

If you can't change the hardware, then there are several situations where you are forced to rule out Linux and use something else instead:

  • Perhaps the CPU doesn't even have a MMU, which makes it impossible to run Linux (except uClinux, and as far as I know uClinux is not real-time).
  • Perhaps the CPU is relatively slow, and the worst-case interrupt latency in Linux fails to meet some hard requirement, and some other RTOS tuned for extremely low worst-case interrupt latency can meet the requirement.
  • Perhaps the system has very little RAM. A few years ago, a minimal Linux setup required around 2 MB of RAM; a minimal eCos setup (with a compatibility layer letting it run some applications originally designed to run on Linux) required around 20 kB of RAM.
  • Perhaps there is no port of Linux to your hardware, and there isn't enough time to port Linux before you need to launch (pun!) your system. Many of the simpler RTOSes take much less time to port to new hardware than Linux.
Related Question