News for hackers. Stuff that matters.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @01:01PM (#37037230)
Kind of weird to see linux called out as too big, and then the ack that writing a ton of device drivers is hard and will take time. Isn't that a large part of the source tree? Realizing I haven't even tried compiling a kernel in a long long time. Feels oddly sad to say.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by gattilorenz on Monday August 07, 2023 @01:37PM (#37037780)
Heh, not a particulary in-depth article in any way, to be honest.

"the GNU/Hurd is Unix(POSIX)-compatible, so most things work"... well that's to be said for MacOS, QNX, etc. In practice, where is the "65% of the Debian archive can be built for the Hurd" figure coming from? I'm sure it can be built in theory, how much does it require source modifications?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by rekado on Monday August 07, 2023 @02:56PM (#37039015)
Here's a list of failing packages with reasons for failure: https://people.debian.org/~sthibault/failed_packages.txt

And here's the overview on how many packages have successfully been built vs how many have failed: https://buildd.debian.org/status/architecture.php?a=hurd-i38...

The number of packages that can be built have been built; it is not a theoretical number.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by gattilorenz on Monday August 07, 2023 @04:21PM (#37040442)
thanks for the pointer, it's actually quite interesting. Apparently even (most of) X11 should work then?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by rekado on Tuesday August 08, 2023 @05:58PM (#37056001)
Yes, X11 has been working for a long time. Here's a screenshot from 2013: https://lwn.net/Articles/555566/
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by dwheeler on Monday August 07, 2023 @01:14PM (#37037447)
I agree, it's odd.

I don't have anything recent, but back in 2004, the majority of the Linux kernel code was in its drivers: https://dwheeler.com/essays/linux-kernel-cost.html I expect that most of the current Linux kernel code is also for handling hardware (that is, drivers + the code to handle various architectures).

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by emmericp on Monday August 07, 2023 @01:18PM (#37037495)
66% was drivers in 2019.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by AdmiralAsshat on Monday August 07, 2023 @01:48PM (#37037962)
Could one not make the case that maybe device driver support doesn't belong in the kernel itself?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by ye-olde-sysrq on Monday August 07, 2023 @01:52PM (#37038022)
Isn't this this mono vs micro kernel debate all over again?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by anon25783 on Monday August 07, 2023 @02:34PM (#37038631)
Things are perhaps a bit different now than when Torvalds and Tanenbaum debated the issue on comp.os.minix over thirty years ago.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by dpe82 on Monday August 07, 2023 @02:56PM (#37039014)
What, specifically, is different?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by anon25783 on Monday August 07, 2023 @03:29PM (#37039672)
The machines are different. Multicore 64-bit chips are now standard for consumer PCs. RAM and persistent storage are faster and much more abundant. The architecture of the modern x86-64 is much more sophisticated than that of the 386 for which the earliest Linux was written. Vectorization, predictive branching, and asynchronous code are all front and center in the modern programmer's ecosystem.

In short, hardware is more capable, and so perhaps now we can afford to take more opportunities to trade a little bit of overhead for abstractions that are more modular and robust.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by RoseRose on Monday August 07, 2023 @03:40PM (#37039850)
> In short, hardware is more capable, and so perhaps now we can afford to take more opportunities to trade a little bit of overhead for abstractions that are more modular and robust.

We could afford that before, it's just that Linus didn't see the value and put his foot down. Which is definitely a choice.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @03:59PM (#37040140)
In a very real sense, the hardware has given a realization of microservice ideas, but at the hardware level. My WIFI card, the common and popular example, probably has more processing power than some of the early desktop computers back in the day. Certainly SSDs are getting much more complicated.

They aren't general purpose, but I presume microkernel "services" would also not be general purpose?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by lmm on Monday August 07, 2023 @06:40PM (#37041924)
Often they are general-purpose. There's a blog from maybe 10 years ago of someone launching Linux on a hard drive (it refuses to fully boot because the hard drive doesn't have an MMU, but they get some familiar log output).
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Tuesday August 08, 2023 @12:06AM (#37044408)
Yeah, I vaguely remembered that, but couldn't find the details in a quick search. So, sadly assumed I may have imagined it. :D
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by praptak on Monday August 07, 2023 @04:11PM (#37040315)
Do we have more hardware isolation? There was a pretty strong argument against microkernels - a driver running in userspace can still bork the whole machine if the hardware being controlled can write to memory at arbitrary addresses.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by j16sdiz on Monday August 07, 2023 @04:42PM (#37040669)
we have more hardware isolation.

they are seldom implemented correctly on firmware/mainboard level.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by bonzini on Monday August 07, 2023 @04:45PM (#37040709)
Yes, there's IOMMUs.

On the other hand, datacenters have become so large that a 1% performance improvement can amount to millions of dollars in hardware and energy savings, so the extra cost of a microkernel might not be very welcome outside consumer devices.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by effie on Monday August 07, 2023 @10:59PM (#37043984)
We did not yet have a big publicized hack of whole cloud infrastructure causing massive economic harm. When that happens (the buggy PC/Linux architecture running the world is ripe), more secure architectures will become commercially interesting despite the 1% performance penalty.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by pjmlp on Tuesday August 08, 2023 @03:20AM (#37045606)
Hardly of value with kubernetes everywhere running on top of type 1 hypervisors.

Microkernels have won, even if monolitich kernel advocates haven't yet got the message.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by josefx on Monday August 07, 2023 @04:29PM (#37040537)
> Vectorization, predictive branching, and asynchronous code are all front and center in the modern programmer's ecosystem.

Not to forget all the hardware based security bypasses that let any random application read and even modify any memory location it wants to.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by winternewt on Monday August 07, 2023 @05:15PM (#37041039)
RAM is faster but CPU is even faster. The latency chasm between CPU and RAM has increased.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by mike_hearn on Monday August 07, 2023 @05:51PM (#37041445)
Being a microkernel doesn't automatically make you more robust. If you look at their docs, Hurd has only one feature that's different to Linux and that's a sort of souped up FUSE. But as they realized later, allowing arbitrary unprivileged programs to extend the filesystem like that doesn't mesh well with the UNIX security model. You can write a "translator" that redirects one part of the filesystem tree to another, so you get the same issues as with chroot or symlink attacks. Their proposed solution (never implemented?) is to stop programs paying attention to translators by default if they are running as a different user. There are other cases where translators can DoS apps or do other undesirable things.

The basic problem is that the kernel boundary is a trust boundary. You assume that anything in the kernel is legit and won't try to attack you, which simplifies things a lot. In the microkernel world the original idea was that all the servers would be just ordinary programs you could swap in and out at will. But then the threat model becomes muddied and unclear. Is it OK to run a server that's untrusted? If so, to what extent?

The Hurd seems under-designed as a consequence. To make that vision work you'd need to be willing to depart from UNIX way more, which really means being a research OS.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by Paul-Craft on Tuesday August 08, 2023 @04:24AM (#37046064)
> Being a microkernel doesn't automatically make you more robust.

No, of course, it doesn't automatically do so. But it makes it a whole hell of a lot easier to write a reliable service, if you don't have to deal with all the crap that a monolithic kernel does.

I think you'd find Plan 9 interesting. It deals with many of the issues you're talking about in a rather head on way. In fact, it takes things even further than Hurd might, and allows processes to migrate to different processors, which may be contained on completely different machines.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by yencabulator on Monday August 14, 2023 @02:17PM (#37124517)
1. Read up on the seL4 microkernel. It pretty much destroyed the "microkernels are too slow" argument.

2. Modern day hardware is mostly just ringbuffers mapped to memory. There's a real convergence of hardware interfaces, virtio, and io_uring into all being this very similar looking thing. With IOMMUs, moving drivers to userspace is pretty attractive. There's not much of a difference between a cloud VM getting access to a VFIO device from the hypervisor and a userspace device driver getting access to hardware from the microkernel. And there's a lot of money in making cloud VM networking & storage faster.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by pessimizer on Monday August 07, 2023 @02:33PM (#37038625)
Isn't that the subject of this entire thread?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by ssrc on Monday August 07, 2023 @02:59PM (#37039075)
I think it's monorepo vs multi-repo, and since Linux maintainers update the drivers (I believe) when internal APIs change, and the internal APIs are not stable, monorepo seems more practical.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by davidw on Monday August 07, 2023 @05:16PM (#37041059)
There's something clever to say about the author of Linux vs the author of Git, but it's not coming to mind right now...
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by CRConrad on Monday August 21, 2023 @01:57PM (#37213055)
Both exactly equally famous for sometimes being an asshole?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by actionfromafar on Monday August 07, 2023 @05:36PM (#37041291)
Maybe I’m missing the joke, but in or out of kernel context is orthogonal to how the source code is stored.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by jonhohle on Monday August 07, 2023 @05:50PM (#37041436)
The author is the same (Linus), so it makes sense that he would design a source control system that supported the monorepo he created over the prior 15-ish years.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by midoridensha on Tuesday August 08, 2023 @12:41AM (#37044576)
Sure, but git does support multiple repos quite easily, and has support for submodules. It's grown a lot since when Linus first designed it.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by PaulDavisThe1st on Monday August 07, 2023 @05:59PM (#37041535)
"how the source code is stored" is what leads to "wow, the linux kernel is really big". Nobody's measuring kernel size by the number of resident pages it takes up.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by boricj on Monday August 07, 2023 @03:00PM (#37039127)
NetBSD has architectured their drivers to be basically static archives reusable anywhere. It's part of the NetBSD rump kernel.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by rjsw on Monday August 07, 2023 @05:33PM (#37041264)
The drivers are not used in that way in NetBSD, they are either compiled into the kernel or built as modules just like in Linux, the graphics drivers even use the source code from Linux.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by einpoklum on Monday August 07, 2023 @05:51PM (#37041444)
What do you mean by "reusable everywhere"? I mean, where could they be used other than in a NetBSD kernel?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by boricj on Monday August 07, 2023 @06:59PM (#37042101)
Anywhere. There are lots of examples on the topic ; running NetBSD driver code inside NetBSD's user-land is the simplest use-case (https://www.netbsd.org/docs/rump/sptut.html), but that code is portable without modifications to just about any context possible.

Check out Antti Kantee's The Design and Implementation of the Anykernel and Rump Kernels if you want details on the architecture.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by joveian on Tuesday August 08, 2023 @01:52AM (#37045003)
GNU Hurd for example. I haven't used it so I'm not sure of the exact status but it sounds like they are using it in some cases to make use of existing drivers in a microkernel style. There have been a few attempts to rumpify Linux but it doesn't seem like any of them succeeded and I'm not sure if anyone is still trying.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by heavyset_go on Monday August 07, 2023 @05:55PM (#37041490)
The Linux kernel driver API/ABI isn't stable so there's no permanent/versioned interface you can program against that would make out-of-tree drivers non-headache inducing: https://www.kernel.org/doc/Documentation/process/stable-api-...

> You think you want a stable kernel interface, but you really do not, and you don't even know it. What you want is a stable running driver, and you get that only if your driver is in the main kernel tree. You also get lots of other good benefits if your driver is in the main kernel tree, all of which has made Linux into such a strong, stable, and mature operating system which is the reason you are using it in the first place.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by quickthrower2 on Monday August 07, 2023 @08:19PM (#37042811)
This is a great Conway's-law-busting approach.

Just because the driver creator is a different human/org to the Kernel maintainers, doesn't mean their code needs to be separate if it makes more practical sense to bundle it all together.

Also the "proof of work" of being allowed to add your driver is probably that you are designing and producing actual hardware, so it is hard to troll.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by rcxdude on Tuesday August 08, 2023 @07:16AM (#37047270)
It just produces Conway's law in the other direction (which is smart). Now anyone wanting to use Linux effectively needs to integrate with its development process, which is large part of why it is successful as a project. (However, GNU attempted similar with their lack of an extension interface for GCC and that arguably blew up in their face with LLVM, so it's far from a guaranteed success)
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by meeho on Tuesday August 08, 2023 @02:10AM (#37045124)
Well windows pulled it off
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by pjmlp on Tuesday August 08, 2023 @03:18AM (#37045595)
Yes, that is how it works in most sane operating systems, even more so nowadays where writing userspace drivers is preferable to dynamically loadable modules.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by muixoozie on Monday August 07, 2023 @01:19PM (#37037518)
Can get a sense of how long it takes to compile here https://openbenchmarking.org/test/pts/build-linux-kernel surprisingly fast with modern processors.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by stusmall on Monday August 07, 2023 @01:39PM (#37037801)
I love how much things have progressed. I remember I used to have to set up a clean build to run while I was at school so it could be done when I got back. Now it is done within seconds.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by abhiyerra on Monday August 07, 2023 @08:12PM (#37042754)
Ha. Yeah. Remember taking a whole day or more for a clean build of the 2.4 kernel on my childhood Pentium machine. Would go to school hoping I’d come back to a completed build but it would just keep going for another day.

At this point I don’t remember the last time I’ve compiled a kernel.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @01:29PM (#37037662)
My memory was spending as much time learning on the different options as anything else. Though, I think most of my memory was all of the config for FreeBSD. Compiling Firefox was the beast that I remember. Only thing I still compile is Emacs, and that is silly fast on modern computers.

Really, the speed of compilation is such that I understand why so many source distribution methods are as popular as they are now. Feels funny to have come to that point so effectively.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by anonymousiam on Monday August 07, 2023 @10:03PM (#37043558)
The big break (for me) in configuring the options was the very welcome addition of "make menuconfig" to replace the original "make config". As the number of supported filesystems/drivers/options increased, it could take more than an hour to get through a "make config".

I haven't built my own kernel for more than 15 years, but I probably built more than a dozen before that, each of them re-compiled upon every new release (going back to 0.98).

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by genewitch on Monday August 07, 2023 @04:13PM (#37040354)
I used to compile kernels on a 2012 HP quad-CPU, 80 thread machine. It would finish in a minute and a half or so. I got a ryzen 5850 to replace it, it also takes a minute and a half or so - but uses 1/4th the power at the wall. 32 threads vs 80, 250W vs 1000+W
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by jasoneckert on Monday August 07, 2023 @01:16PM (#37037470)
And given what the modern Linux kernel does, alongside the power of modern systems (even embedded ones), it's also difficult to argue that the Linux kernel is too large by any stretch of the imagination.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by genewitch on Monday August 07, 2023 @04:17PM (#37040389)
my entire kernel, including all drivers needed for my system except the nvidia blob is 11MB - 10876160 bytes. i don't optimize for size, necessarily, i'm sure i could get it down a lot more if i disabled most of the "default enabled" stuff in a modern kernel that assures it will boot on a majority of systems.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by badrabbit on Monday August 07, 2023 @01:13PM (#37037416)
Hurd is a microkernel so it is lean by design. I suspect that statement was a dig on perceived architectural flaw of Linux.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @01:15PM (#37037450)
I get that. But it is still an unfair dig when a large chunk of the code that is being pointed at is the code that they will have to write? (Granted, they can put an easier line in the sand on how far back they go on what they support hardware wise, but still...)
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by pengaru on Monday August 07, 2023 @01:24PM (#37037587)
It's not about the code existing, it's about the code being an integral part of a monolithic architecture vs. "servers" facilitating a microkernel design like hurd/mach.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @01:30PM (#37037684)
But that is silly? If I have to audit the code for my system running, I would have to audit the code for each of the "servers" as well? If not, why not?

To that end, how different is it, actually? And what are the other tradeoffs?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by pengaru on Monday August 07, 2023 @01:37PM (#37037789)
The servers are run in isolated address spaces like processes, taking advantage of MMU protection for more of the low-level facilities.

Ask yourself why it's safer to use FUSE filesystems on Linux when mounting untrusted block devices/image files than the in-kernel filesystem drivers and maybe it'll become clear why this is advantageous.

Or if you're familiar with containers and why that's a good thing, you can think of it as containerizing the kernel's subsystems/drivers.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @01:49PM (#37037982)
This... didn't answer my question? For many that are concerned with containers and such, they also have to audit the container process code. Such that, fine, try to use that to inflate the numbers on Linux.

Pointing at literally decades of device drivers as why the size of the code is bad, while acknowledging that it will take time to write device drivers so this will work on a respectable amount of hardware just feels weird.

That all said, please don't take this as a criticism of any of these ideas. I confess seeing Hurd in the headlines gave me a smile. Is nice to see people can still work on many ideas out there. I am only questioning the "size of code bad!" right next to "it will take us a long time to replicate a large portion of the code we just pointed at."

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by tlb on Monday August 07, 2023 @01:47PM (#37037954)
That's the big unknown question with microkernels. It was (in the 90s) a reasonable theory that a microkernel could be much more robust and secure and easy to develop than a monolithic kernel.

It would be more robust because individual services could crash and restart. That could really work for, say, WiFi drivers. It doesn't quite work for disk drivers or the file system, since how do you even restart something without a file system?

It would be more secure because drivers would live in isolated memory spaces. So a non-critical piece like a printer driver couldn't read memory from something more critical like a file system. Part of what changed since microkernels were originally proposed is that drivers are often split into low- and high-level parts. So a printer driver in Linux consists of a standard USB or network driver in the kernel, plus a user-level driver that can be worked on like a microservice. And the WiFi driver is a low-level driver plus wpa_supplicant running at user level. The USB and network drivers are shared with critical services, so you can't easily restart them anyway.

It would be easier to develop because you can restart just the piece you're working on without rebooting the whole kernel. That's a plausible argument, but somewhat undermined by HURD taking 30 years to develop. But there were many other reasons for that.

I guess the way to convince yourself one way or another is to try writing a driver for both.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @01:55PM (#37038065)
Right, I remember parts of that history. Memory protection schemes in other operating systems didn't exactly stay static, though. And a ton of the optimizations that monolithic kernels (mostly looking at windows) did went away just with the lack of need for them. Heck, at the time, Mac wasn't even a preemptive multitasking operating system.

And "drivers" could just restart is laughable with a role play of it. Ok, your wifi driver restarted. What are the protocols to get everyone caught up between that driver and your application for what messages were lost and the messages that are now arriving? This is effectively no different from any distributed application where similar things are unsurprisingly hard to achieve well.

I'll state that I think this is a laudable goal. And I'm happy to see people working on it. Would be thrilled to be shown I'm wrong.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by klodolph on Monday August 07, 2023 @02:20PM (#37038444)
If your WiFi driver crashes and restarts, at the minimum, I think it could be treated as if you lost network connectivity for a short time. This is a situation that applications should be able to handle anyway, since it happens all the time on laptops.

There are plenty of applications out there that just don’t respond to configuration changes gracefully. For example, if you have a music program running, and then you plug a MIDI keyboard in, is the new MIDI keyboard recognized by your music program? Maybe so, and you can use it immediately. Maybe not, and you have to restart the application.

If your MIDI driver crashes, maybe the music program doesn’t handle it gracefully, and you have to quit and relaunch the program. But that is miles better than crashing the system and rebooting.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @02:38PM (#37038693)
It really depends on what all is done "in the driver," though? Since, per the application, the data may have been passed off to the driver with a successful message pass. And if I have to have secrets in the driver for it to be able to connect to access points and such, it seems dubious how protected from all of my secrets the system can be between all parties.

MIDI is actually an easy example, all told. If I unplug and replug a keyboard in, I expect it to probably not handle any persistent state of the keyboard correctly. (For fun, it is common for the "at rest" value of peddles to be discovered at connect time. Good luck with that if the driver crashes.)

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by klodolph on Monday August 07, 2023 @06:36PM (#37041898)
> Since, per the application, the data may have been passed off to the driver with a successful message pass.

The application already knows that the data is not guaranteed to be delivered, or even sent at all. That’s just the nature of network programming—it’s inherently unreliable.

> And if I have to have secrets in the driver for it to be able to connect to access points and such, it seems dubious how protected from all of my secrets the system can be between all parties.

To make an analogy—locking your front door doesn’t protect thieves from stealing your plastic flamingoes and garden gnomes, but it does make it harder to steal the $50,000 in cash you have hidden under the mattress.

The point of isolation is to reduce the effect of failures. If you have a buggy WiFi driver, in a monolithic kernel, that could be really bad—it could even be a remotely exploitable vulnerability in the kernel itself. In other words, you have no front door, and the thieves can steal the $50,000 hidden under your mattress. If your WiFi driver is unprivileged, then the thieves have only broken through your front gate, and they can only steal your garden gnomes and plastic flamingoes. They need to combine the vulnerability with a local privilege escalation vulnerability, or be happy with the value of plastic flamingoes.

> For fun, it is common for the "at rest" value of peddles to be discovered at connect time.

The keyboard itself does this, either when it’s turned on, or through the configuration menu (or not at all). It’s not something that has anything to do with drivers or connecting the keyboard.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Tuesday August 08, 2023 @12:15AM (#37044445)
Applications are usually written to know that anything sent over the network could be lost. You don't usually do the same for sending to the different devices. Are you expecting retry logic in all places sending to a device?

We /could/ turn all computation into remote procedure calls. There is plenty of precedence that that will not end well. You do it where you have to. Not everywhere.

And fair point on the device learning its "off" position at startup. Though, that really leans into another point I made in another branch. That level of "isolated and can restart" is already largely accomplished by having extra compute on the devices you are connecting to. I really can't see much benefit it doing everything in the RPC paradigm.

I get the promise. I'm not buying the evidence that you can solve this by making it transparent that all things are "servers" and some are remote.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by klodolph on Tuesday August 08, 2023 @11:29AM (#37050473)
> Applications are usually written to know that anything sent over the network could be lost.

Generally they are—when you make an HTTP request, the client waits until it receives an HTTP response before it reports success.

> We /could/ turn all computation into remote procedure calls. There is plenty of precedence that that will not end well. You do it where you have to. Not everywhere.

I think you may be having some kind of a different conversation here. I don’t understand your position, and I don’t think you understand mine.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Tuesday August 08, 2023 @01:15PM (#37052381)
Microkernels treating every system in the machine as a "service" is literally asking developers to treat everything as a distributed system. No? Was literally a selling point early on in the literature for them.

There are good arguments for this in some environments.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by CRConrad on Monday August 21, 2023 @02:27PM (#37213471)
> For fun, it is common for the "at rest" value of

pedals

> to be discovered at connect time.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by strbean on Monday August 07, 2023 @02:16PM (#37038378)
> Ok, your wifi driver restarted. What are the protocols to get everyone caught up between that driver and your application for what messages were lost and the messages that are now arriving?

TCP?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @02:47PM (#37038842)
Doesn't fully help? Could actually be more difficult if you let the driver do the TCP ack. And you are likely going to back yourself into a situation where you need TCP between the application and the driver... Remember, at that point, it is just a message pass, as well.

There is a good article somewhere about how you have to do end to end for any of this to really work.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by rcxdude on Tuesday August 08, 2023 @08:54AM (#37048283)
If your network stack is running isolated to your wifi driver (with the interface being frames to send and receive), it's fine: the network stack just sees some dropped packets the same as if something else dropped them. If your network stack with your TCP state crashes, then it's a bit trickier: the connection will likely be dropped, which requires an application-level retry, which also will generally already exist to deal with more significant network issues. I don't think you've picked a great example for this kind of problem.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Tuesday August 08, 2023 @01:23PM (#37052524)
I would assume that the TCP state would be part of the "networking service" that is isolated from my application. As such, I'm assuming the more complicated situation there.

That said, I don't make too big of a defense of networking being a bad choice. At large, that is literally where you have to do distributed computing anyway; so, agreed a lot of it will be covered for a lot of applications. I was trying to stick to the examples others chose as I'm not really trying to "gotcha" to anyone. My main point was honestly more about how similar that is to how we are today. If you were in a microkernel, is it any easier? Because that is the original goal post here.

I do further question why you'd want to do that for every subsystem interaction, and if you really want to have to redo all kernel context swaps and local message passes if something went wrong locally.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by rcxdude on Tuesday August 08, 2023 @08:50AM (#37048247)
It can be done though: see what Windows has managed to do with graphics drivers. I've experienced a full crash of the graphics driver and windows just restarted it and kept on trucking, the only casualty being the 3D application which presumably triggered the crash. It's not just a matter of sprinkling the microkernel architecture on your system, but something like that is a prerequisite.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by strbean on Monday August 07, 2023 @02:12PM (#37038326)
Code that will have to be written, but won't be part of the kernel. I think that's on the cusp of fair/unfair.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @03:55PM (#37040079)
I agree it is defensible. But, it is code that has to run for me to use my computer. I'm not clear that I have reason to care about the kernel distinction, at this level. Would help the defense to lean in and show legit and not theoretical examples of it.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @01:53PM (#37038028)
I understand what you're saying, but both are true.

1. Linux is too big. Even if we exclude the drivers, which are a majority of the kernel codebase, linux is still a massive kernel. Most microkernels are small enough to fit in the L3 cache, some are small enough to fit in the L2 cache. Linux, even if we could exclude the drivers, doesn't even come close. This inability to fully cache the kernel ends up negating the primary benefit that monolithic kernels have, which is performance. Linux spends more time bouncing around the cache than a modern microkernel takes to do an extra syscall.

To add to this, unless you are compiling your kernel specifically for your machine, your kernel is going to be a bloated compromise of the set of drivers that your system is most likely to see. That means that you will have dozens, if not hundreds of drivers compiled into your kernel which will never need to be used.

It's also too big in the sense that there are now far too many lines of code to be able to effectively monitor for vulnerabilites. That codebase size won't change when having a microkernel with the same number of drivers, but what will change is the ability of a single vulnerability to compromise your whole system. You have effectively compartmentalized vulnerabilities to their own address space. So in that sense, big codebases are a huge problem for monolithic kernels, but only a small problem for microkernels.

2. It will take time to write a ton of device drivers, simply because most of them aren't written yet. To that extent, Linux most definitely has an incumbent advantage. But that isn't to say that microkernels also have an advantage here. Anyone who has written a driver knows how much the ability to iterate quickly is helpful. Drivers in userspace can be written directly on the system that they will run on, with no virtualization or kernel reboots necessary, and with incredibly fast start/restart/stop. Userspace drivers are dramatically simpler to write, simpler to build, simpler to monitor, simpler to test, and simpler to distribute.

With all that being said, I definitely don't think Hurd is the future. But what could change the world is already out there but not really ready to use at the moment. One possibility would be an open-sourcing of QNX which is an amazing and incredibly mature microkernel OS, possibly the most mature in the world. If there are any bored billionaires out there reading this, please buy QNX from Blackberry and do that. Another possibility would be to put a shit ton of effort behind the SeL4 userspace, which is just too damn hard to do anything practical with at the moment.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by toast0 on Monday August 07, 2023 @02:36PM (#37038661)
> To add to this, unless you are compiling your kernel specifically for your machine, your kernel is going to be a bloated compromise of the set of drivers that your system is most likely to see. That means that you will have dozens, if not hundreds of drivers compiled into your kernel which will never need to be used.

I imagine there's two pools of Linux users: those that compile their own kernel, probably with only the drivers they use; and those that use distribution kernels, which have a small set of compiled in drivers, and a huge initrd with all the drivers. Neither one of those groups ends up with all of the drivers loaded into memory: the compile their own have a small set, the distro kernel people end up with only the drivers they need loaded; both groups have a relatively small kernel footprint.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by Dah00n on Monday August 07, 2023 @04:50PM (#37040773)
Can you use vulnerabilities in a driver that's there but not currently loaded?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by mschuster91 on Monday August 07, 2023 @05:11PM (#37040998)
No, and this is what saved a lot of people's arses many times over. A lot of the CVEs for the Linux kernel turn out to be exploitable under very specific circumstances.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by toast0 on Monday August 07, 2023 @05:03PM (#37040924)
Not unless you can trigger the system to load it.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by nephanth on Monday August 07, 2023 @07:56PM (#37042591)
Going in that configuration screen, looking up all those modules to check whether you need them, and checking / unchecked them takes so much time I would imagine some people who compile their own kernel don't bother
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by account-5 on Monday August 07, 2023 @02:34PM (#37038638)
What are your thoughts on Fuchsia? Not QNX but definitely got billions behind it (until Google kill it that is).
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @03:46PM (#37039932)
Fuschia is definitely interesting but I don’t really see a lot of non-Google work being done with it and while google is worth billions, it doesn’t seem like they’re investing billions into fuschia specifically. I’d say caution is warranted but it’s certainly a possibility if there were more non-google players in the ecosystem.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by kjs3 on Tuesday August 08, 2023 @04:24PM (#37054987)
Google recently cut a bunch of Fuschia staff and canceled some of it's target IoT products (smart speakers?), didn't they?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by sterlind on Monday August 07, 2023 @02:11PM (#37038314)
how different is the Hurd driver model from Linux's? is it a straightforward but tedious process to port drivers, or does it require major rethinking? I wonder if machine translation is possible, or even LLM-assisted automatic ports as a starting point. disastrous to think about, as careful as kernel code has to be, but maybe with enough static analysis and guardrails it's doable?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @02:26PM (#37038523)
It is quite different, and porting drivers from Linux would be very hard to do en masse. However, other open source kernels have drivers that are much easier to port. NetBSD, for example, has a whole host of drivers that can and are used almost unchanged in other microkernels.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by irdc on Monday August 07, 2023 @02:29PM (#37038582)
> Most microkernels are small enough to fit in the L3 cache

Have you looked at the size of L3 caches lately? You could fit a whole ‘nother OS in one of those.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @03:28PM (#37039668)
Okay, so there are a handful of massive $4k+ chips that can fit the Linux kernel in the L3 cache. Meanwhile, you could fit 5 copies of the SEL4 kernel in the L2 cache of a raspberry pi.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by kelnos on Monday August 07, 2023 @05:57PM (#37041514)
Which is fine for a program that does essentially nothing. But once a program wants to talk to the network or disk, or display something on the screen, it needs more system services that need to come from somewhere. Can you fit all of those in the caches too?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @01:58PM (#37038118)
I'm very open to that debate, but then show it. Exclude the drivers from the numbers. To do otherwise feels very dishonest.

Process isolation and selinux are things that exist. You even mention it. Turns out, having complete isolation between basically everything in your system is hard. I don't see how microkernels will make that difficulty disappear?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by klodolph on Monday August 07, 2023 @02:11PM (#37038304)
> I'm very open to that debate, but then show it. Exclude the drivers from the numbers. To do otherwise feels very dishonest.

You can ask for numbers without casting aspersions like that.

This is HN. It is something like a casual conversation. You are free to ask for numbers, other people are free to provide or not provide them, and we should be able to have this conversation without leveling accusations of dishonesty (which the word “feels” does not really temper).

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @02:32PM (#37038605)
I didn't say they were being dishonest, I said it feels dishonest. Consider it a critique of the message with my reasoning given.

I was actually trying to find the numbers myself, and it was surprisingly more involved than I'd care for. I didn't want to give someone else more work, but happy to see the numbers expanded. I stand by my criticism, though. It feels off. If you want to say it is justified, spend more effort justifying it.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by klodolph on Tuesday August 08, 2023 @11:55AM (#37050981)
> I didn't say they were being dishonest, I said it feels dishonest.

The phrase “it feels” is not carte blanche to say what you want.

I could say, “Someone reading this post might think that you’re an axe murderer.” Certainly not me, I don’t think you’re an axe murderer. But someone reading this post might think so. What this does is introduce a new topic of conversation—that topic is you, and whether you’re an axe murderer. I’ve done it without saying anything untrue. It is literally true, that someone reading this post might think that you’re an axe murderer. That has much the same effect as an accusation, but I’ve given you no real way to respond.

When you write “it feels”, there is an implied subject, who is feeling those feelings. That subject is you.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Tuesday August 08, 2023 @01:07PM (#37052246)
This form of rhetoric for criticism is silly, though. For one, you are giving no charity to the side of my conversation. For two, you have to take it to the absurd caricature of claiming that others think someone is an axe murderer to try and make your point. Literally a type of rhetorical fallacy.

I flat out feel it is dishonest, in the vein that it is cherry picked data to further support a point that they agree with. Such that, using "this is a casual conversation" as a rubrik, I absolutely call BS from people when they say stuff like this to me.

If this was a "town square debate" where the conversation is partisan and folks are trying to score points, I'd agree with your assertion a bit more. But for casual conversation specifically, I ultimately reject this view.

Now, if the poster is specifically offended, I'm more than willing to apologize on that and to clarify my point. I had no ill things to say about the poster or the main topic. Heavily critical of cherry picked data, with a justification of why.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by CRConrad on Monday August 21, 2023 @02:20PM (#37213360)
> For two, you have to take it to the absurd caricature of claiming that others think someone is an axe murderer to try and make your point. Literally a type of rhetorical fallacy.

No, actually quite the opposite: Reductio ad absurdum is a form of logical proof, not a fallacy.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @02:22PM (#37038461)
But that is the entire point of the comparison. I get that you think an apples to apples comparison is the most honest way to portray this, but the whole point is to portray that this is an apples to oranges comparison. Linux has millions of lines of code running in ring 0, a micro kernel does not. They may end up having the same lines of code for comparable total system size, but that isn’t the point of the comparison.

Process isolation actually isn’t fundamentally hard…it’s just hard on a system that wasn’t designed for it. And SELinux doesn’t do what microkernels do. Even with a tightly locked down SELinux configuration, a driver vulnerability can lead to root access. SELinux can protect your userland the same way that microkernels do, but it can’t put your drivers in userland.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @02:45PM (#37038811)
Fair. I'm not a fan of apples to oranges comparisons without leaning into more of it. Especially not when the obvious driver for difference between two things is that one is old and has a ton of the code you are currently behind on writing.

I do question if process isolation isn't fundamentally hard. Separate processes for separate things entirely is not fundamentally hard. That, I agree. But, so much of what we do is integrated together. Is why early attempts to make it so that some programs can't see my whole hard drive are bonkers annoying. I specifically want access to the picture I just saved in that editing program so that I can email it.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by edgyquant on Monday August 07, 2023 @06:37PM (#37041909)
>obvious driver for difference between two things is that one is old and has a ton of the code you are currently behind on writing.

In this case they’re both old though, as Hurd predates Linux by a year.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Tuesday August 08, 2023 @12:09AM (#37044425)
Fair, if amusing. Hurd "predates" Linux in name only. And, if anything, this would serve as a strong piece of evidence that microkernels have a hard time getting traction.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by CRConrad on Monday August 21, 2023 @02:23PM (#37213395)
Which brings the debate back to the argument, doubtless made many many times over the years, that there is probably a reason that microkernels have a hard time getting traction.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by rleigh on Thursday August 10, 2023 @02:35AM (#37072665)
QNX managed it! Drivers run in separate address spaces as, does the kernel, making it very robust. It's used for safety-critical applications.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by tredre3 on Monday August 07, 2023 @02:45PM (#37038812)
> I'm very open to that debate, but then show it. Exclude the drivers from the numbers. To do otherwise feels very dishonest.

With drivers:

    ---------------------------------------------------------------------------------------
    Language                             files          blank        comment           code
    ---------------------------------------------------------------------------------------
    C                                    32699        3332747        2610014       17218820
    C/C++ Header                         23690         712617        1373965        7109290
    Assembly                              1336          48534         101884         234314

Without drivers:

    ---------------------------------------------------------------------------------------
    Language                             files          blank        comment           code
    ---------------------------------------------------------------------------------------
    C                                    13200        1031558         951267        5356551
    C/C++ Header                         13760         300309         535100        1643611
    Assembly                              1321          47500         100899         230638

Seven million lines without drivers. Linux is huge. I'm sure you'll move the goalposts further though, so what should I do next? Delete most stuff in arch/ and samples/ ?

Numbers obtained by running cloc 1.96 on current kernel master.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by taeric on Monday August 07, 2023 @02:54PM (#37038979)
This seems to just support my criticism, though? Even without the drivers, it is still a big number, but is literally less than half the lines of code shown before? Why inflate what you show just to get an absurd comparison?

I think many are misunderstanding my criticism here. I offer it more as a way to strengthen the message than I do to question it entirely.

To that end, the only "goal post shift" I would add is to ask how many of the 17 million lines of driver code have to be done for Hurd to support hardware that would make it more relevant for a ton of users?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by kelnos on Monday August 07, 2023 @06:02PM (#37041558)
> Delete most stuff in arch/ and samples/ ?

Probably? If you really want an apples-to-apple comparison, delete everything but x86_64 support from both Linux and Hurd. Remove sample code.

linux/net isn't strictly "drivers", but implements the base of the networking stack. That's 900k lines. Is that networking base code included with the Hurd figures? If not, delete it (or include in your comparison Hurd's base networking code).

Beyond that, this is getting a bit ridiculous. Who cares about the LoC comparisons? They're very different kernels with very different levels of maturity and number of features. I'm not even convinced you can call one "better" or "worse" based on this metric at all.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by bityard on Monday August 07, 2023 @03:23PM (#37039578)
> Most microkernels are small enough to fit in the L3 cache

Is that important, though? As soon as you start processing any meaningful amount of data, won't your OS be evicted from the cache anyway?

> unless you are compiling your kernel specifically for your machine, your kernel is going to be a bloated compromise of the set of drivers that your system is most likely to see. That means that you will have dozens, if not hundreds of drivers compiled into your kernel which will never need to be used.

I'm not sure this is true. Device drivers are typically compiled as modules, which are only loaded into the kernel if needed. Common wisdom among Linux power users for the last decade or so has been that compiling your own kernel for any tangible performance/memory improvement is basically futile.

Are there exceptions to this that you are aware of, and can elaborate on?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @03:42PM (#37039870)
> Is that important, though? As soon as you start processing any meaningful amount of data, won't your OS be evicted from the cache anyway?

Writable caches yes. However many (most?) modern processors also contain an code-only cache which can be used for OS caching without any need to flush. The raspberry pi 4 can fit many modern microkernels in their tiny immutable cache, so it gains a massive caching benefit by being small.

> Are there exceptions to this that you are aware of, and can elaborate on?

You’re probably right, I was unaware of the extent of the kernel module usage. Regardless, the smallest common kernel in use that I know about is for alpine Linux and that is still at least 100MB, which is dramatically larger than the <1MB microkernels that are typically available.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by dralley on Monday August 07, 2023 @03:29PM (#37039676)
>This inability to fully cache the kernel ends up negating the primary benefit that monolithic kernels have, which is performance.

OK then, so, which microkernel provides performance on-par with or better than Linux?

This is a strong claim and some evidence is warranted.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @03:59PM (#37040144)
Linux IPC syscall latencies benchmark in the 10s of microseconds typically. SeL4 has worst case execution guarantees that are better than that, even counting the fact that you have to do two syscalls for every one Linux syscall. We’re talking less than a thousand cycles total, which would be less than a single microsecond.

https://www.sel4.systems/About/Performance/home.pml

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by dralley on Monday August 07, 2023 @04:53PM (#37040807)
Does SeL4 have all of of the speculative execution mitigations that Linux has?

Syscall latency also is not the end-all-be-all of performance. Does that actually translate to faster disk and socket I/O on average?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @05:23PM (#37041149)
I do believe there are speculative execution mitigations, yes...and from what I remember there was a significant performance impact when they were implemented, and especially so on processors without dedicated code caches.

Syscall latency is definitely not the end-all-be-all of performance, but it is all there is to compare between a monolithic kernel and a microkernel. In both cases, driver code needs to run, and that driver code can be good or shitty just like everything else.

When it comes down to it, the syscall latency that is comparable is the context switch between privileged and unprivileged mode. The holy grail of microkernels isn't to be faster than macrokernels, it is to be just as fast, but a hell of a lot more modular, usable, and secure.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by mschuster91 on Monday August 07, 2023 @05:14PM (#37041026)
> Syscall latency also is not the end-all-be-all of performance.

That depends on what you're doing. If you're running some digital signage display or whatever, no one cares about a missing display frame or whatever. But if you're running a car's HUD or, worse, its steering system, you absolutely need the execution time guarantees or your code won't make it past certification.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by dralley on Monday August 07, 2023 @05:18PM (#37041075)
I'm not saying it's not an important space, because it is. But the majority of use cases are not that latency-sensitive. And if you're not that latency-sensitive, it's not obvious that microkernels like SeL4 and QNX are faster than Linux.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by kjs3 on Tuesday August 08, 2023 @12:36PM (#37051698)
And the goalpost moves again.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by CRConrad on Monday August 21, 2023 @02:11PM (#37213236)
Could just as well be read as the position of the goalpost gets more precisely specified for each question. The original "performance" was quite ambiguous; this is just a final specification of what was meant by the word.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by twic on Monday August 07, 2023 @03:50PM (#37039992)
> Most microkernels are small enough to fit in the L3 cache, some are small enough to fit in the L2 cache. Linux, even if we could exclude the drivers, doesn't even come close. This inability to fully cache the kernel ends up negating the primary benefit that monolithic kernels have, which is performance. Linux spends more time bouncing around the cache than a modern microkernel takes to do an extra syscall.

This makes no sense. The comparison that matters isn't kernel vs microkernel, its kernel vs microkernel plus all the userland code needed to implement system services. If my program wants to read a file and write to the network, then the code to do that has to be brought to the CPU to run before my program can finish doing that, and it doesn't matter whether that is in the kernel or userland.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by cesarb on Monday August 07, 2023 @05:03PM (#37040923)
> This makes no sense. The comparison that matters isn't kernel vs microkernel, its kernel vs microkernel plus all the userland code needed to implement system services.

And also, what matters for performance is the size of the "hot" code. A lot of code, both on a monolithic kernel and on the userland code implementing system services for a microkernel, is going to be "cold" code which executes rarely. This includes initialization code, shutdown code, most of the error handling code, code to react to uncommon hardware events, and so on.

> If my program wants to read a file and write to the network, then the code to do that has to be brought to the CPU to run before my program can finish doing that, and it doesn't matter whether that is in the kernel or userland.

And given that the essential complexity is the same, it's very likely that the size of the relevant code is similar.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @05:35PM (#37041287)
You're right...that is the part that doesn't matter. But the kernel still has to coordinate and schedule that. The kernel has an inherent overhead for execution and context switching, and will always have some amount of code that is hot.

The reason microkernels typically benchmark on syscall (typically IPC) latency is because that is the only truly apples to oranges part that you can't compare between the two. Monolithic kernels have a single context switch, microkernels have two. But microkernels, being micro, are a lot friendlier to caches (less to load and flush), and especially so with dedicated code caches (which do not need to flush on context switch).

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by AtlasBarfed on Monday August 07, 2023 @04:50PM (#37040782)
On modern computer systems still virtual paged? I don't think it really matters if the entire OS fits in the l3 cache because if it's paged as i believe it is then the most relevant pages will end up in cache.

So even if you have a really large monokernal the parts of it that actually get used will be in cache in the parts that aren't used and won't be in cache.

Has other people stated how Michael Colonel is still going to need a lot of user modules to do most of the work that's normally in the monolithic kernel, so it'll probably end up being about the same amount of code that needs to be in cash first, not in cash. The differences is really come down to just call boundaries as I understand it

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by mcv on Monday August 07, 2023 @04:56PM (#37040845)
> 1. Linux is too big.

Too big for what exactly? Because it's clearly not too big to run. It's been running very well for decades, and Hurd has not.

I've known for decades that on paper, microkernels and Hurd should be superior, and I've wondered for nearly as long why then they aren't taking off. If they're so good, they should at least be thriving in some niche where that performance matters, shouldn't they?

And now I hear that even after 3 whopping decades, it still doesn't run on real hardware! Entire operating systems have been born and died in that time.

What is the problem that's making Hurd still not work?

> 2. It will take time to write a ton of device drivers, simply because most of them aren't written yet. To that extent, Linux most definitely has an incumbent advantage.

But why is Linux the incumbent when Mach and Hurd were conceived 3 years earlier?

> But that isn't to say that microkernels also have an advantage here.

I would love to believe that, but then why has that advantage not paid off for 30 years?

> With all that being said, I definitely don't think Hurd is the future. A Why not? And is this why nobody has been writing those drivers?

I don't mean to be shitting on Hurd, but it's been really promising for so long, and not delivering, that it's starting to feel like fusion power: always in the future, nearly there, but never quite here.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Monday August 07, 2023 @05:12PM (#37041011)
> I've known for decades that on paper, microkernels and Hurd should be superior, and I've wondered for nearly as long why then they aren't taking off. If they're so good, they should at least be thriving in some niche where that performance matters, shouldn't they?

They (microkernels) thrive in Automobiles, Aircraft, Spacecraft, Security systems (such as hardware encryption devices), Defense Munitions, Embedded Devices, Maritime devices, radar systems, and many other areas. The common thread here is that they are not just resource constrained and performance sensitive, they are also typically very specialized and mostly write-from-scratch.

That last part is the key to understanding why general purpose operating systems mostly use legacy kernels that are decades old. We want to preserve as much as we can from what came before.

> But why is Linux the incumbent when Mach and Hurd were conceived 3 years earlier?

Because Linux worked earlier. Nobody in the GNU ecosystem knew how to develop a microkernel that worked, let alone drivers for a constantly changing target OS.

> I would love to believe that, but then why has that advantage not paid off for 30 years?

Again, they have. Almost all RTOSes are microkernels, and the most popular embedded OSes are microkernels. When you're writing something from scratch, it is always going to be easier with a microkernel. Don't mistake Hurd with the concept of a microkernel. Hurd sucks because it has always sucked. It's bloated, poorly documented, relies on a very janky GNU ecosystem that has already mostly adapted to Linux out of practicality concerns, and there is no ecosystem tooling around it.

But the advantages of microkernels in general are very real. The best one out there in terms of maturity is QNX, and while practically every modern car on the planet runs on it, it's licensing pretty much precludes it from being used as a general purpose OS.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by themerone on Tuesday August 08, 2023 @12:08AM (#37044416)
Who's used QNX in automotive for anything other than infotainment? A lot of people seem to think it's being used for vehicle control systems, but I've never been presented with a credible evidence of widespread use in production vehicles.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by defrost on Tuesday August 08, 2023 @12:20AM (#37044470)
It's probable that QNX would underpin any future Mitsubishi Electric autonomous driving system, and more certain that it would underpin sensor integration etc. in future Mitsubishi car models.

But it's not being used there in current mainstream production.

https://www.meaa-mea.com/advanced-mobility/

https://www.blackberry.com/us/en/success-stories/mitsubishi

It's certainly difficult to pick through the Blackberry QNX hype to see where it's actually headed outside of infotainment, lot's of fuzzy weasal phrasing:

https://blackberry.qnx.com/en/industries/connected-autonomou...

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Tuesday August 08, 2023 @10:46AM (#37049775)
BMW, Ford, GM, Honda, Mercedes-Benz, Toyota, and Volkswagen are all users of QNX’s safety certified versions, which I would assume means more than just infotainment.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by themerone on Tuesday August 08, 2023 @03:39PM (#37054417)
Users or licensees, there is a big difference. They could be just be playing around with it in laboratories.

Outside of some vague blackberry press materials, I've never seen anything specific.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by themerone on Tuesday August 08, 2023 @03:39PM (#37054424)
Users or licensees, there is a big difference. They could be just be playing around with it in laboratories.

Outside of some vague blackberry press materials, I've never seen anything indicating use in vehicles.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by mcv on Tuesday August 08, 2023 @01:19AM (#37044805)
So Linux is too big for embedded systems. I completely understand that. But I was hoping they'd also be viable for general purpose computers. That's certainly what Tannenbaum argued back in the day.

Or could they work if only people would stop focusing on Hurd? Is Hurd a dead end? Or is GNU the real problem and should we abandon that?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Tuesday August 08, 2023 @10:38AM (#37049655)
I think Hurd is fixable from a functionality standpoint, but I think it is a dead end from a sociocultural standpoint. It’s old, boring, and has never worked well in its entire history, why would anybody think they could be the one that makes the difference? Nobody cares about it anymore, it’s the kernel that almost tanked the GNU ecosystem before it was saved by Linux.

Out of all of the microkernels out there, the one I like the most is SEL4, but the security model is so different from most OS kernels that you essentially have to program for it from the ground up. And it seems like there isn’t any momentum there either. QNX is already very mature and performant though, and it has gotten a huge boost from IoT and electric car development, and IMO all it needs is an open source license and it will eventually creep its way into general purpose OS usage.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by janneke on Tuesday August 08, 2023 @10:59AM (#37049973)
GNU is not an ecosystem (see <https://www.gnu.org/philosophy/words-to-avoid.en.html#Ecosys...>), it's a philosophy.

Yes, it's old. Yes, there's only little interest. Yes, there are _still_ many technical problems.

The interesting thing here is that technical problems can be solved, and will be solved given enough time. Heck, I've heard rumors that even Windows does not crash multiple times a day anymore.

Focussing and working on what is popular will most likely create a world that is less free every year. Some people rather work on something that seems right and promises a better, freer future. Even if it's not popular (right now), even if it has a high probability of failure.

Popularity is a very volatile property...

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by darksaints on Tuesday August 08, 2023 @11:57AM (#37051023)
The biggest success that GNU has had is that they made it incredibly unpopular to keep source code proprietary and closed. It is no longer necessary to limit yourself to just the GNU OS in order to enjoy limitless freedom of computing.

And popularity might be a double edged sword, but double edged swords are still useful if you're careful.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by janneke on Tuesday August 08, 2023 @12:21PM (#37051439)
That's a great compliment as I think the core vision of GNU is that all software should be free (<https://www.gnu.org/philosophy/shouldbefree.en.html>).

Although keeping software proprietary or writing proprietary software may have become somewhat unpopular in some niches (I'm not sure it's incredible unpopular seeing how many people and institutions still use and often advocate Apple, MicroSoft, use FaceBook, WhatsApp, whatsnot...), I'm not yet convinced that many people (say more than 1%) really believe that all software should be free and act on that?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by emptysongglass on Monday August 07, 2023 @05:08PM (#37040972)
On the topic of the Linux kernel, why is it that modules and config options are so poorly documented, often not at all? I remember when I was compiling my own kernel, many options and modules I'd just have to guess based on my hardware. I understand Torvalds to be an incredibly demanding BDFL. I'd assume he'd insist on clear helper docs for any modules that wish to merge.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by kelnos on Monday August 07, 2023 @05:51PM (#37041447)
> To add to this, unless you are compiling your kernel specifically for your machine, your kernel is going to be a bloated compromise of the set of drivers that your system is most likely to see. That means that you will have dozens, if not hundreds of drivers compiled into your kernel which will never need to be used.

These days most Linux distros build pretty much any driver as a module that can be built as one. Boot-critical modules (like NVMe drivers) are included in the initramfs so they're available before the disk is mounted.

I agree that Linux is still larger than a microkernel, but very few users have a bloated kernel in RAM due to lack of customizations.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by snvzz on Monday August 07, 2023 @09:27PM (#37043302)
>I agree that Linux is still larger than a microkernel, but very few users have a bloated kernel in RAM due to lack of customizations.

Most users run the distribution's kernel.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by viraptor on Tuesday August 08, 2023 @01:34AM (#37044898)
Which distribution kernel specifically? If you're running on a VM, you get a cloud kernel in many distros, which is very stripped down for example. On other systems - the modules part still applies - how much are you actually trying to save on the kernel RAM usage? I've got a very average kernel from a distro at 20MB and initramfs at 35MB. They could be twice the size and I would never notice. I appreciate they could be smaller, but we're running a minimum of 8GB these days.

The rest is in the modules and they're not loaded unless they're actually used.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by snvzz on Tuesday August 08, 2023 @02:20AM (#37045192)
Literal megabytes of code running in supervisor mode.

What could possibly go wrong.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by viraptor on Tuesday August 08, 2023 @04:59AM (#37046274)
It would be great if they didn't of course. But historically, I've never had issues with kernel patches. In large enough deployments you get everything rolled ahead of the publication, or care enough to run grsec and custom profiles. In smaller ones, the kernel side is far down the list of things you care about.

So yeah, in the ideal world, let's have everything isolated. For now it would be great if they worked at all.

Also... There's a bit of practical limitation to how useful the isolation is. It's cool that the FS module runs in the userspace. But if it can create a suid-equivalent file and point an arbitrary config at it, you're not gaining much.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by Affric on Monday August 07, 2023 @05:57PM (#37041510)
You can get 32MB L2 cache on an Intel i9 13000k and maximum size of a compiled Linux Kernel appears to be around 8MB.

I am not going to pretend I have any idea because I have just googled these numbers but it seems to me that an amount of cache could be reserved for the kernel without too much of a hit to applications on what are currently high end machines.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by anonymousiam on Monday August 07, 2023 @10:09PM (#37043614)
As well as QNX, which is excellent, GHS Integrity is also a very nice, but closed/proprietary microkernel.

https://www.ghs.com/products/rtos/integrity.html

https://en.wikipedia.org/wiki/Integrity_(operating_system)

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by marcosdumay on Monday August 07, 2023 @02:27PM (#37038540)
> Isn't that a large part of the source tree?

For Linux, yes. For a microkernel, those are different trees of userspace software.

Not to say, Hurd itself is userspace software, that runs over a microkernel (included on the distribution).

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by uxp8u61q on Monday August 07, 2023 @04:06PM (#37040252)
> For Linux, yes. For a microkernel, those are different trees of userspace software.

If that were the argument, then the comparison with Linux would be meaningless. Hurd is much bigger than freertos, should everyone switch?

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by weberer on Monday August 07, 2023 @03:49PM (#37039985)
Yes, its mostly drivers. Here's a breakdown of the Linux kernel by lines of code:

https://upload.wikimedia.org/wikipedia/commons/f/f5/Sankey_D...

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by bee_rider on Monday August 07, 2023 @03:56PM (#37040092)
That’s a neat way of visualizing it.

It is interesting that the “remainder” chunk of the drivers is so big. Wonder if they need some more categories.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by stavros on Monday August 07, 2023 @05:14PM (#37041031)
I was expecting a block chart, kind of disappointed it isn't.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by winter_blue on Monday August 07, 2023 @05:09PM (#37040983)
Wow, I'm surprised by how small the file systems are.

On the smaller side, Ext4 at just 21,515 lines, and on the larger side, Btrfs at 55,758 lines.

It almost makes me think that writing a new file system in Rust, might actually be a tractable project.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by PaulDavisThe1st on Monday August 07, 2023 @05:25PM (#37041171)
Oh please do, because what really screws up filesystem implementations is the language they're written in.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by meepmorp on Monday August 07, 2023 @05:46PM (#37041401)
It's a good thing that you warned them off, or they might've accidentally gone and done something interesting or enjoyable.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by serf on Monday August 07, 2023 @06:25PM (#37041795)
I think it's a great project to tackle.

Here are my criticisms :

1) LoC doesn't indicate complexity. When you're looking at a code base and you see that it's 65000 lines, that by no means should be an indicator of whether or not a re-write is easily feasible -- especially with a filesystem.

2) Language shouldn't be a motivator for a re-write without considering why the language offers advantages, the end users don't care about which file extension is littered across the source tree.

Both of those tendencies (one to re-write everything in your favorite language, and two to come across with an idea that you understand how complex a mechanism is simply from LoC) indicate to me, anecdotally of course, a certain lack of experience; and I have a hard time imagining someone with those concerns tackling a re-write of a filesystem that gains 'the audience' any benefits.

If it's just for the sake of personal toys and fooling around with your own machine I feel as if those motivations are fine, but I have concerns if 'a new filesystem in Rust' comes from what I view as shaky initial motivations.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by PaulDavisThe1st on Monday August 07, 2023 @05:58PM (#37041523)
Yep, because everyone who is going to do something interesting or enjoyable starts with the question "should I use language X because it's cool?".

Look, I'm as into cool FS-hacks as anyone, but writing a new filesystem has 99+ problems and the language used is either the last of them, or it isn't even in the set.

Granted, you could (on Linux) write a little pseudo-filesystem (e.g. /proc or /sys) and not face any of the issues involved in extN or btrfs etc. I didn't get the sense that this was what the OP intended, but I could be wrong.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by Paul-Craft on Tuesday August 08, 2023 @03:20AM (#37045604)
Writing a basic filesystem using FUSE is pretty simple, fun, and can occasionally be useful.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by Gibbon1 on Tuesday August 08, 2023 @03:49AM (#37045819)
I frankly don't understand why he doesn't realize that the borrow checker is just the thing to prevent all the bugs you can have with a file system implementation.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by Paul-Craft on Tuesday August 08, 2023 @04:20AM (#37046033)
All the bugs? I doubt that.

Many of the worst bugs (data loss and corruption)? Probably.

Having something like the Rust borrow checker around to make sure you don't make dumb mistakes is handy, to be sure. But, let's not oversell it as some kind of panacea. I bet I could write a FS in Rust with all kinds of bugs, and the borrow checker wouldn't be able to stop me.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by Nereuxofficial on Monday August 07, 2023 @05:26PM (#37041181)
I also thought that'd be a fun project. BTRFS seems to have the largest feature set although many features are experimental but maybe there would be a place for something smaller that scales well and maybe has some of the new features like deduplication
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by lutoma on Monday August 07, 2023 @05:58PM (#37041521)
I'm writing a hobby kernel/operating system and one of the things that surprised me was how simple ext2 is. It really isn't much different from fat32 in many ways, just a bit more flexible and designed in a more future-proof way.

Obviously ext2 is a very outdated filesystem by today's standards, but considering ext3 and ext4 are essentially just some extensions slapped onto ext2, I still didn't expect it.

Another thing I found really impressive was just how resilient e2fsck is. During early development of my ext2 code I frequently mangled the file system in a myriad of weird ways, but no matter how much I broke things, e2fsck was almost always able to restore the file system into a reasonable state.

(For the curious, there is some excellent documentation on the ext2 file system at https://www.nongnu.org/ext2-doc/ext2.html that I mostly used for my implementation of it. Sadly no such thing seems to really exist for ext3/ext4).

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by JohnFen on Monday August 07, 2023 @06:50PM (#37042022)
Filesystems tend not to be all that complex to implement.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by effie on Monday August 07, 2023 @10:49PM (#37043905)
Simple filesystems - those oriented at speed, without integrity checking, compression, encryption and raid-like features. Which are extremely useful and desirable in a filesystem.

When people tried to do a full-featured filesystem, with a remarkable exception (ZFS) it's either a disappointing unfinished mess (btrfs) or a promising, but a long-term project taking years (bcachefs).

Making a filesystem with strong support of important features is an extremely demanding project.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by midoridensha on Tuesday August 08, 2023 @12:40AM (#37044565)
Don't forget: buggy filesystem code can easily lead to catastrophic data loss, which ruins your filesystem's reputation.

Lines of code isn't the only important metric. A project with a smaller number of LoC can take a long time to fully test and debug and validate.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by Foobar8568 on Tuesday August 08, 2023 @01:39AM (#37044921)
Hammer2 comes to mind as well..
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by effie on Tuesday August 08, 2023 @11:51PM (#37058514)
Does it run on Linux or ordinary BSD? Does any company use it?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by spookie on Tuesday August 08, 2023 @11:23AM (#37050370)
I'm sorry, as I keep hearing these criticisms around BTRFS, I still don't know why. What is so messy about it? Honest question
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by janneke on Tuesday August 08, 2023 @12:11PM (#37051284)
Have you tried reading the code? It's twice as large (107KLOC) as ext4 (45KLOC), where ext4 is viewed as a natural evolution of ext2 (7KLOC).

45KLOC of C code already sounds really scary to me, although yeah, journaling is really nice to have.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by spookie on Tuesday August 08, 2023 @06:36PM (#37056407)
Yes, that's scary. Understandable, but it does come with a lot of functionality that's nice to have no?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by effie on Tuesday August 08, 2023 @11:41PM (#37058451)
It's "perpetually half-finished". Bad track record with reliability and loss of data, lots of stories on the internet. It perhaps got better, but RAID5/RAID6 for metadata (standard use of disks) still not oficially recommended and thus standard RAID5/RAID6 is not reliable. Also, look at some FS benchmarks - BTRFS is still much slower than EXT/XFS, and slower than ZFS.

About the only class of scenarious to use BTRFS instead of ZFS is if you want the features, do not need RAID5/6, require support by Linux distributor/kernel developers or for some other (hard to think of) reason you can't use ZFS.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by spookie on Wednesday August 09, 2023 @03:01AM (#37059510)
Thanks, that makes sense. I should look more into it
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by effie on Friday August 11, 2023 @11:27PM (#37096726)
No problem. For more, this looks like a good intro

https://arstechnica.com/gadgets/2021/09/examining-btrfs-linu...

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by JohnFen on Tuesday August 08, 2023 @11:31AM (#37050510)
Filesystems aren't complex to implement -- even complex filesystems.

What's harder is making them as robust as they need to be for practical daily use. Doing that is a matter of comprehensive testing, though. With filesystems, the hard part is QA, not implementation.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by effie on Tuesday August 08, 2023 @11:31PM (#37058394)
Oh it's word games with "implement". OK then, let's agree then developing a modern filesystem into a robust software for practical daily use is hard.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by rcxdude on Tuesday August 08, 2023 @07:08AM (#37047213)
The difficulty in filesystems is generally getting to the point of high enough reliability that people trust then with their data. This is why development and adoption of new ones tends to be slow, not the quantity or complexity of implementation. So for a hobby it's quite accessible because that expectation of reliability isn't there.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by broodbucket on Monday August 07, 2023 @07:32PM (#37042386)
Wow arch/arm (which is 32bit) is bigger than x86 and powerpc which have 32/64 under the same subsystem. I guess it's mostly device tree bindings?
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by askiiart on Monday August 07, 2023 @08:47PM (#37043031)
For anyone wondering, drivers are 5205102 out of 7616785 lines, or about 68.34% of all lines.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by cbsmith on Monday August 07, 2023 @04:02PM (#37040180)
With a microkernel model, most of those drivers would run in user space, not kernel space. So it's possible for the device drivers to be large but the GNU HURD kernel itself to be much smaller than the Linux kernel.
Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by molticrystal on Monday August 07, 2023 @04:35PM (#37040606)
LoC is a metric for manageability of the code base and compile time, and you might need other metrics to judge those two factors.

For real world use wheen comparing OS you would generally go for other metrics like resource usage, multi threading bottlenecks, throughput of network packet and their processing, context switches(or equivalent) per second, and dozens of other things that would be paragraphs in length before you get to LoC.

Re:GNU/Hurd strikes back: How to use the legendary OS in a (... by thrillgore on Monday August 07, 2023 @09:22PM (#37043270)
I've been playing with Redox a lot lately. By comparison, everything is big compared to Redox.