> > If i wish to start study the source code of Hurd from where i have to start?
> > Any advice will be very useful.
> Get hurd from cvs and look at hurd-cvs-root/doc/navigating.
You'd also wish to get the glibc sources as well, and look at the
way, how Unix syscalls are implemented on top of hurd. Look at
Generally, I'd suggest the following path to understand the Hurd sources:
1. Learn as much as you can about Mach, e.g. from the OSF documents.
You need to know about at least:
* tasks, threads, ports and port rights, vm
* using mig for generating RPC stubs
You don't need to know anything specific on gnumach; a general
introduction to any variant of Mach (>= 3.0) would suffice.
2. Understand the Hurd's interfaces, w.r.t. the Hurd servers.
The mig source files are very useful:
Start with 'auth' and 'proc'.
3. Look at the way, how init starts the core servers. The following
file contains good examples of both Mach usage and calls to
often used Hurd functions.
4. The Hurd uses port buckets extensively. Such buckets are there
for holding port-rights (among others). You should start by
reading the libports section in
and of course the very well commented header file:
5. Understand how simple translators are written by learning
about libtrivfs, documented in
Then look at usermux/hostmux
6. More complex translators are implemented with libnetfs or libdiskfs:
Examples for using libnetfs are the nfs translator
Examples for libdiskfs are (of course)
7. Read more about the Unix emulation library (the familiar Unix
system calls) in the glibc sources (see above):
Try to trace regular Unix syscalls. E.g. try to understand what
happens inside an open(2), write(2), ... as well as inside
fork(2), exec[ve](2), ... by looking at the sources of the
[ Especially if you want to understand fork(), you'll need to
look at the 'proc', 'auth' and 'exec' servers and their
interfaces (*.defs), and also understand how 'proc' can be
accessed though libps $(HURD_SRC)/libps/ps.h ]
8. If you think that you've mastered all of the previous points,
you can try to grok the store concept by carefully examining
You may with to browse the sources of gnumach, glibc and the Hurd
with some suitable tools. Emacs with etags, vi with ctags are
your friends. Very comfortable are global(1) and friends: Just
unpack/fetch gnumach, glibc and hurd sources in the same top-level
then cd $(TOP_LEVEL), call gtags, call htags -fhvat 'a title'
and browse HTMLized sources at will.
Farid Hajji -- Unix Systems and Network Admin | Phone: +49-2131-67-555
Broicherdorfstr. 83, D-41564 Kaarst, Germany | email@example.com
- - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -
Murphy's Law fails only when you try to demonstrate it, and thus succeeds.
- From: "Petros Sidiropoulos" <firstname.lastname@example.org>
- Re: learning
- From: Neal H Walfield <email@example.com>