Added functions to move memory to and from user space.
[cascardo/kernel/old_slides/.git] / 00.intro / 00.intro.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE slides SYSTEM "/usr/share/xml/docbook/custom/slides/3.3.1/schema/dtd/slides-full.dtd">
3
4 <slides>
5
6 <slidesinfo>
7 <title>Linux Device Drivers</title>
8 <author><firstname>Thadeu</firstname><surname>Cascardo</surname></author>
9 </slidesinfo>
10
11 <foil>
12 <title>Introduction</title>
13 <itemizedlist>
14 <listitem>
15 Linux - A POSIX modern operating system released under the GPLv2
16 </listitem>
17 <listitem>
18 Device - A piece of hardware plugged into a system
19 </listitem>
20 <listitem>
21 Drivers - Software modules that are plugged into a system
22 </listitem>
23 </itemizedlist>
24 </foil>
25
26 <foil>
27 <title>Linux</title>
28 <para>
29 Linux is a POSIX-compatible modern operating system developed since 1991,
30 released under the GPLv2, with contributions by thousands of people. It is
31 mostly written in C, with some assembly code.
32 </para>
33 <para>
34 It has grown from a non-portable Intel 386 code with thousands lines to a
35 portable code with support for dozens of architectures and hundreds machines and
36 millions of code.
37 </para>
38 </foil>
39
40 <foil>
41 <title>Linux evolution</title>
42 <para>
43 Since version 1.2, it has supported more than only Intel x86 architectures,
44 including now SPARC, PowerPC, ARM, Alpha, M68K, MIPS, S/390, and many others.
45 </para>
46 <para>
47 Since version 2.0, it has supported SMP systems, now running in systems with
48 hundreds of processors, multi-core processors, etc. Since then, its SMP support
49 has put to scale, with most bottlenecks removed.
50 </para>
51 </foil>
52
53 <!--
54 <foil>
55 <intro>Linux evolution</title>
56 <para>
57 TODO: introduce a graphic with the number of lines of code.
58 </para>
59 </foil>
60 -->
61
62 <foil>
63 <title>Linux evolution</title>
64 <para>
65 Linux source code and interfaces have changed a lot in all these years. Some
66 programs require the sysfs interface, for example. Some drivers may require new
67 interfaces and not build on old linux versions. They may also use obsolete or
68 replaced unexisting interfaces and not build on new linux versions.
69 </para>
70 <para>
71 Better practice is to release the driver under GPLv2 or other compatible
72 license and send it to mainline. And maintain it even after it's there.
73 </para>
74 </foil>
75
76 <foil>
77 <title>Linux versioning</title>
78 <para>
79 Another presentation.
80 </para>
81 </foil>
82
83 <foil>
84 <title>Outdated book</title>
85 <para>
86 Since Linux is in constant change, the book is already outdated. It's almost
87 five years old.
88 </para>
89 <para>
90 One example of outdated interface is the workqueue, whose updated functions we
91 will see later.
92 </para>
93 </foil>
94
95 <foil>
96 <title>Modules</title>
97 <para>
98 Linux is modular. Its modules may be inserted and removed at will, making it
99 very flexible. Modules may be device drivers and may work as many other
100 funciotns as well, like filesystems, network protocols, power management
101 policies, etc.
102 </para>
103 </foil>
104
105 <foil>
106 <title>Linux Code Structure</title>
107 <para>
108 Show Linux Code Layout.
109 </para>
110 </foil>
111
112 <foil>
113 <title>Mechanism and Policy</title>
114 <para>
115 Drivers should provide mechanism. As in many other cases, splitting mechanism
116 and policy is desirable. In the case of kernel code, this is no exception.
117 Kernel space code and user space code are good split points to provide that
118 separation.
119 </para>
120 </foil>
121
122 <foil>
123 <title>Recommendations</title>
124 <itemizedlist>
125 <listitem>
126 Check every possible error.
127 </listitem>
128 <listitem>
129 Do not trust received data nor do send unzeroed data.
130 </listitem>
131 <listitem>
132 Use a machine you can spare.
133 </listitem>
134 </itemizedlist>
135 </foil>
136
137 <foil>
138 <title>Operating Systems</title>
139 <itemizedlist>
140 <listitem>
141 <emphasis>Process</emphasis>Management
142 </listitem>
143 <listitem>
144 <emphasis>Memory</emphasis>Management
145 </listitem>
146 <listitem>
147 Input/Output/Hardware Management
148 </listitem>
149 <listitem>
150 Filesystems
151 </listitem>
152 <listitem>
153 Network
154 </listitem>
155 </itemizedlist>
156 </foil>
157
158 </slides>