GNU Hurd

Last updated
GNU Hurd
Hurd-logo.svg
Debian GNU HURD text mode screenshot.png
Developer GNU Project
Thomas Bushnell
Roland McGrath
Marcus Brinkmann
Neal Walfield
Samuel Thibault
Written in Assembly, C
OS family Unix-like
Working stateCurrent
Source model Free software
Initial release1990;34 years ago (1990)
Latest release 0.9 [1]   OOjs UI icon edit-ltr-progressive.svg / 18 December 2016
Repository
Platforms x86-64, IA-32, i686, ARM [2]
Kernel type Multiserver microkernel
License GPL-2.0-or-later [3]
Official website www.gnu.org/software/hurd/

GNU Hurd is a collection of microkernel servers written as part of GNU, for the GNU Mach microkernel. It has been under development since 1990 by the GNU Project of the Free Software Foundation, designed as a replacement for the Unix kernel, [4] and released as free software under the GNU General Public License. When the Linux kernel proved to be a viable solution, development of GNU Hurd slowed, at times alternating between stasis and renewed activity and interest. [5]

Contents

The Hurd's design consists of a set of protocols and server processes (or daemons, in Unix terminology) that run on the GNU Mach microkernel. [4] The Hurd aims to surpass the Unix kernel in functionality, security, and stability, while remaining largely compatible with it. The GNU Project chose the multiserver microkernel [6] for the operating system, due to perceived advantages over the traditional Unix monolithic kernel architecture, [7] a view that had been advocated by some developers in the 1980s. [5]

In December 1991 the primary architect of the Hurd described the name as a mutually recursive acronym: [8]

It's time [to] explain the meaning of "Hurd". "Hurd" stands for "Hird of Unix-Replacing Daemons". And, then, "Hird" stands for "Hurd of Interfaces Representing Depth". We have here, to my knowledge, the first software to be named by a pair of mutually recursive acronyms.

As both hurd and hird are homophones of the English word herd, the full name GNU Hurd is also a play on the words herd of gnus , reflecting how the kernel works. [9]

The logo is called the Hurd boxes and it also reflects on architecture. The logo is a graph where nodes represent the Hurd kernel's servers and directed edges are IPC messages. [8]

Development history

Richard Stallman founded the GNU Project in September 1983 with an aim to create a free GNU operating system. Initially the components required for kernel development were written: editors, shell, compiler, debugger etc. By 1989, the GPL came into being and the only major component missing was the kernel. [10] [11]

Development on the Hurd began in 1990 after an abandoned kernel attempt in 1986, based on the research TRIX operating system developed by Professor Steve Ward and his group at MIT's Laboratory for Computer Science (LCS). [12] According to Thomas Bushnell, the initial Hurd architect, their early plan was to adapt the 4.4BSD-Lite kernel and, in hindsight, "It is now perfectly obvious to me that this would have succeeded splendidly and the world would be a very different place today." [13] In 1987 Richard Stallman proposed using the Mach microkernel developed by Richard Rashid at Carnegie Mellon University. Work on this was delayed for three years due to uncertainty over whether CMU would release the Mach code under a suitable license. [12]

With the release of the Linux kernel in 1991, the primary user of GNU's userland components soon became operating systems based on the Linux kernel (Linux distributions), prompting the coining of the term GNU/Linux.

Development of the Hurd has proceeded slowly. Despite an optimistic announcement by Stallman in 2002 predicting a release of GNU/Hurd later that year, [14] the Hurd is still not considered suitable for production environments. Development in general has not met expectations, and there are still a significant number of bugs and missing features. [15] This has resulted in a poorer product than many, including Stallman, had expected. [16] In 2010, after twenty years under development, Stallman said that he was "not very optimistic about the GNU Hurd. It makes some progress, but to be really superior it would require solving a lot of deep problems", but added that "finishing it is not crucial" for the GNU system because a free kernel already existed (Linux), and completing Hurd would not address the main remaining problem for a free operating system: device support. [17]

The Debian project, among others, have worked on the Hurd project to produce binary distributions of Hurd-based GNU operating systems for IBM PC compatible systems.

After years of stagnation, development picked up again in 2015 and 2016, with four releases during these two years, [18] but no more since then.

On August 20, 2015, amid the Google Summer of Code, it was announced that GNU Guix had been ported to GNU Hurd. [19]

Architecture

General structure of monolithic, microkernel and hybrid kernel-based operating systems, respectively. OS-structure2.svg
General structure of monolithic, microkernel and hybrid kernel-based operating systems, respectively.

Unlike most Unix-like kernels, the Hurd uses a server–client architecture, built on a microkernel that is responsible for providing the most basic kernel services – coordinating access to the hardware: the CPU (through process management and scheduling), RAM (via memory management), and other various input/output devices (via I/O scheduling) for sound, graphics, mass storage, etc. In theory, the microkernel design would allow for all device drivers to be built as servers working in user space, but today most drivers of this kind are still contained in the GNU Mach kernel space. [20]

According to Hurd developers, the main advantage of microkernel-based design is the ability to extend the system: developing a new module would not require in depth knowledge of the rest of the kernel, and a bug in one module would not crash the entire system. Hurd provides a concept of translators, a framework of modules used to extend a file system functionality. [21]

From early on, the Hurd was developed to use GNU Mach as the microkernel. This was a technical decision made by Richard Stallman, who thought it would speed up the work by saving a large part of it. He has admitted that he was wrong about that. [22] Other Unix-like systems working on the Mach microkernel include OSF/1, Lites, and MkLinux. macOS and NeXTSTEP use hybrid kernels based on Mach.

Other microkernels

From 2004 onward, various efforts were launched to port the Hurd to more modern microkernels. The L4 microkernel was the original choice in 2004, but progress slowed to a halt. Nevertheless, during 2005, Hurd developer Neal Walfield finished the initial memory management framework for the L4/Hurd port, and Marcus Brinkmann ported essential parts of glibc; namely, getting the process startup code working, allowing programs to run, thus allowing the first user programs (trivial ones such as the hello world program) in C to run.

Since 2005, Brinkmann and Walfield started researching Coyotos as a new kernel for HURD. [23] [24] In 2006, Brinkmann met with Jonathan Shapiro (a primary architect of the Coyotos Operating System) to aid in and discuss the use of the Coyotos kernel for GNU/Hurd. In further discussion HURD developers realised that Coyotos (as well as other similar kernels) are not suitable for HURD. [25]

In 2007, Hurd developers Neal Walfield and Marcus Brinkmann gave a critique of the Hurd architecture, known as "the critique", [26] and a proposal for how a future system may be designed, known as "the position paper". [27] In 2008, Neal Walfield began working on the Viengoos microkernel as a modern native kernel for HURD. As of 2009, development on Viengoos is paused due to Walfield lacking time to work on it. [28]

In the meantime, others have continued working on the Mach variant of Hurd. [29]

Unix extensions

A number of traditional Unix concepts are replaced or extended in the Hurd.

Under Unix, every running program has an associated user id, which normally corresponds to the user that started the process. This id largely dictates the actions permitted to the program. No outside process can change the user id of a running program. A Hurd process, on the other hand, runs under a set of user ids, which can contain multiple ids, one, or none. A sufficiently privileged process can add and remove ids to another process. For example, there is a password server that will hand out ids in return for a correct login password.

Regarding the file system, a suitable program can be designated as a translator for a single file or a whole directory hierarchy. Every access to the translated file, or files below a hierarchy in the second case, is in fact handled by the program. For example, a file translator may simply redirect read and write operations to another file, like a Unix symbolic link. The effect of Unix mounting is achieved by setting up a filesystem translator (using the "settrans" command). Translators can also be used to provide services to the user. For example, the ftpfs translator allows a user to encapsulate remote FTP sites within a directory. Then, standard tools such as ls, cp, and rm can be used to manipulate files on the remote system. Even more powerful translators are ones such as UnionFS, which allows a user to unify multiple directories into one; thus listing the unified directory reveals the contents of all the directories.

The Hurd requires a multiboot-compliant boot loader, such as GRUB.

Architecture of the servers

According to the Debian documentation, there are 24 servers (18 core servers and 6 file system servers) named as follows: [30]

Core servers

  • auth (authentication server): Receives requests and passwords from programs and gives them an ID, which changes the privileges of the program.
  • crash (crash server): Handles all fatal errors.
  • eieio (translation server): TODO
  • exec (execution server): Translates an executable image (currently ELF and a.out are supported) to a runnable image in memory.
  • fifo (FIFO translator): Implements named pipes.
  • new-fifo (new FIFO server): An alternate server for named pipes.
  • firmlink (the firmlink translator): Implements firmlinks ‒ "half-way between a symbolic link and a hard link". [31]
  • fwd (forward server): Forwards requests to other servers, used by fifo and symlink servers.
  • hostmux (host multiplexer server)
  • ifsock (server for sockets interface): Helps with UNIX domain socket addresses.
  • init (init server): Basic system booting and configuration.
  • magic (magic server): Signals that a name lookup must be resolved internally by a process when the result involves the process's state.
  • null (null server): Implements /dev/null and /dev/zero.
  • pfinet (pfinet server): Implements the PF_INET protocol family.
  • pflocal (pflocal server): Implements UNIX domain sockets.
  • proc (process server): Assigns PIDs and manages process-level actions.
  • symlink (symbolic link translator): Implements symbolic links for filesystems that do not support them.
  • term (terminal server): A POSIX terminal.
  • usermux (user multiplexer server): Invokes user-specific translators.

Filesystem servers

ext2fs
The ext2 filesystem translator. It receives disk blocks from the microkernel and gives files and directories to the applications.
isofs
The translator for the ISO 9660 filesystem. Translates blocks of a CD or DVD to files and directories for the applications.
nfs
See Network File System.
ftpfs
File transfer protocol filesystem translator.
storeio
The storage translator.

The servers collectively implement the POSIX API, with each server implementing a part of the interface. For instance, the various filesystem servers each implement the filesystem calls. The storage server will work as a wrapping layer, similar to the block layer of Linux. The equivalent of VFS of Linux is achieved by libdiskfs and libpager libraries.

GNU distributions running Hurd

Debian GNU/Hurd with Xfce Debian GNU HURD XFCE desktop screenshot.png
Debian GNU/Hurd with Xfce

Hurd-based GNU distributions include:

See also

Related Research Articles

<span class="mw-page-title-main">GNU</span> Free software collection

GNU is an extensive collection of free software, which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operating systems popularly known as Linux. Most of GNU is licensed under the GNU Project's own General Public License (GPL).

<span class="mw-page-title-main">Microkernel</span> Kernel that provides fewer services than a traditional kernel

In computer science, a microkernel is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, thread management, and inter-process communication (IPC).

Mach is a kernel developed at Carnegie Mellon University by Richard Rashid and Avie Tevanian to support operating system research, primarily distributed and parallel computing. Mach is often considered one of the earliest examples of a microkernel. However, not all versions of Mach are microkernels. Mach's derivatives are the basis of the operating system kernel in GNU Hurd and of Apple's XNU kernel used in macOS, iOS, iPadOS, tvOS, and watchOS.

Darwin is the core Unix operating system of macOS, iOS, watchOS, tvOS, iPadOS, visionOS, and bridgeOS. It previously existed as an independent open-source operating system, first released by Apple Inc. in 2000. It is composed of code derived from NeXTSTEP, FreeBSD, other BSD operating systems, Mach, and other free software projects' code, as well as code developed by Apple.

GNU Mach is an implementation of the Mach microkernel. It is the default microkernel in the GNU Hurd. GNU Mach runs on IA-32 machines. GNU Mach is maintained by developers on the GNU project. It is distributed under the terms of the GNU General Public License (GPL).

L4 is a family of second-generation microkernels, used to implement a variety of types of operating systems (OS), though mostly for Unix-like, Portable Operating System Interface (POSIX) compliant types.

<span class="mw-page-title-main">GNU Project</span> Free software project

The GNU Project is a free software, mass collaboration project announced by Richard Stallman on September 27, 1983. Its goal is to give computer users freedom and control in their use of their computers and computing devices by collaboratively developing and publishing software that gives everyone the rights to freely run the software, copy and distribute it, study it, and modify it. GNU software grants these rights in its license.

<span class="mw-page-title-main">GNU/Linux naming controversy</span> Issues of what to call a system with the GNU toolchain and the Linux kernel

Within the free software and the open-source software communities there is controversy over whether to refer to computer operating systems that use a combination of GNU software and the Linux kernel as "GNU/Linux" or "Linux" systems.

MkLinux is an open-source software computer operating system begun by the Open Software Foundation Research Institute and Apple Computer in February 1996, to port Linux to the PowerPC platform, and Macintosh computers. The name refers to the Linux kernel being adapted to run as a server hosted on the Mach microkernel, version 3.0.

Filesystem in Userspace (FUSE) is a software interface for Unix and Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a bridge to the actual kernel interfaces.

TRIX is a network-oriented research operating system developed in the late 1970s at MIT's Laboratory for Computer Science (LCS) by Professor Steve Ward and his research group. It ran on the NuMachine and had remote procedure call functionality built into its kernel, but was otherwise a Version 7 Unix workalike.

<span class="mw-page-title-main">Linux</span> Family of Unix-like operating systems

Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution (distro), which includes the kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses and recommends the name "GNU/Linux" to emphasize the use and importance of GNU software in many distributions, causing some controversy.

GNU variants are operating systems based upon the GNU operating system. According to the GNU project and others, these also include most operating systems using the Linux kernel and a few others using BSD-based kernels.

Linux began in 1991 as a personal project by Finnish student Linus Torvalds to create a new free operating system kernel. The resulting Linux kernel has been marked by constant growth throughout its history. Since the initial release of its source code in 1991, it has grown from a small number of C files under a license prohibiting commercial distribution to the 4.15 version in 2018 with more than 23.3 million lines of source code, not counting comments, under the GNU General Public License v2 with a syscall exception meaning anything that uses the kernel via system calls are not subject to the GNU GPL.

<span class="mw-page-title-main">Kernel (operating system)</span> Core of a computer operating system

The kernel is a computer program at the core of a computer's operating system and generally has complete control over everything in the system. The kernel is also responsible for preventing and mitigating conflicts between different processes. It is the portion of the operating system code that is always resident in memory and facilitates interactions between hardware and software components. A full kernel controls all hardware resources via device drivers, arbitrates conflicts between processes concerning such resources, and optimizes the utilization of common resources e.g. CPU & cache usage, file systems, and network sockets. On most systems, the kernel is one of the first programs loaded on startup. It handles the rest of startup as well as memory, peripherals, and input/output (I/O) requests from software, translating them into data-processing instructions for the central processing unit.

<span class="mw-page-title-main">Linux-libre</span> Version of the Linux kernel without proprietary code

According to the Free Software Foundation Latin America, Linux-libre is a modified version of the Linux kernel that contains no binary blobs, obfuscated code, or code released under proprietary licenses. In the Linux kernel, they are mostly used for proprietary firmware images. While generally redistributable, binary blobs do not give the user the freedom to audit, modify, or, consequently, redistribute their modified versions. The GNU Project keeps Linux-libre in synchronization with the mainline Linux kernel.

<span class="mw-page-title-main">GNU Guix</span> Purely functional package manager for the GNU system

GNU Guix is a functional cross-platform package manager and a tool to instantiate and manage Unix-like operating systems, based on the Nix package manager. Configuration and package recipes are written in Guile Scheme. GNU Guix is the default package manager of the GNU Guix System distribution.

<span class="mw-page-title-main">Rump kernel</span> Software run in userspace that offers kernel functionality

The NetBSD rump kernel is the first implementation of the "anykernel" concept where drivers either can be compiled into or run in the monolithic kernel or in user space on top of a light-weight kernel. The NetBSD drivers can be used on top of the rump kernel on a wide range of POSIX operating systems, such as the Hurd, Linux, NetBSD, DragonFly BSD, Solaris kernels and even Cygwin, along with the file system utilities built with the rump libraries. The rump kernels can also run without POSIX directly on top of the Xen hypervisor, an L4 microkernel using the Genode OS Framework or even on "OS-less" bare metal.

<span class="mw-page-title-main">Genode</span> Free and open-source software operating system

Genode is a free and open-source software operating system (OS) framework consisting of a microkernel abstraction layer and a set of user space components. The framework is notable as one of the few open-source operating systems not derived from a proprietary OS, such as Unix. The characteristic design philosophy is that a small trusted computing base is of primary concern in a security-oriented OS.

<span class="mw-page-title-main">GNU Guix System</span> Rolling release distribution of the GNU operating system built around the GNU Guix package manager

GNU Guix System or Guix System is a rolling release, free and open source Linux distribution built around the GNU Guix package manager. It enables a declarative operating system configuration and allows system upgrades which the user can rollback. It uses the GNU Shepherd init system and the Linux-libre kernel, with support of the GNU Hurd kernel under development. On February 3, 2015, the Free Software Foundation added the distribution to its list of endorsed free Linux distributions. The Guix package manager and the Guix System drew inspiration from and were based on the Nix package manager and NixOS respectively.

References

  1. "GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 released" . Retrieved 11 May 2018.
  2. "GNU Hurd ported to AArch64, and more Hurd news". osnews.com. Retrieved 22 April 2024.
  3. "COPYING - hurd/hurd.git - Hurd". Git.savannah.gnu.org. Retrieved 25 February 2019.
  4. 1 2 "What Is the GNU Hurd?". GNU . Retrieved 2010-03-04.
  5. 1 2 Tozzi, Christopher (2015-04-20). "30 Years On, HURD Lives: GNU Updates Open Source Unix Kernel". The VAR Guy. Archived from the original on 2015-04-24.
  6. "What is a Multiserver Microkernel?". GNU. 2013-04-13. Retrieved 2015-08-11.
  7. "advantages". GNU . Retrieved 2011-12-07.
  8. 1 2 Vervloesem, Koen (July 7, 2010). "The Hurd: GNU's quest for the perfect kernel". LWN.net . Retrieved October 5, 2012.
  9. "GNU Hurd: Origin of the Name". GNU . Retrieved 2010-03-04.
  10. Hillesley, Richard (June 30, 2010). "GNU HURD: Altered visions and lost promise" . Retrieved October 1, 2012.
  11. "Linux and the GNU Project". GNU . 2010-01-26. Retrieved 2010-03-04.
  12. 1 2 "The GNU Hurd History, 'How it Started'". GNU . Retrieved 2006-08-27.
  13. Salus, Peter. "The Daemon, the GNU and the Penguin" . Retrieved 2006-08-08.
  14. Ribeiro, John (2002-03-11). "Free Software Sees GNU Loose of Linux". PC World . Archived from the original on 2016-09-22. Retrieved 2012-10-05.
  15. "Status". GNU . Retrieved 2010-03-04.
  16. Stallman, Richard (2006-03-09). "The Free Software Movement and the Future of Freedom" (ogg). Free Software Foundation . Zagreb. This is the way, also, that people thought was the cleanest possible way to design kernels back in 1990. Well, it took many many many years to get this kernel to run at all, and it still doesn't run well, and it looks like there may be fundamental problems with this design, which nobody knew about back in 1990.
  17. Stallman, Richard (2010-07-29). "RMS AMA". Reddit . Retrieved 2011-12-07.
  18. "Free Software Foundation changes priorities - SD Times". SD Times. 2017-01-17. Retrieved 2017-04-17.
  19. Ragkousis, Manolis (August 20, 2015). "[GSoC update] Porting Guix to GNU/Hurd" (Mailing list). guix-devel. Retrieved August 20, 2015.
  20. Kousoulos, Constantine (2007-03-21). "Re: Device drivers in Mach?". bug-hurd (Mailing list).
  21. Doeppner, Thomas W. (20 December 2010). Operating Systems In Depth: Design and Programming. John Wiley & Sons. p. 160. ISBN   978-0-471-68723-8 . Retrieved 29 November 2012.
  22. Stallman, Richard (2000-10-12). "In Defense of Red Hat". Linux Today. Retrieved 2011-12-07. I take full responsibility for the technical decision to develop the GNU kernel based on Mach, a decision which seems to have been responsible for the slowness of the development. I thought using Mach would speed the work by saving us a large part of the job, but I was wrong.
  23. Shapiro, Jonathan S. (2005-10-27). "Re: A comment about changing kernels". l4-hurd (Mailing list).
  24. Bachmann, Tom (2006-07-07). "Re: seL4, L4.sec and coyotos mess". l4-hurd (Mailing list).
  25. "Porting the Hurd to another microkernel". GNU Hurd. Free Software Foundation. Retrieved 2017-05-06.
  26. Walfield, Neal H.; Brinkmann, Marcus (July 2007). "A Critique of the GNU Hurd Multi-server Operating System" (PDF). GNU . Retrieved 2011-12-07.
  27. Walfield, Neal H.; Brinkmann, Marcus (2007-01-04). "Improving Usability via Access Decomposition and Policy Refinement" (PDF). GNU . Retrieved 2011-12-07.
  28. "viengoos". GNU . Retrieved 2010-03-04.
  29. "What happened to the L4/Coyotos/viengoos micro-kernels?". GNU . Retrieved 2011-01-07.
  30. "Preliminary GNU/Hurd User Interface Description". Debian . 1996-10-10. Retrieved 2010-03-04.
  31. "GNU/Hurd - Documentation". Debian. 1996-10-10. Retrieved 2012-07-12.
  32. "GNU Hurd/ hurd/ running/ distrib". GNU. 2015-05-03. Retrieved 2017-09-21.
  33. "GNU Hurd/ hurd/ running/ live cd". GNU. 2013-04-09. Retrieved 2017-09-21.