GNU Hurd
GNU Hurd is a project within the GNU Project to replace the kernel of a completely free Unix-like operating system, GNU. It has been in development since 1990 and distributed under the GPL license.
Hurd tries to outperform Unixes in terms of functionality, security, and stability, while still remaining compatible with them. This is achieved because Hurd implements the POSIX specification ─among others─, but removes arbitrary restrictions on users.
Although the GNU Project often refers to Hurd as a kernel, strictly speaking this would not be correct, since a significant part of Hurd resides in userspace that interacts with a microkernel, GNU Mach. In fact, Hurd would be an operating system, as the Linux kernel is considered, and the extensive collection of GNU programs running on Hurd is called GNU/Hurd, as GNU/Linux is called for itself running on Linux.
Development history
Development of Hurd began in the year 1990. Although Richard Stallman, founder of the GNU project, had announced that he expected the official release of the GNU operating system (also known as GNU/Hurd) before the end of 2002, this was not the case. achieved, in part because the Linux kernel began to be used.
Origin of name
The word Hurd is a recursive acronym. Hurd is an acronym for "Hird of Unix-Replacing Daemons" (in Spanish: "Hird" of demons that replace Unix). In turn, the term "Hird" means "Hurd of Interfaces Representing Depth" ("Hurd" of interfaces that represent depth). Both "Hurd" and "Hird" in American English are pronounced as /hɜːrd/ "herd" (in Spanish: manada), so GNU Hurd could be translated as "herd of wildebeests", referring to its architecture of a set of servers running.
Architecture
Unlike most Unix-like kernels, Hurd sits on top of a microkernel (currently only Mach is supported, although there was a now-abandoned project to run Hurd on the second-generation L4 microkernel), responsible for facilitating the services of a more basic core: coordinating access to hardware (to the CPU —by means of multithreading—, to RAM —by means of memory management—, and to other sound, graphics, storage devices, etc.).
There are other Unix-like systems that run on top of the Mach microkernel, such as OSF/1, NEXTSTEP, Mac OS X, Lites, and MkLinux. They are all implemented as a single server. Thus, they replace the monolithic kernel of traditional Unix systems with two elements, the microkernel and the Unix server.
In contrast, Hurd consists of multiple servers running simultaneously. Instead of a single huge program that controls everything from the clock to network management, in Hurd each of these tasks is handled by a separate server. This makes (theoretically, at least) Hurd development much easier, as making changes on one server is less likely to have unwanted effects on other servers.
In the original Mach design one of the main goals was this kind of "server farm", but it appears that Hurd is the first to implement this design on top of a Mach microkernel (although QNX is similar, but based on their own micronucleus). It's not clear why there wasn't any multi-server implementation before, though it seems that the groups working on Mach were too busy on it to devote themselves to the OS in its entirety. Hurd also tries to be portable between microkernels.
Unix Extensions
In Hurd a good number of traditional Unix concepts are changed or strengthened:
Under Unix, every program that runs has an associated user identity, which usually corresponds to the user who started the process. This identity largely determines what actions the program is allowed to perform. No external process can change the identity of a running program. A Hurd process, on the other hand, runs associated with a set of user identities, which can contain multiple identities, one, or none. A process with sufficient privileges can add or remove identities from another process. For example, there is a password server that grants identities in response to a correct user password.
As far as the file system is concerned, a suitable program can be set as translator for a single file or an entire directory hierarchy. Each access to the translated file, or to the files in the hierarchy in the second case, are actually handled by this program. For example, a file translator can simply redirect read and write operations to another file, not as a Unix symbolic link. Unix mounting on Hurd is accomplished by setting a file system translator (using the settrans
command). Translators may also be used to provide services to the user. For example, the ftpfs translator allows a user to encapsulate a remote FTP site in a directory. With this, standard programs such as ls
, cp
or rm
can be used to manipulate files on the remote site. There are even more powerful translators, such as UnionFS, which allow a user to merge several directories into one, in such a way that listing this directory displays the contents of all unified directories (a feature absent from most Unices, though present). on FreeBSD).
Perhaps the most powerful feature of Hurd is the ability for any user to run their own system services. A user can assign any translator to the file system for her personal use. You can even replace system servers, such as the authentication server, with other servers of your choosing. All of this can be done without affecting other users, thanks to well-defined scopes of effect. In fact, it's even possible for a user to run the Hurd within itself, known as a sub-Hurd.
Server architecture
According to the Debian documentation they are:
- init: System startup procedures.
- auth: Authentication server. Exchange credentials when two servers try to communicate with each other.
- crash: Error management server. It is activated when a task receives an irrecoverable error signal, as a segmentation fault.
- exec: Executable charger. It generates the initial image of a process from its binary image on disk. Support ELF and a.out.
- fifo: Transducer FIFO translator, implents named pipes.
- new-fif: An alternative server for named pipes.
- null: implementa
/dev/null
and/dev/zero
. - pfinet: implements the IP protocol (version 4).
- pflocal: Implement the UNIX domain sockets.
- process: Assists process structures to tasks, including your PID, and manages your states.
- storeio: A translator for storage devices.
- symlink: Simulates symbolic links in file systems that do not support them.
- ifsock: Simula filesystem sockets in file systems that do not support them.
- firmlink: A firmlink it's an intermediate between a symbolic link and a hardlink.
- term: Implement a POSIX terminal.
- usermux: Attach a directory in which you can search for user names.
- hostmux: Directory to search hosts.
- fwd: Common entry point to search for any other server.
- magic: Directory to search for information of the caller process.
It also includes several filesystems:
- nfs: Implement the Network file system Sun.
- ftp: A server for ftp systems.
- ufs: UFS system of DVDs.
- isofs: Server for ISO file systems, such as CDs.
- ext2fs: Server for ext-2 file isthemes.
Between all of them implement the API Single Unix Specification which is a superset of POSIX. It's actually the libc
library that implements the POSIX API, just like on Linux, and Hurd gives a close but lower-level interface.
The way programs call Hurd is through the file system. They function as a special file system, similar to /proc
in linux. For example, if we want to talk to the auth server we will look in the directory where it is mounted (/servers/auth
) and make read/write
calls on it.
Somehow, therefore, the file system server interfaces to the API and also knows which of the other low-level servers to send calls to. At a low level, when you open one of these files, the program receives the various hardware devices that are compiled into the microkernel. So Hurd doesn't need to handle low-level interrupt handling itself; instead it does need to translate hardware signals to operating system signals.
Boot
You need a bootloader that follows the multiboot protocol like GRUB. Configuration is done using the following steps (or the bootloader is configured to do it automatically):
- The micronucleus is loaded in memory.
- A script is loaded for the micronucleus to start the Hurd. It can be started manually or as if it were a grub module (GRUB module command). Hurd comes with a script called serverboot to boot the complete hurd.
- Control is given to the micronucleus, which must be able to execute scripts.
With this, the microkernel will load the hurd's servers and pass control to them.
Distributions using Hurd
There are currently at least five GNU/Hurd distributions in the works (Debian GNU/Hurd, Gentoo, Arch Hurd, Bee, and A.T.L.D. GNU/Hurd), although none have released official versions.
Hurd NG
Attempts are being made to create a new version of the Hurd called NgHurd, this project began with an attempt to port the L4 microkernel to the Hurd which would have given it faster speed among other features. This project was abandoned, so the features for this new version from scratch are being discussed, including the microkernel to use.
Contenido relacionado
IBM PC DOS
Superheterodyne receiver
Mozilla Application Suite