-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintro.html
113 lines (100 loc) · 5.24 KB
/
intro.html
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<html>
<head>
<title>A Visual Expedition Inside the Linux File Systems - Introduction</title>
<meta name="author" content="Razvan Musaloiu-E." />
<meta name="keywords" content="file systems visual expedition filesystems" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="style.css" />
</head>
<body><div id="everything">
<h1>Introduction</h1>
<div style="text-align: center; margin-bottom: 3em;">
<em>I photograph to see what the world looks like in photographs.</em><br />
<div style="margin-left: 30em;">—Garry Winogrand (1928–1984)</div>
</div>
<p>Despite being a very important part of any operating system, file
systems tend to get little attention. Linux has three editions
for <em>Linux Device Drivers</em>, another three
for <em>Understanding the Linux Kernel</em> and two for <em>Linux
Kernel Development</em>. For the 2.4 networking stack there
is <em>Linux Networking Architecture</em> by Klaus Wehrle et al. and
for the memory subsystem there is <em>Understanding the Linux
Virtual Memory Manager</em> by Mel Gorman. The aptly named <em>UNIX
Filesystems: Evolution, Design, and Implementation</em> is only
giving a general overview of how things work. <em>Practical File
System Design with the Be File System</em> by Dominic Giampaolo is
an an enjoyable read but, as the name indicates, it only deals with
BeFS. The same is also true for HFS+ in the very thick but also
very interested <em>Mac OS X Internals: A Systems Approach</em> by
Amit Singh. I really hope that someday somebody will spend some time
and put together a nice book or website in which file systems, new
and old, are presented and analyzed in detail.</p>
<p>As the disclaimer from the front page says, I don't know as much as
I want about file systems. I'm making progress in learning about
them in the traditional way of playing and understanding the
existing code. What I'm attempting in this project is to complement
this by a visual approach in which the main purpose is to try to
graphically depict some the ways the things go. The main observable
thing I'm using is the external symbols used by kernel
modules. There are two main reasons for doing this. First, many
operating systems build their file systems as kernel modules. This
is useful because it separates the part we are interested in from
the rest of kernel. And second, because the modules need to be
loaded dynamically, the functions they call and data they access
from the kernel show up as external (unresolved) symbols in their
binaries. These can be easily extracted using <em>nm</em>. One
drawback of this approach is represented by the chains of calls like
the ones in the figure from below. Luckily, in the Linux kernel many
functions are explicitly marked as inline so this case might not
occur so frequently. I haven't check explicitly for this yet to but
it is something I would like to do.</p>
<div class="figure">
<div class="caption">
<a name="calls" id="calls"><span class="sans"><b>Chain of calls problem.</b></span></a>
<em>Module 1</em> and <em>Module 2</em> are two kernel modules
and <em>f1</em> and <em>f2</em> are two functions exported by the
kernel. Even <em>f1</em> are two <em>f2</em> different calls
they are in fact closely related to each other. This is not
captured by the relations between the modules and the kernel and
can only be detected by also looking the way things happen inside
the kernel.
</div>
<img src="kernel-modules.png" />
</div>
<p>That being said, here is a quick overview of the next sections. The
following two are the big ones. <a href="tux3.html">The first</a> is
a detail analysis of one particular Linux Kernel tree
and <a href="2.6.x.html">the second</a> is a shorter one done over a
large number of file systems from Linux Kernel 2.6.0 to
2.6.29. After that there is <a href="bsd.html">a small section</a>
that shows some aspects of the BSD
family. After <a href="conclusions.html">conclusions</a> there is an
appendix consisting of three things:
the <a href="building.html">first</a> one explains how the file
systems for Linux were compiled,
the <a href="timelines.html">second</a> one shows timelines for the
releases of Linux Kernel, FreeBSD, NetBSD and
OpenBSD; the <a href="map.html">last</a> is a detailed map of the
external symbols of the kernel modules analyzed in the second
section.
</p>
<p>On more thing. The figures are accompanied by captions which describe
the plot and note some of the interesting things that are going on
there. If you find any mistake please
let <a href="mailto:[email protected]">me</a> know and I'll try to
fix it.
</p>
<p>Happy reading/viewing!</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-319751-2");
pageTracker._trackPageview();
} catch(err) {}</script>
<script src="http://razvan.musaloiu.com/software/utracker/utracker.js" type="text/javascript"></script>
</body>
</html>