r/linux • • Dec 08 '09

What's this? The GNU Hurd is making progress!

http://www.gnu.org/software/hurd/news/2009-11-30.html
113 Upvotes

60 comments sorted by

50

u/[deleted] Dec 08 '09

What is the advantage of running device drivers in user space?

35

u/kylert Dec 08 '09

Reduces complexity and size of the kernel and prevents poorly-written drivers from overwriting random parts of the kernel and causing a system hang.

6

u/Will_Power Dec 08 '09

Holy succinct-and-informative post, Batman!

49

u/rubygeek Dec 08 '09

Downvoting you for asking a reasonable question is a bit sad, I think. Have an upvote and an answer:

If your ethernet driver for example has a serious bug in it on a monolithic system, it can take the machine down. If it has a serious bug and runs as a separate user space process, your network goes down, and you or the system itself restarts it and things keep working.

That's the theory, any way. In practice, for most purposes kernel driver instability gets ironed out quickly enough for most people, and problems in many subsystems are hard to recover from (you don't want to keep restarting a crashing filesystem without making sure it's not hosing user data, and if it's your root filesystem you may be stuck anyway), though not impossible. Among people who prefer monolithic kernels the argument is generally that it's more complex and that the theoretical advantages are more than outweighed by the performance cost (due to message passing across process boundaries).

I think everyone agrees that ideally we'd be best off if every bit of code had the absolute minimum set of privileges (access to memory, CPU etc.) it needs. The argument boils down to whether that ideal is important enough and has enough real world benefits that it's worth pursuing further than what most monolithic kernels already do.

Of course, in the 90's we had the same heated debate about memory protection between user-space processes and between userspace and kernel space - the Amiga for example got many benefits from being able to share data structures directly across the entire system, at the cost of badly written applications taking down the system.

Very few people argue that no memory protection between processes is acceptable any more. And arguably the rise of isolation via virtualization show that a growing number of people now believe a significant amount of overhead is acceptable, so that might signal that microkernel approaches might get more interest going forward as well.

4

u/RiotingPacifist Dec 08 '09

Wasn't one of the big advantages (back in the 90s) that you could install/update/remove drivers without restarting the system? which is a moo point now we have a modular kernel.

Also what is the (design) advantage of using HURD vs a core linux kernel and running all your drivers (except / partition drivers) through FUSE/CUSE?

Thanks for the informative, balanced response, it's not that i disagree I'm just looking for more info.

10

u/rubygeek Dec 08 '09

Wasn't one of the big advantages (back in the 90s) that you could install/update/remove drivers without restarting the system? which is a moo point now we have a modular kernel.

It's certainly part of it, so yes the value has diminished in that respect.

Also what is the (design) advantage of using HURD vs a core linux kernel and running all your drivers (except / partition drivers) through FUSE/CUSE?

The theoretical advantage would be even further isolation. I.e. not just running FUSE filesystems in userland, but LVM and the entire VFS, the entire TCP/IP stack etc. How well that'd play out in practice I don't know. Also, Linux has generally been stable enough for me that while I can see the theoretical benefits, from experience I wouldn't have had much use for them over the 15 years I've been using Linux.

This is really the biggest problem for micro kernels: Monolithic but modular kernels like Linux are "good enough" for almost anyone.

I don't see mself using Hurd anytime soon. I like the theory of extra isolation etc., but I'm more concerned about having a system that actually works.

3

u/enkiam Dec 08 '09

Even with a modular kernel, a segfault in a driver (in a module) will bring the whole machine down.

If you want to empirically prove this, run ath5k (circa a few versions ago) with an AR5007EG card.

1

u/campbellm Dec 08 '09

Thanks for the effort in writing that. If I may, does having a microkernel prevent ("pluggable"?) device drivers from NOT running in user space? In other words, does having a microkernel necessarily mean only it runs in privileged mode? (Sorry, I'm old, but woefully ignorant of this level of how this stuff works.)

1

u/rubygeek Dec 08 '09

Generally to get the full benefits you'd want to only have the kernel itself run in privileged mode if you can.

It's not like there are hard rules there - there are approaches that pretty much spans the spectrum, but the less protection the system has against it's components, then the less value there is in a microkernel approach in the first place.

After all, you can do "pluggable" drivers in a monolithic kernel like Linux too - and then you don't pay the message passing cost.

1

u/campbellm Dec 08 '09

Thanks... so there's no technical limitation involved. Thanks again.

13

u/[deleted] Dec 08 '09

THIS IS THE YEAR OF THE GNU/HURD DESKTOP!!!!111

3

u/boojit Dec 08 '09

It's nice to see an update, particularly after posting this to Slashdot just a short while ago...

17

u/karper Dec 08 '09

That's what I hurd

11

u/railmaniac Dec 08 '09

I just gnu there was going to be a pun on this!

15

u/ryanjkirk Dec 08 '09

You know, you don't have to mach puns about microkernels.

10

u/Rookeh Dec 08 '09

That was quite unixessary.

-6

u/ashadocat Dec 08 '09

that pun was terrible, you deserve to be punished.

-2

u/rb2k Dec 08 '09

That's hurdly a proper start for a pun thread

6

u/karper Dec 08 '09

Perhaps you prefer a more gnuanced approach?

0

u/[deleted] Dec 08 '09

That's what I hird too

11

u/blackjewobamafan Dec 08 '09

too little too late

0

u/[deleted] Dec 08 '09

[deleted]

4

u/blackjewobamafan Dec 09 '09

The GNU project was special as long as it was going to be the first freely available Unix-like system without actually containing any Unix code.

They had the compiler, the utilities and userland tools ready for a long time, but no kernel.

Once the kernel piece was provided in the form of Linux, GNU's own kernel became (for practical purposes) irrelevant, in that it's solving a problem that already has at least one working solution.

And the Linux OS (GNU/Linux if you prefer that) is doing fine. It had 20+ years of head start and is getting better every day.

Today, a new GNU system with whatever kernel has a minor fraction of the importance it would have had 20 years ago if they were able to deliver it then.

This, is what I mean by "too little too late".

Despite what you may have heard, everybody on reddit is not talking out of their asses.

0

u/[deleted] Dec 09 '09

[deleted]

0

u/blackjewobamafan Dec 09 '09

Are you sure you know what the saying means? It doesn't mean there was a deadline that has since passed.

0

u/[deleted] Dec 10 '09

It's too late for a twenty year head start, like Linux has. How about that.

2

u/pure_x01 Dec 08 '09

I really hope that the Hurd will take of .. it is an interesting project and it would be nice to see how it can perform compared to linux.

4

u/machia Dec 08 '09

What's the history for why are they doing this hurd-thing? Isn't Linux kernel well stablished and it took what, like 20-years to get there? Is there any linux vs. hurd thing floating around the net for hurd-noobs like me..

I'm just curious on the information on what are the reasons for doing this? Do they want to replace Linux kernel which is running gpl v.2 to hurd v.3?

24

u/tutwabee Dec 08 '09

Hurd was supposed to be the GNU operating system's kernel. Linus managed to finish Linux at a time when all GNU needed was a kernel.

The biggest difference between Linux and Hurd is that Hurd uses a microkernel and Linux uses a monolithic kernel.

I've been hoping interest in Hurd might increase since I read this article about Minix getting more funding. The two events are probably unrelated, but it looks like interest in microkernels might be on the rise.

5

u/dorfsmay Dec 08 '09

The biggest difference between Linux and Hurd is that Hurd uses a microkernel and Linux uses a monolithic kernel.

Although there are now some microkernel derivatives of Linux, such as L4 Linux.

6

u/rubygeek Dec 08 '09

L4 Linux is not a pure microkernel OS, though, it's a microkernel with a monolithic Linux kernel on top, and all the subsystems most apps depends on are still part of the monolithic Linux kernel.

2

u/slashgrin Dec 08 '09

Sounds like a migration path worth exploring.

4

u/rubygeek Dec 08 '09

It is pretty similar to the approach Apple took with OS X. Mach + a bunch of mostly monolithic old stuff, and then add stuff to the "side" of the old code.

The think is the Linux core team doesn't see microkernels as worth it, more or less no matter what. But who knows, with virtualization being hot, you might start seeing more hybrid systems (say, virtualized kernels sharing a separate network stack running on the hypervisor, for example).

2

u/RiotingPacifist Dec 08 '09

Why not just skip the overhead of a hypervisor and run FreeVPS or Linux-VServer or OpenVZ or Zones (OpenSolaris) or jails (BSD)?

3

u/rubygeek Dec 08 '09

That works if you want the same kernel for all your containers/jails/whatever. I run OpenVZ all over the place, and it's my first choice because of the convenience/performance I get.

But for many uses it's not suitable - for example if you need to be able to upgrade the kernel of the clients without a reboot of the host, or if you want to run multiple different OS's.

-7

u/[deleted] Dec 08 '09

aims to be more reliable and secure than Linux or Microsoft Windows.

WTF? I thought Minix was a toy OS for academic use. I guess Andy is getting cranky with his star pupil's monolithic OS getting all the glory.

5

u/_Tyler_Durden_ Dec 08 '09

Holland... Finland... Swaziland... one of those lands, same difference.

1

u/HotBBQ Dec 08 '09

Wasn't FOXhound from Swaziland?

1

u/[deleted] Dec 11 '09

My bad, I thought he studied there at one point. Apparently he just obtained a copy of Minix and had a flame war with Tanenbaum at some point. I was into Amigas back then and didn't pay attention.

5

u/multubunu Dec 08 '09

1

u/boojit Dec 08 '09

hahaha..

Linus "my first, and hopefully last flamefest" Torvalds

3

u/enkiam Dec 08 '09

The people working on HURD like hacking microkernels. They don't really think they're going to replace Linux anytime soon, or care. They're not thinking about Linux at all, they're thinking about hacking.

3

u/_whyme Dec 08 '09

Still hurdly usable for normal users ...

1

u/foonly Dec 08 '09

Inconceivable!

-2

u/ropers Dec 08 '09 edited Dec 08 '09

This is just Lucifer's way of sewing doubt on IPCC findings in order to derail the Copenhagen Summit.

EDIT: Downmods? Really? The "hell freezes over" allusion was too hard for you to figure out? Tsk, tsk, tsk.

1

u/luciansolaris Dec 08 '09

Climate Change (TM) is a FRAUD!

-9

u/[deleted] Dec 08 '09 edited Dec 08 '09

Woo, reinventing the wheel due to NIH.

9

u/karper Dec 08 '09

More like delayed implementation, actually. Linux just beat them to it by a decade or so. Hence, the noticeable absence of /r/hurd among the top subreddits.

6

u/railmaniac Dec 08 '09

Holy fuck, there is an r/hurd!

What's more, it has had two posts in one year...

15

u/_Tyler_Durden_ Dec 08 '09

Wow, so that is twice the speed of commits @ the hurd repository!

0

u/[deleted] Dec 08 '09

Beating by a month or two, hell even a year is one thing, but by a decade (closer to 2 decades depending on how you interpret this)? That is reinventing the wheel.

7

u/freehunter Dec 08 '09

It's more like finishing a different variety of wheel.

1

u/_Tyler_Durden_ Dec 08 '09

No, it's more like finishing the wheel when the rest of the world is on jetpacks, commuting to work Jetsons style....

2

u/freehunter Dec 08 '09

Well, you could make the argument that neither wheel is finished, Linux is just more finished. Maybe they've discovered disc brakes. We'll have to find out where GNU can take us, maybe run-flats.

Now if you want reinventing the wheel, talk to the guys making ReactOS.

-12

u/lxe Dec 08 '09

Hey Linux community! You know what appeals to the general public the most? Obscure software titles and acronyms like GNU and HURD. Good luck with "Linux on the desktop". .

3

u/TheManWithNoName Dec 08 '09

If you were running this it wouldn't be Linux on the desktop, it would be GNU/Hurd on the desktop.

1

u/[deleted] Dec 08 '09

HURD != Linux

Linux is already a cool enough name. According to Linus Torvalds:

Other than the fact Linux has a cool name, could someone explain why I should use Linux over BSD?

No. That's it. The cool name, that is. We worked very hard on creating a name that would appeal to the majority of people, and it certainly paid off: thousands of people are using linux just to be able to say "OS/2? Hah. I've got Linux. What a cool name". 386BSD made the mistake of putting a lot of numbers and weird abbreviations into the name, and is scaring away a lot of people just because it sounds too technical.

0

u/Will_Power Dec 08 '09

Desktops are so last millennium.

-1

u/kumyco Dec 08 '09

In case you didn't get my memo. Linux won the desktop war way back in 2006. Also this isn't a popularity contest.

-1

u/kumyco Dec 08 '09

In case you didn't get my memo. Linux won the desktop war way back in 2006. Also this isn't a popularity contest.