0

As I know, shortly after Linus Torvalds liberated the Linux kernel it was implemented in GNU operating system which is since then known as GNU/Linux or GNU+Linux.

From the GNU article in Wikipedia I understand the GNU OS kernel is Hurd.

Was Hurd created as a modification of Torvalds's Linux kernel?

Leo B.
  • 19,082
  • 5
  • 49
  • 141
  • 8
    For a very, very long time, there was the question whether Hurd was created at all. And it still somewhat is. – tofro Jun 02 '19 at 08:50
  • 11
    Come on. You're already reading the wikipedia article, but couldn't click through to the GNU Hurd article to read about it? – pipe Jun 02 '19 at 10:42
  • 10
    You're using weird terminology IMO. What do you mean by "Linus Torvals liberated the Linux kernel"? And by "it was implemented in GNU operating system"? – Roel Schroeven Jun 02 '19 at 11:25
  • 2
    @RoelSchroeven It does almost feel as if there is an intention to prove a very specific poitical point. Doesn't it? – Raffzahn Jun 02 '19 at 22:55
  • @pipe I read there to some extent and I don't read any maybe too long at the moment full article just because it's linked necessarily; your assumption that I should suffice you an explanation on my private life and time distribution is disturbing; again I remind that no one has to answer any question. –  Jun 02 '19 at 23:00
  • 1
    @Raffzahn Not impossible, but in such cases I prefer to assume good intentions until proven otherwise. – Roel Schroeven Jun 03 '19 at 07:21
  • 1
    @RoelSchroeven I think he means when Linus relicensed the Linux kernel to the GPL, making it "libre" software, and the subsequent support of the GNU project. Recent related question. – user71659 Jun 04 '19 at 03:42

3 Answers3

15

No. The Hurd was a separate effort, using a microkernel design. Some computer scientists believe this to have more appealing properties than the pragmatic monolithic design of the Linux kernel, but it is also more difficult to implement, which is partly why the Hurd was not delivered in a timely fashion and the world ended up going with Linux.

rwallace
  • 60,953
  • 17
  • 229
  • 552
  • 1
    " it is also more difficult to implement" - in theory the opposite is true because it breaks up the kernel so it can be compiled separately and loaded on the fly. In practice, one can do that with a monokernel as well, with some work. More importantly, the micro adds overhead that has never been successfully avoided at a large scale. – Maury Markowitz Jun 03 '19 at 18:39
  • 1
    Now read https://blog.darknedgy.net/technology/2016/01/01/0/ . – JdeBP Jun 05 '19 at 18:13
9

No, Hurd kernel had been in developement for a few years before Linux kernel was released.

Justme
  • 31,506
  • 1
  • 73
  • 145
  • 2
    Do you have anything to back that up? – Chenmunka Jun 02 '19 at 11:11
  • 7
    From the mouth of RMS: https://www.gnu.org/software/hurd/hurd-and-linux.html – Tommy Jun 02 '19 at 12:05
  • Other than my memory, no, but you can find the details rather easily with your favourite search engine. – Justme Jun 02 '19 at 13:40
  • 4
    Per Wikipedia, GNU Hurd development started in 1986 (based on MIT/TRIX), was abandoned, then restarted in 1990 (based on CMU Mach). The initial release of Linux was in September of 1991. – Kelvin Sherlock Jun 02 '19 at 13:50
  • 7
    I was at university during the early noughties; at the time one professor used Hurd and Linux to demonstrate the difference between what can happen if you sit down and tirelessly plan versus if you just start coding and don't worry about an all-encompassing plan in advance. – Tommy Jun 02 '19 at 15:04
  • 3
    @Tommy: Indeed. It is quite funny to look at all the statements Linus made when he originally released Linux. "It will not be as big and professional as GNU", "It is intimately tied to 386 and cannot be ported", also he deemed making it support multiple CPUs close to impossible. – Jörg W Mittag Jun 03 '19 at 15:01
  • @Tommy - and today, with the GNU Hurd still under development (it is claimed) his point is even more valid, 30 years later!! – davidbak Jun 03 '19 at 15:11
3

No, they were independent developments.

However, the situation is a little bit more complex. Hurd is not just a Linux with a different kernel, also the structure of the OS is highly different.

GNU Hurd is a microkernel. That means that the actual kernel does as little as possible. The ordinary kernel functionality is being done by user space processes, communicating with the microkernel and with each other.

For example, the ext4 filesystem driver is a kernel module in Linux. That means it is a collection of functions in a library, what converts the ext4 filesystem operations to block device operations.

In Hurd, the ext21 filesystem driver is essentially a daemon, service. Just like, for example, the Apache web server. The ext4 filesystem operations are talking with this daemon.

A Microkernel-based OS has also the feature, that the actual microkernel is actually an easily replaceable part of the system. The important part of the system is the collection of its daemons.

GNU Hurd is the abbreviation of "Hird of Unix Replacement Daemons". During its development, the actually used microkernel was changed multiple times.

Thus, what we understand on the "Linux kernel", is a "microkernel + the collection of the Unix replacement daemons" in the sense of the GNU Hurd.

Thus:

  • Some of the code of the daemons is probably derived from Linux kernel code. Particularly the filesystem drivers.
  • Its microkernel is an entirely independent development from the Linux kernel.

The sum is that probably it has much Linux kernel code, it is mainly a different product (note, both systems being GPL, it is not a major question from the intellectual property view).

1As far I know, ext3/4 support is not developed yet.

peterh
  • 1,749
  • 1
  • 14
  • 26
  • "Some of the code of the daemons is probably derived from Linux kernel code." I would assume the opposite. The GNU project is very, very careful about who contributes to their code; code is never taken from authors who haven't signed statements about possible employer claims, etc. That makes copying code from Linux a no-go. – Nick Matteo Nov 04 '21 at 19:43
  • @NickMatteo I've checked the hurd source code, the first what I can see that it is a source debian package. Also the first page of the hurd gitweb ( http://git.savannah.gnu.org/cgit/hurd/hurd.git ) shows an ancient import from linux 2.2 . – peterh Nov 04 '21 at 23:50
  • Well, that seems like they did, then! I am surprised. – Nick Matteo Nov 05 '21 at 01:31
  • Btw, I believe actually a mutilated linux kernel would serve as the best hurd microkernel. – peterh Nov 05 '21 at 12:03
  • @NickMatteo Imho, Hurd is a failed project what makes me really sad. The causes of the failure were these: 1) what microkernels were thought for, are already being done by containerisation or virtual machines 2) lack of a really working microkernel, all the microkernels I've seen were effectively bad, big monolithic kernels 3) and they have no chance against a good, big monolithic kernel, the Linux. | The obvious escape would be to use a mutilated Linux as the Hurd microkernel, Hurd does not do that because they want a different thing from Linux, which is nice but they can not do that. – peterh Nov 10 '21 at 16:38
  • @peterh 4) Microkernels have to make (at least) one additional pair of user/kernel space transitions when handling system calls. There are techniques to mitigate this but it's a cost that monolithic kernels don't have to pay. The presumption was that the advantages of a microkernel design would outweigh the disadvantages; in practice they've mostly been too slow. There have been successes with a hybrid approach though, e.g. Mach/XNU used by Darwin (OS X). – Alex Hajnal Apr 01 '22 at 23:42