summaryrefslogtreecommitdiff
path: root/community/gsoc/project_ideas/gnumach_cleanup.mdwn
blob: 11b4889f8fccda5b0a6c60bca7506f2f41903eaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[[!meta copyright="Copyright © 2008, 2009, 2013 Free Software Foundation,
Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!meta title="GNU Mach Code Cleanup"]]

Although there are some attempts to move to a more modern microkernel
altogether, the current Hurd implementation is based on
[[GNU_Mach|microkernel/mach/gnumach]], which is only a slightly modified
variant of the original CMU [[microkernel/Mach]].

Unfortunately, Mach was created about two decades ago, and is in turn based on
even older BSD code.  Parts of the BSD kernel -- file systems, [[UNIX]] [[mechanism]]s
like processes and signals, etc. -- were ripped out (to be implemented in
[[userspace_servers|hurd/translator]] instead); while other mechanisms were
added to allow implementing stuff in user space.
([[Pager_interface|microkernel/mach/external_pager_mechanism]],
[[microkernel/mach/IPC]], etc.)

Also, Mach being a research project, many things were tried, adding lots of
optional features not really needed.

The result of all this is that the current code base is in a pretty bad shape.
It's rather hard to make modifications -- to make better use of modern hardware
for example, or even to fix bugs.  The goal of this project is to improve the
situation.

There are various things you can do here: Fixing compiler warnings; removing
dead or unneeded code paths; restructuring code for readability and
maintainability etc. -- a glance at the source code should quickly give you
some ideas.

This task requires good knowledge of C, and experience with working on a large
existing code base.  Previous kernel hacking experience is an advantage, but
not really necessary.

Possible mentors: Samuel Thibault (youpi)

Exercise: You should have no trouble finding something to improve when looking
at the gnumach code, or even just at compiler warnings, for instance "implicit
declaration of function", "format ‘%lu’ expects argument of type..." are
easy to start with.