News for hackers. Stuff that matters.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by Animats on Friday October 07, 2022 @02:33PM (#33125206)
Around 2003 there was a demo CD. This brings up a nice system with a GUI and browser.[1][2]

QNX started closed source with a free version, went open source, went closed source, went open source after an acquisition, and then went closed source when RIM (Blackberry) acquired them. Then RIM dropped the GUI to focus on whatever it is Blackberry still does.

As I once told one of their sales execs, "quit worrying about people pirating your system and worry about people ignoring it". During the first free version period, people were porting open source software such as GCC, Eclipse, and browsers to QNX. With all the licensing changes, the open source community got fed up with QNX and stopped making versions for it.

We used QNX for our DARPA Grand Challenge vehicle. All our desktop machines ran QNX, and we could run the real-time program on them as well as the vehicle. The real time features were so good that we could have the entire real-time vehicle system running, at hard real time priority, and run a browser or compile without missing a time check.

[1] http://toastytech.com/guis/qnx621.html

[2] https://archive.org/details/qnx_momentics_6.2.1

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by ducktective on Friday October 07, 2022 @02:36PM (#33125254)
1- What's the FOSS alternative that is as good as QNX nowadays? FreeRTOS, NuttX, Zephyr etc are used for MCUs not general purpose computation AFAIK

2- What tech stack (language) you used for those challenges?

3- Your idea on Lisp (for these applications)?

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by Animats on Friday October 07, 2022 @02:46PM (#33125359)
1. Nothing. Someone was writing a QNX-type kernel in Rust. What happened to that? There's L4, but it's too low-level. It's more of a hypervisor. People usually run another OS, usually a stripped-down Linux, on top of L4. QNX offers a POSIX API, so you can run applications directly.

2. C++. Here's the source code. [1]

3. No.

[1] https://github.com/John-Nagle/Overbot/

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by snvzz on Friday October 07, 2022 @02:58PM (#33125489)
>People usually run another OS, usually a stripped-down Linux, on top of L4.

Look into Genode.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by MonkeyClub on Friday October 07, 2022 @05:10PM (#33126901)
> 3. No.

Why? No hope for real RT? (Or otherwise more generally due to the GC?)

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by snvzz on Friday October 07, 2022 @02:57PM (#33125471)
>What's the FOSS alternative that is as good as QNX nowadays? FreeRTOS, NuttX, Zephyr etc are used for MCUs not general purpose computation AFAIK

SeL4 with CAmkES, or Genode.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by jonny_eh on Friday October 07, 2022 @05:14PM (#33126941)
How about WindRiver Linux? https://www.windriver.com/products/linux
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by snvzz on Friday October 07, 2022 @05:35PM (#33127147)
Excluded, because it's Linux, with all its issues.

Huge TCB being the main one.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by andrekandre on Friday October 07, 2022 @07:57PM (#33128442)
tcb... thread control block, aka task_struct?
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by snvzz on Friday October 07, 2022 @08:10PM (#33128515)
Trusted Computing Base.

i.e. The code that needs to be trusted. For Linux, it includes the whole kernel, and it is huge.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by andrekandre on Saturday October 08, 2022 @06:23AM (#33131183)
i see, thanks for the clarification!
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by mise_en_place on Friday October 07, 2022 @03:51PM (#33126117)
Dunno if it’s an alternative but Linux had RT_PREEMPT and you can build a kernel that’s fully preemptable.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by PaulDavisThe1st on Friday October 07, 2022 @04:36PM (#33126589)
It's good, but ... there's "fully preemptable" and there's "fully preemptable". QNX is one of those, RT_PREEMPT kernels are the other.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by burstmode on Saturday October 08, 2022 @02:05AM (#33130183)
RT_PREEMT has nothing to do with "real" realtime. You never know WHEN the preemtion is gonna happen. Might be in 20ms, might be in 200.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by sph on Saturday October 08, 2022 @04:46AM (#33130806)
I just remembered that I've been running my desktop machine with `preempt=full` for a while now. I wonder why it's not the default for consumer distros yet.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by beagle3 on Friday October 07, 2022 @06:06PM (#33127449)
QNX was a true microkernel architecture that worked, and worked well. The basic building block was called IIRC Send/Receive/Reply: Every "system" call looked like a regular function call, but would "Send" a message to a different process, and (usually) suspend the caller; The other process would "Receive", do whatever was requested, and "Reply", at which point control went back (with the response) to the calling process. IIRC it was also possibly to do async calls, but in that case the other process would call ("Send") the response back, rather than "Reply". I might be confusing this with another system though.

device drivers weren't privileged - they were just another process you called into, and could be restarted in the case of a fault (rather than kernel panic or blue screen).

A system that doesn't provide this is not an alternative to QNX; It's just another operating system (which are all, in some ways, alternative to each other and thus QNX, but ...)

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by pyinstallwoes on Friday October 07, 2022 @11:55PM (#33129678)
Sounds like Erlang !
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by Matthias247 on Friday October 07, 2022 @11:39PM (#33129599)
In automotive infotainment systems, where QNX was used a lot in the past, it mostly had been replaced with combinations of Linux or Android on the non-realtime critical systems, and smaller microcontrollers which run realtime OS (OSEK and autosar derivates). The latter are usually not open source.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by pjmlp on Saturday October 08, 2022 @09:18AM (#33132034)
QNX is NVidia's deployment target OS with DRIVE OS for critical systems, with Linux used for development.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by kevin_thibedeau on Saturday October 08, 2022 @12:22AM (#33129771)
Minix 3 is closest to "as good as" minus the realtime support.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by GekkePrutser on Friday October 07, 2022 @02:56PM (#33125464)
It is a shame yes. There is no current desktop RTOS at all afaik.

I know an RTOS does not guarantee smooth desktop performance but I just would love to try it out to compare.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by PaulDavisThe1st on Friday October 07, 2022 @04:35PM (#33126582)
Linux with a kernel built with RT_PREEMPT ?
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by jancsika on Friday October 07, 2022 @07:24PM (#33128191)
"Folks, we're just waiting on word back from the tower while our instrument panel blocks to render a thumbnail of the airport. We should be touching down in 30 to INT_MAX minutes or so. In the meantime if you want to sit back and watch a movie on your entertainment panel we ask that you refrain from apt installing the non-free Nvidia drivers which can sometimes cause our landing gear to stick..."

"Folks, we're going to go ahead and uninstall Gnome and see if we can't get on the ground a little earlier. Should be anywhere from 30 to INT_MAX minutes. In the meantime a flight attendant will be coming around with wired keyboards if you'd like to play a free game of Snake on your Entertainment terminals..."

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by PaulDavisThe1st on Friday October 07, 2022 @07:28PM (#33128226)
funny, but really far from on point.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by sgtnoodle on Saturday October 08, 2022 @04:23AM (#33130712)
Indeed. I've seen Preempt RT patched Linux control space ships.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by rurban on Monday October 10, 2022 @04:56AM (#33149261)
And the space shuttle (via dSpace)
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by ducktective on Saturday October 08, 2022 @02:30AM (#33130274)
"ok let's run this terminal snake game they are talking about...aaaannd

  libc.so.6: version `GLIBC_2.28' not found (required by /usr/bin/snek)"
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by MisterTea on Friday October 07, 2022 @05:19PM (#33126986)
> There is no current desktop RTOS at all afaik.

Plan 9 has deadline scheduling out-of-the-box for real-time. It runs on x86-64, 386, Arm v7 and AArch64 (And more): http://doc.cat-v.org/plan_9/real_time/ (mostly obsolete but describes the motivation and implementation)

See proc(3) man page for deadline scheduling (towards the bottom real-time i described): http://man.9front.org/3/proc (I always recommend the actively maintained 9front fork)

The best part is you don't need special patches or libraries. You simply configure the process/group by writing messages to the procs ctl file using the command line, a script, or from within your program.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by GekkePrutser on Friday October 07, 2022 @06:56PM (#33127948)
Interesting. Is that a desktop OS though? I'll have a play with it soon. Thanks for the heads-up.
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by MisterTea on Friday October 07, 2022 @07:12PM (#33128093)
It is a distributed OS that can run as a standalone workstation or desktop/laptop. Although it looks like Unix, it is not (same creators though).
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by fulafel on Saturday October 08, 2022 @02:20AM (#33130232)
Lots of unixes have real time scheduling classes (Linux too), comes with the POSIX RT APIs. Is there information somewhere about the real-timeness performance of Plan 9 that could be compared with current general purpose operating systems?
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by torginus on Sunday October 09, 2022 @01:30PM (#33143363)
FWIW, Windows is not a true RTOS, but it does get pretty darn close.

The true hallmarks of an RTOS kernel is hard-realtime scheduling usually with round-robin priorities, and support for priority inversion, which is when a low priority process blocks a high priority one, it inherits the high priority temporarily to meet the deadline.

Windows is threads have a priority, with the highest priority thread occupying the CPU - however there's a series of 'hacks' that allow it to emulate real time behavior.

Threads can get a priority boost in some cases, such as the aforementioned priority inversion case, when the user interacts with the program associated with the thread, when the thread hasn't run for a long time etc.

Additionally there's a set of 'real-time' priorities that can preempt all non-realtime priorities and you need admin or kernel access to set this prio level, as these threads will lock up your system because they can't be preempted.

While I wouldn't trust Windows to control an ICBM, but it's good enough at giving resources to user processes so the your UI feels responsive.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by jcelerier on Friday October 07, 2022 @04:03PM (#33126244)
this demo cd is my benchmark of how a computer is supposed to feel like. if UI interactions are in any way slower than what this provides (on, say, 2008-era hardware), it's basically poop
Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by wakeupcall on Friday October 07, 2022 @04:41PM (#33126640)
I was using it at that time as my main desktop OS. I ported and wrote several tools of it. The gui itself was simple, nice to use and to program for.

Driver support wasn't extensive, but the available drivers were working fine. With qnxstart.com at the time and all the oss tooling I didn't have anything missing.

I was in love in a way that only beos gave me before.

This was the last commercial/closed-source OS I ever used in no small part due to the license change.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by brynet on Friday October 07, 2022 @07:02PM (#33128016)
The final fate of self-hosted QNX was super unfortunate, and poor decision making on the part of RIM/Blackberry. QNX completely dropped support for self-hosted QNX Neutrino development after 6.5 [0], and stopped distributing installation media ISOs with 6.6/7.0. Instead you needed to develop everything on macOS/Windows/Linux hosts, make custom specialized images using their published BSPs (Build Support Packages).

So no neutrino hosted compiler toolchain, no desktop. Oh yeah, they also completely killed off their full GUI desktop, the Photon microGUI in QNX 6.6. There was even a working port of Mozilla Firefox to it at some point. You could use all this freely with a hobbyist/non-commercial license in the early 2000s.

[0] http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx....

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by mwcampbell on Friday October 07, 2022 @07:59PM (#33128454)
As a casual outside observer, it seems to me that dropping self-hosted support was a very sensible move. They probably didn't want to spend resources on PC hardware support, particularly for laptops. And of course, a developer's PC doesn't just run development tools; it also has to handle things like connecting to VPNs and being manageable by company IT departments. Some people need accessibility accommodations (e.g. screen readers, magnifiers, or alternative input methods), and there's no reason to assume that this group doesn't (or couldn't) include some developers of niche embedded systems. The list goes on and on. Even desktop Linux doesn't do a great job on all these things, never mind a niche OS like QNX. So doing cross-development from Windows or macOS makes a lot of sense.

Edit to add: Just had a scary thought. What if Red Hat and whoever else is actually spending money on desktop Linux development applied the same logic to desktop Linux itself that I retroactively applied to self-hosted QNX? After all, non-developers don't use Linux, right? (I'm speculating that they'd make that assumption, not saying it's actually true.) And developers can work with Linux by connecting to a remote machine or running a VM on a "normal" (i.e. Windows or Mac) computer. Is there enough economic incentive to keep maintaining and improving desktop Linux that this won't happen? The death of desktop Linux wouldn't actually hurt me, as I mainly use Windows, but I'd still be sad.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by skissane on Friday October 07, 2022 @08:29PM (#33128662)
> dropping self-hosted support was a very sensible move. They probably didn't want to spend resources on PC hardware support, particularly for laptops.

Self-hosting support doesn’t require PC hardware support. You totally can run your toolchain in a VM (every developer using WSL on Windows is doing it). In the past, I’ve put development environments in Docker containers - it makes it easier for people to get started, and on Windows or macOS that’s a VM too.

Making a system self-hosting is exposing it to a broader range of use cases which can help shake out bugs, limitations and performance issues which other use cases don’t. Even if you don’t strictly need it, I still think it is a good idea to maintain that support (even use it in your CI) unless doing so becomes unjustifiably expensive.

Re:The QNX Demo Disk: a full xNix OS, with GUI and browser, ... by password4321 on Saturday October 08, 2022 @07:07AM (#33131337)
Is the latest version of the open source code available online?