📜 ⬆️ ⬇️

The history of the GNU operating system, or what happened to Hurd?

Readers are invited to translate the article "Whatever happened to the Hurd?" - The story of the GNU OS, published in the Linux User & Developer magazine last December.

Work on the GNU operating system has been going on for nearly thirty years - since 1983. For the first time, the interest to the Mach microkernel developed at Carnegie Mellon University (CMU), as the core of its operating system, the Free Software Foundation (FSF) showed back in 1987 ., but its source code was not distributed under a suitable license until 1991. By that time, Linus Torvalds was already engaged in his own project to develop a kernel for IBM-compatible computers on an i386 processor.

If Linux hadn’t been written and published under GPLv2 at one time, if it didn’t fit so well into the environment of existing GNU components and didn’t capture the hearts and minds of developers all over the planet - who knows, maybe all around Hurd, and we would now live in a slightly different world. But the fate of Hurd was influenced not only by the rapid growth of Linux popularity or by the FSF bet on the Mach microkernel.

At its core, the Hurd architecture is an attempt to translate the spirit and perspectives of the software freedom movement into software code. Here are the words of one of the staff of the FSF of those times: “Probably, we can say that when we designed Hurd, we were thrilled with what was happening around. The freedom of software movement has always been (and is) that users are no longer dependent on the whims of the “software” vendors. The Hurd micronuclear architecture, the device and the interaction of the demons - if you draw an analogy - gave the same freedom to ordinary users of the system: you are no longer obliged to obey the system administrator, his draconian policies and rules. Each user could (safely for the system itself and other users) start any set of daemons, creating the working environment necessary for him or her, without asking anything about the system administrator. ”
')
GNU meditating


Just a big closet


Richard Stallman announced his intention to write a full-fledged Unix-like operating system, which he called GNU (recursive acronym GNU's Not Unix!), In September 1983. During this time (before Hurd was born), the system components and tools were written kernels: editors and compilers, Bash, Make, Autoconf, Emacs, GCC, sed, gawk, etc.

GNU paid for itself by selling software products. When work began on Hurd, FSF began hiring developers. “It was long before the era of broadband Internet, and most often people worked at text terminals, via modem. We usually shared one office; if you saw him, you would think that he looks more like a big closet. We were guests at MIT at the time. ”

Linus Torvalds announced his “free operating system (just a hobby, nothing professional like GNU) for 386 (486) AT-clones” at comp.os.minix conference several months before starting work on Hurd. Linus chose a model of a monolithic core, from which purists turned up their noses, but which made it possible to quickly obtain a working core.

Linux was hated by hackers, enthusiasts and scientists, many of whom became actively involved in the development. The kernel attracted them with its openness, free license and the fact that it could be run on almost any existing device. Linux "caught the wave", the developer community grew surprisingly fast. Work on Hurd continued, but not with the same activity. People were more interested in GNU / Linux, and not GNU Hurd.

Idealistic philosophy


From the point of view of users, Hurd was still growing and growing, and Linux, thanks to the efforts of developers, firmly took its place as the "heart" of the GNU operating system. At first, Stallman was skeptical. Earlier versions of Linux worked only on IBM 386; in the words of Stallman himself, “we heard that Linux is practically not ported (this is not the case now, but it was said then), and, in addition, Linux is similar in its architecture to the Unix kernel. We write something much more powerful and advanced. "

Linux was closely tied to GCC and the GNU toolkit, developed more and more “materel”, especially with the advent of distributions, and soon the FSF began to consider it as an acceptable (if not the most optimal and temporary) replacement for the still non-existent kernel of the GNU operating system. Stallman immediately clarified: “There is no operating system called Linux. The Linux operating system is GNU. Linux is just a program: the kernel. The kernel is part of the operating system, the lowest-level program that controls other programs, allocating them processor time and other resources. "

He insisted that the GNU operating system with Linux be the GNU / Linux kernel as a kernel, so that “people understand that the system exists thanks to an idealistic philosophy . Call it Linux, and you break the philosophy. This is a very serious problem. Linux is not a system, but only part of it ... It is because of the idealistic position on which the GNU project is based that we have this system. ”

Work on the Hurd continued, but it soon became apparent that the FSF had embarked on a thorny path in its search for perfection. The microkernel required a number of rather difficult problems to be solved, and many of those who could take on this were busy working on Linux, which could already be fruitfully used. Despite the well-known criticism , for example from Andy Tanenbaum, the choice of Linus of the monolithic kernel model made it possible to get a working system much easier and faster.

Later, Stallman admitted that “he bears full responsibility for the technical solution to develop the GNU kernel based on Mach, which is why the development of the system has been so slow. I thought that using Mach would save us time, but it turned out to be wrong. ”In the following years, Hurd was ported to various microkernels, from L4 to Coyotos and Viengoos, but he could never boast that community support and the resources he had (and has) Linux.

Principle and commitment


In the late nineties, there was a split in the community that led to the emergence of EGCS (pronounced eggs ) - a branch of GCC, whose goal was to step aside the leadership of FSF development and the Open Source Initiative (OSI) to promote less radical and uncompromising views and ideas of open source software.

“The main thing they [OSI] sought to be different from the FSF was that they did not condemn closed software products and did not declare themselves as a movement for freedom, but developed ideas about what economic benefits free volunteers could bring , just for fun. ”But some saw“ its main goal — to try to politically marginalize Stallman; and trying in some way unsuccessful. "

The release of Hurd began to be talked about in 1994, when it seemed that Emacs could be started; The release date was 2001, but it never happened. When Hurd was ported to L4 in 2005, Markus Brinkman said that “we can now easily explore and develop the system as we like,” but had to admit that “I can build simple applications using my glibc port, but most of them do not start, because they need a file system or, say, calls to fork and exec, and I only have stubs for now. ”

In the mid-nineties, Debian appears on the scene, which, thanks to the Debian Guidelines , written by Bruce Perens, becomes the carrier and expression of the FOSS movement's “public consciousness”, while the FSF largely abandoned the development of GNU, focusing mainly on the political issues of the movement.

Since 1998, Debian GNU / Hurd has been one of the active Debian projects producing installation and live CDs, which can be regarded as a reference version of Hurd, but still does not have the status of an official release. The quality of the Hurd code still does not allow it to be used for solving any real problems, the support of the equipment is also very limited - but it can be fully run in a virtual machine, try it.

Once FSF paid programmers to work on GNU projects, but now most of them are volunteers or employees of companies who are interested in projects like GCC and, accordingly, sponsoring them. Hurd almost fell out of sight, because there is Linux, which already works here and now, so there is no special need for another kernel. But the principle and commitment have not gone away, and perhaps in the future, the ideas of the GNU Hurd will again be in demand.

Alix is ​​the true core of GNU


Richard tells the story that the GNU kernel was not originally called Hurd.

“At first I called him Alix (Alix), that was the name of my girlfriend at the time. She was a Unix system administrator and somehow noticed that her name was similar to the names of many Unix systems. She jokingly told her friends that “someone must name the core after me.” I didn’t say anything then, but decided that I’d give her a surprise and call the kernel Alix. ”

“However, the name did not stick. Michael (now Thomas) Bushnell, the main kernel developer, preferred the name Hurd, and Alix got the name from one of the kernel subsystems — the one that intercepted system calls and processed them, exchanging messages with the Hurd servers. ”

“Some time later, Alix and I broke up; she changed her name. At the same time (but independently), changes occurred in the Hurd architecture, and the C library sent messages directly to the servers, which made the Alix component unnecessary, and it was removed. ”

“But before all this happened, one of her friends came across her name in the Hurd source code and told her about it. So she had the opportunity to find the core named after her. ”

Bushnell chose the name Hurd in part because it looks like a herd of antelopes, in part because Hurd is a recursive abbreviation of “Hird of Unix-Replacing Daemons”, and in turn Hird is “Hurd of Interfaces Representing Depth. He said that "as far as I know, we are the first software product whose name is a pair of mutually recursive abbreviations."

Thomas Bushnell is currently a Debian developer and a Gregorian.

OS structure


At the forefront


Unlike Linux, the monolithic kernel, Hurd uses a microkernel, and almost all of the functionality has been moved from kernel space to user space. The microkernel is just an interlayer between the “iron” and everything else that the monolithic core usually does.

In 1996, Thomas Bushnell, one of the main architects of Hurd at an early stage, published his ideas in the article “ Towards a New Strategy of OS design ”.

“GNU Hurd,” he writes, “is designed so that the system code is as limited as possible. Programs will interact with only a few subsystems, all other parts of the system are dynamically replaceable. Users are free to use them at their discretion, will be able to connect new components for the needs of other users. There is no need to pre-establish trust in the interaction between users (ie, each other's services). The system is not exposed to the vulnerability by “trusting” the services of arbitrary users. ”In practice, this means that users do not need to contact a certain super-user (root) and wait for him to mount the file system or load the necessary device driver (as it was in Linux until recently, until some of the beneficial features of micronuclei appeared there).

“Already at that time, it was clear,” recalls one of the GNU staff members, “and it was discussed in academic circles that the microkernel architecture would have performance problems (mainly due to the large number of context switches due to the need to exchange messages between demons , compared to traditional processing of system calls in monolithic cores). [Richard] Rashid, a CMU researcher, suggested in his work that this problem is not so serious. Then it seemed, at least to me, that we are here at GNU, with scant funding, we manage not only to program and fight for freedom, but also among the first to implement the latest academic studies of computer science. In any case, the idea was this, and we were very proud of ourselves and generally were happy to be in that place and at that time. ”

Hurd was a wonderful adventure and an excursion into the most outstanding achievements of the theory of operating systems of his time. GNU's goal was to become both a Unix-like operating system and something similar to Lisp machines, classic single-user workstations, which appeared in AI Lab MIT, one of the main centers of hacker culture, from which Stallman emerged. “Emacs (with its Lisp extensions) defined a paradigm for designing interactive programs. At first it was even assumed that the window system would also be based on Lisp. ”

“One of the earliest changes in the GNU concept happened when it became clear that X11 was doing quite well, it wouldn’t“ be bent ”and would be a free program. Purely practical conclusion: we must take and use. "

What else could be


When GNU was in its infancy, the obvious solution was to find a ready-made kernel that would already be in the public domain.

Richard's first choice was TRIX, which was developed in his native MIT and is mentioned in the GNU manifest. “We have a prototype kernel, but for full Unix emulation there is still not enough,” he wrote in 1984 “When we finish the kernel and the compiler, we will be able to distribute the GNU system, under which we can write programs.” In December 1986 GNU programmers still continued to finish the TRIX, and the following year Stallman became interested in Mach.

Other ideas were considered, such as using the Berkeley Sprite operating system and the BSD kernel. “RMS was a big and consistent supporter of using as much ready-made code as possible (I think, in vain),” Thomas Bushnell later recalled.

“I would immediately take BSD 4.4-Lite and assemble a kernel based on it. I knew this code well, I knew what to do and how. Now it is obvious to me that everything would turn out perfectly with us, and the world would be completely different today. RMS wanted to work with people from Berkeley in this direction. Some of them were really interested in this, but there were also those who deliberately delayed the process. Now it seems to me that this was because of their own plans to launch BSDI, for which the BSD based on BSD 4.4-Lite system would be a completely undesirable competitor. "

According to Bushnell, in the end, Stallman decided that “Mach is a fully working core, 4.4-Lite is only partially ready. We choose Mach. "

Source: https://habr.com/ru/post/171033/


All Articles