News for hackers. Stuff that matters.
Re:Debian GNU/Hurd 2023 released by dale_glass on Monday June 12, 2023 @07:54AM (#36292030)
The debate is sort of obsolete really.

* Linux has microkernel-like functionalities like FUSE. You can do filesystems in userspace now.

* The modern approach to High Availability is to have redundant hardware. A single machine being fault tolerant isn't that important anymore.

* Hardware became far more complex. A modern video card or anything else is its own computer, with a very uncomfortable amount of state and access to the host. If your video card driver does something wrong and crashes it's by no means a given that the situation is recoverable by rebooting the driver -- the video card itself may be left in some weird state.

* Software is also far more complex. Great, your system theoretically can survive a video card driver dying. Too bad the compositor can't survive that, and the applications can't survive the compositor crashing, and at that point you might as well reboot anyway.

* Modern testing and debugging is excellent and having a system kernel panic is something that happens very, very rarely. It's not really worthwhile to change the system architecture for the sake of something than happens less often than I accidentally unplug my desktop's power cable.

* For HURD specifically, if you're in need of extreme reliability today, C is probably not something you want to use. Rather than dealing with stuff crashing you probably want to write code doesn't suffer from such issues to start with.

Re:Debian GNU/Hurd 2023 released by senko on Monday June 12, 2023 @08:58AM (#36292697)
> The debate is sort of obsolete really.

Microkernels are not obsolete (see seL4), but HURD unfortunately is.

> Linux has microkernel-like functionalities like FUSE. You can do filesystems in userspace now.

FUSE is far cray (capability, security and performance-wise) from real microkernels. Linux is a monolithic kernel and unashamedly so.

> The modern approach to High Availability is to have redundant hardware. A single machine being fault tolerant isn't that important anymore.

This would imply operating system developers (in any) OS are not that much interested in reliability of the system they're working on, which I don't believe is true. Also, to give just one counter-example, I don't think many people have redundant mobile phones in case one of them crashes.

> A modern video card or anything else is its own computer, with a very uncomfortable amount of state and access to the host. If your video card driver does something wrong and crashes it's by no means a given that the situation is recoverable by rebooting the driver -- the video card itself may be left in some weird state.

This was more-or less true from the moment discreete GPUs started shoping up. Modern PCs have dozens of independent processors (some of them running their own opertaing systems)! If anything, that's more reason for microkernels.

* Software is also far more complex. Great, your system theoretically can survive a video card driver dying. Too bad the compositor can't survive that, and the applications can't survive the compositor crashing, and at that point you might as well reboot anyway.

Microkernels aren't written like that. In a MK architecture, your system survives video card driver dying by restarting it and taking over serving its clients (in this case, the compositor). Of course, Linux doesn't work like that, but we've already established Linux is not a microkernel.

> Modern testing and debugging is excellent and having a system kernel panic is something that happens very, very rarely. It's not really worthwhile to change the system architecture for the sake of something than happens less often than I accidentally unplug my desktop's power cable.

Yeah, I agree Linux will never changi its system architecture, but that doesn't mean thinking, researching and building other operating systems using different architectures is obsolete.

> For HURD specifically, if you're in need of extreme reliability today, C is probably not something you want to use. Rather than dealing with stuff crashing you probably want to write code doesn't suffer from such issues to start with.

Ah yes, ye olde "just don't write bugs!" argument :-)

More seriously though, I would agree with you that replacing GNU/Linux with GNU/Hurd will never happen. I just want to emphasize Hurd is not be-all and end-all of microkernels (even open source ones). In fact, it never was.

Re:Debian GNU/Hurd 2023 released by dale_glass on Monday June 12, 2023 @09:42AM (#36293284)
> Microkernels are not obsolete (see seL4), but HURD unfortunately is.

Why HURD specifically?

But I didn't mean microkernels, but the debate. Basically my view is that nothing stays pure. If microkernels have significant upsides a monolithic kernel like Linux doesn't have, then the logical outcome is that Linux copies the required feature like eg, FUSE.

Yeah, it's not a true microkernel, but who cares? It can do the cool thing. Nobody cares about purity. Computing is about getting stuff done.

> Also, to give just one counter-example, I don't think many people have redundant mobile phones in case one of them crashes.

A modern cell phone has a tendency to forget stuff anyway. I mean Android will just randomly stop background programs when it pleases, so every app has to deal with that possibility. So the phone rebooting has little effect, other than taking time.

> This was more-or less true from the moment discreete GPUs started shoping up. Modern PCs have dozens of independent processors (some of them running their own opertaing systems)! If anything, that's more reason for microkernels.

How so? I have two overall points here:

1. With hardware being complex and stateful, rebooting the driver may just not help. If something inside the video card is locked up, no amount of rebooting the driver is going to fix that.

2. There are complex webs of dependency, which often aren't easy to resolve in a fault tolerant manner. Most stuff will probably just crash anyway even if recovery is theoretically possible. Recovery paths are very rarely exercised.

> Yeah, I agree Linux will never changi its system architecture, but that doesn't mean thinking, researching and building other operating systems using different architectures is obsolete.

No, I mean it's not worth it to the average person to switch to a different OS for the sake of a benefit that might materialize extremely rarely. I'm not itching for a better OS which can survive a driver crash because the time when that happens for me is essentially never.

I think in the last 3 years I might have seen one kernel panic. Switching to a very different OS for the sake of having a system that can survive such a freak occurrence would be wasting my time. I'd spend far more time learning HURD than I'd gain in productivity.

> Ah yes, ye olde "just don't write bugs!" argument :-)

This, but unironically. If you're concerned about reliability, then the better approach is to avoid failures to start with. Rather than having a system that can tolerate something overflowing a buffer and crashing, how about a system that doesn't allow you to even compile something that does that?

Huge advancements have been made in creating languages that lack many of the stupid pitfalls of C.

Re:Debian GNU/Hurd 2023 released by senko on Monday June 12, 2023 @09:50AM (#36293399)
> Why HURD specifically?

Because Hurd is (in my understanding) exactly the solution in search of a problem you're talking about. It's microkernel for the sake of being microkernel, but tied to the past (POSIX/UNIX model).

Actually innovative microkernels can do things Linux or other mainstream monolithic OS can't just copy (and that's why they're interesting).

Again using L4 as an example, have a look at discussion here: https://news.ycombinator.com/item?id=35842240 (but there are also other interesting designs, eg QNX)

Nobody forces you to switch to a differnent OS, but that doesn't mean it's pointless to research and build different systems.

Re:Debian GNU/Hurd 2023 released by kramerger on Monday June 12, 2023 @02:40PM (#36298810)
Do you have any actual (and professional) experience with sel4 and qnx?

Because we have shipped products with those and boy I wish we had used Linux instead!

Limited, expensive, developer unfriendly and surprisingly, quite unstable under certain loads.

Re:Debian GNU/Hurd 2023 released by senko on Monday June 12, 2023 @03:21PM (#36299499)
Not professional experience (I wasn't paid to build stuff on it), no, just hobby use (of earlier version of L4, L4Ka::Pistachio, and QNX once they started opening up before selling to RIM).

I believe you the developer experience was years behind Linux. That doesn't invalidate my claim that microkernels are interesting (and that these two are innovative), unless your pain was explicitly due to the microkernel nature of things.

Re:Debian GNU/Hurd 2023 released by kramerger on Monday June 12, 2023 @04:59PM (#36301033)
Interesting, yes. Not questioning that.

But just last month we have had some _serious_ issues with QNX (which is supposed to be the top dog ukernel in 2023). For example IPC performance takes a nosedive in certain (not very uncommon) situations, which is not good for an RTOS. Talked to other people working with QNX and they have had similar problems.

Linux in a similar product has worked far far better. I understand the hype around microkernels and all that, but there is a reason they are not used in anything but the most basic products.

Re:Debian GNU/Hurd 2023 released by martin8412 on Monday June 12, 2023 @10:45AM (#36294428)
Hurd is never going to be more than at best a research project, more likely a hobby project. All semi-modern hardware requires proprietary blobs to function properly.

It would be great if all firmware and drivers was open source, but that's not going to happen anytime soon.

FSF is largely a joke in the way they certify RYF hardware. Proprietary blobs are all good as long as they're loaded from a separate flash that can't be updated by the main CPU, but if you load exactly the same firmware from the filesystem it's not okay.

Re:Debian GNU/Hurd 2023 released by mattl on Monday June 12, 2023 @02:35PM (#36298715)
I thought proprietary blobs were only "okay" if they were burned into ROMs and thus presented as hardware and not software?
Re:Debian GNU/Hurd 2023 released by janneke on Wednesday June 14, 2023 @10:43AM (#36326762)
What I don't understand is why people are so willing to install and run opaque binary blobs, even is it's from/supporting free software-hostile Evil Corp. I've been running GNU Guix, which uses Linux-Libre--i.e., no blobs-- on my Dell XPS-13 and Lenovo x270. The only change I needed to make to buy my freedom was install an atheros wifi card (yeah, proprietary bios sucks, buy puri.sm).

And while Guix/Hurd isn't there yet as a daily driver (Debian/Hurd is much more polished), progress has been pretty exciting lately and it now runs on my IBM x60 -- https://todon.nl/@janneke/110451493405777898

Re:Debian GNU/Hurd 2023 released by vanviegen on Monday June 12, 2023 @11:46AM (#36295448)
> Microkernels aren't written like that. In a MK architecture, your system survives video card driver dying by restarting it and taking over serving its clients (in this case, the compositor). Of course, Linux doesn't work like that, but we've already established Linux is not a microkernel.

That does require the compositor (and its applications) to help the new driver instance to re-establish its full state (which will typically consist of GBs of VRAM, among other things).

Re:Debian GNU/Hurd 2023 released by msla on Monday June 12, 2023 @12:12PM (#36295878)
> In a MK architecture, your system survives video card driver dying by restarting it and taking over serving its clients (in this case, the compositor).

If your video card driver died, something is deeply wrong with your system, hardware or software, and blindly (literally) continuing is dangerous to the integrity of the data on that system. Things don't crash for no reason, this isn't a canned test where we're sure that only the one component is being fuzzed, this is reality.

Re:Debian GNU/Hurd 2023 released by snvzz on Monday June 12, 2023 @03:53PM (#36299949)
>continuing is dangerous to the integrity of the data on that system

Not really. IOMMUs have been a thing for a while. As for the GPU's hardware, it can be reset w/o affecting the rest of the system.

Even Linux and Windows can do that, it isn't a microkernel-exclusive thing. The latter just handle it better architecturally.

Re:Debian GNU/Hurd 2023 released by dale_glass on Monday June 12, 2023 @04:23PM (#36300451)
IOMMUs that can individually handle every device seem fairly rare still.

You can check with this script: https://pastebin.com/4t3WD5R1

On quite a lot of hardware you can't really isolate devices from each other properly.

Re:Debian GNU/Hurd 2023 released by taylodl on Monday June 12, 2023 @09:20AM (#36292967)
> > The modern approach to High Availability is to have redundant hardware. A single machine being fault tolerant isn't that important anymore.

You're making a lot of assumptions with regards to the operating environment. What about a probe being sent to Mars, the Moon or wherever? In fact let's just generalize to space-faring craft. That environment demands incredible resiliency and the ability to continue running even if the hardware is having problems - at least enough so ground control can assess the situation and send updates.

Weapons systems are another environment you'd prefer to have resiliency. You'd hate to lose control of a missile while in mid-flight.

Automotive systems are another environment that comes to mind.

There are a lot of embedded/remote environments where the "redundant hardware" solution isn't applicable.

Re:Debian GNU/Hurd 2023 released by lucozade on Monday June 12, 2023 @09:29AM (#36293093)
You are describing environments where it is very common to have hardware redundancy. I mean, sure they may have hardening for each component to reduce the likelihood of losing one of them. But hardware redundancy is a standard tool in safety critical systems.
Re:Debian GNU/Hurd 2023 released by 4gotunameagain on Monday June 12, 2023 @09:29AM (#36293102)
Which is why in aerospace and safety critical systems, RTOSes are used and not fully fledged OSes.

Also, redundant hardware is quite common (and mandatory by most standards), look up TMR, triple modular redundancy

Re:Debian GNU/Hurd 2023 released by ssrc on Monday June 12, 2023 @02:20PM (#36298434)
And yet at some complexity level you have things like ARINC 653 where the usual implementation is to have a classic RTOS running on each of the partitions provided by the "application executive", and today's serverland is hypervisors running VMs running containers. I believe we are too centered on the "Linux vs Minix" debate while in actual practice both tendencies are reflected in most systems.
Re:Debian GNU/Hurd 2023 released by snvzz on Monday June 12, 2023 @03:51PM (#36299925)
>RTOSes are used and not fully fledged OSes.

The idea that "RTOS" and "fully fledged OS" are incompatible with each other is outdated.

seL4 advanced the state of the art with its formally-verified support for mixed criticality, years ago already.

Re:Debian GNU/Hurd 2023 released by gjsman-1000 on Monday June 12, 2023 @07:39PM (#36303003)
There’s actually a real-time microkernel that millions of children use daily. It’s called the Nintendo Switch.

(But seriously, it’s a homegrown microkernel RTOS.)

Re:Debian GNU/Hurd 2023 released by 4gotunameagain on Tuesday June 13, 2023 @03:57AM (#36307029)
The idea might be outdated, but as I have yet to seen a system running seL4, in practice it is very much true still.
Re:Debian GNU/Hurd 2023 released by iso1631 on Monday June 12, 2023 @09:25AM (#36293052)
On a plane or missile I'd assume several computers, with the majority winning the decision
Re:Debian GNU/Hurd 2023 released by taylodl on Monday June 12, 2023 @10:20AM (#36293890)
One of those computers just went out. Now how do you form your majority? Besides which, in such systems there's a governing system coordinating the election. What happens if your governing system goes out?
Re:Debian GNU/Hurd 2023 released by Volundr on Monday June 12, 2023 @10:35AM (#36294194)
Your governing system isn't a single system, it's multiple using a suitable algorithm to establish quorum. This is a well studied problem in distributed systems.
Re:Debian GNU/Hurd 2023 released by iso1631 on Monday June 12, 2023 @10:43AM (#36294354)
So one computer is out and the other 2 are giving different answers to the same question?
Re:Debian GNU/Hurd 2023 released by dredmorbius on Monday June 12, 2023 @05:55PM (#36301777)
The question is increased resilience not perfection.

At some point, a military device / weapons system recognises that it's not operating to spec and either disables itself or diverts and destroys itself in a non-target region.

Keep in mind that for most weapons, not activating when not specified is far more useful than failing to activate where and when specified. See the case of several "broken arrow" nuclear weapons incidents in which failsafes prevented unintended detonation. In once case with only a single fail-safe preventing that detonation which would have been in a civilian populated region of the United States.

Re:Debian GNU/Hurd 2023 released by goodpoint on Monday June 12, 2023 @01:44PM (#36297771)
No, there's plenty of single purpose systems.
Re:Debian GNU/Hurd 2023 released by samus on Monday June 12, 2023 @10:09AM (#36293679)
These applications indeed have special requirements which general-purpose components almost certainly won't be able to fulfill. Not should they - the tradeoffs in complexity and cost are rarely worth it for the hyperscaling or embedded world where Linux is most commonly used these days.
Re:Debian GNU/Hurd 2023 released by knome on Monday June 12, 2023 @10:50AM (#36294556)
>Weapons systems are another environment you'd prefer to have resiliency. You'd hate to lose control of a missile while in mid-flight.

https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...

Re:Debian GNU/Hurd 2023 released by andrewshadura on Monday June 12, 2023 @05:57PM (#36301811)
> any of the hardware comprising the system

You probably mean the other way around: the system comprising hardware.

Re:Debian GNU/Hurd 2023 released by rcxdude on Monday June 12, 2023 @10:24AM (#36293966)
Funnily enough windows actually manages your two points about videos cards pretty well. I've experienced full graphics driver crashes which were recovered from cleanly with only the process which triggered the crash as a casualty. But this needs more than just "slap it in a microkernel".
Re:Debian GNU/Hurd 2023 released by b33j0r on Monday June 12, 2023 @01:28PM (#36297406)
I’m impressed, as my RTX cards and drivers are the only things crashing my windows 11 machines recently.
Re:Debian GNU/Hurd 2023 released by kjs3 on Monday June 12, 2023 @08:00PM (#36303190)
YMMV...video drivers (esp 3rd party) are one of the things that still mange take the whole machine out for me.
Re:Debian GNU/Hurd 2023 released by lucideer on Monday June 12, 2023 @10:32AM (#36294150)
> * Hardware became far more complex. A modern video card or anything else is its own computer, with a very uncomfortable amount of state and access to the host. If your video card driver does something wrong and crashes it's by no means a given that the situation is recoverable by rebooting the driver -- the video card itself may be left in some weird state.

The rest of your points make sense but I don't understand fully how this is an argument for monoliths? Isn't recovery from an unknown state an equally hard problem in both cases?

Re:Debian GNU/Hurd 2023 released by krger on Monday June 12, 2023 @10:41AM (#36294327)
>The rest of your points make sense but I don't understand fully how this is an argument for monoliths? Isn't recovery from an unknown state an equally hard problem in both cases?

He's not saying that monolithic kernels make recovery easier in this case. He's saying that microkernels don't make these failures easier to recover from in practice, so you may as well take the performance gains that you will get from the monolithic kernel instead of giving up those gains for theoretical recoverability advantages that you won't actually usually see in practice.

Re:Debian GNU/Hurd 2023 released by lucideer on Monday June 12, 2023 @01:21PM (#36297247)
Ah ok, that's fair
Re:Debian GNU/Hurd 2023 released by goodpoint on Monday June 12, 2023 @10:53AM (#36294635)
> The debate is sort of obsolete really.

Says who?

> * Linux has microkernel-like functionalities like FUSE. You can do filesystems in userspace now.

That has very little to do with real microkernels.

> * The modern approach to High Availability is to have redundant hardware. A single machine being fault tolerant isn't that important anymore.

Not at all. The "modern" approach you are describing is many decades old and single systems are still extremely common.

Re:Debian GNU/Hurd 2023 released by dale_glass on Monday June 12, 2023 @11:57AM (#36295634)
> Says who?

I'm writing my comment, so me, based on observations over time.

> That has very little to do with real microkernels.

It doesn't matter if it's "real" or not. My point was that any selling point a microkernel can come up with can be grafted into a monolithic one.

So one of the usual selling points of a microkernel is that you can run a filesystem in userspace and eg, can allow an user to mount a network drive. Well, no need to switch kernels just for that since they added FUSE to Linux.

As an user I don't care if it's pure, I care that the job gets done.

> Not at all. The "modern" approach you are describing is many decades old and single systems are still extremely common.

Modern compared to the very old idea of the microkernel, I mean. I can see that the idea had a lot of appeal back in the era of rare, room sized computers. Keeping a single machine going is far less important in modern times, where most serious uses try their best to treat any single machine as disposable.

Re:Debian GNU/Hurd 2023 released by JdeBP on Monday June 12, 2023 @12:24PM (#36296095)
Your grasp of history is terrible. The era of rare room-sized computers pre-dates (say) Minix by decades. Basing an argument upon that premise is highly fallacious.