This file is indexed.

/usr/share/doc/HOWTO/ja-html/The-Linux-Kernel-13.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>The Linux Kernel: ¥â¥¸¥å¡¼¥ë</TITLE>
 <LINK HREF="The-Linux-Kernel-14.html" REL=next>
 <LINK HREF="The-Linux-Kernel-12.html" REL=previous>
 <LINK HREF="The-Linux-Kernel.html#toc13" REL=contents>
</HEAD>
<BODY>
<A HREF="The-Linux-Kernel-14.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="The-Linux-Kernel-12.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="The-Linux-Kernel.html#toc13">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="chapter_m"></A> <A NAME="s13">13. ¥â¥¸¥å¡¼¥ë</A></H2>

<P>
<FIGURE>
<PH VSPACE="1">
<IMG SRC="./The-Linux-Kernel-images/penguin2.gif">
</FIGURE>
<P>
<P>¤³¤Î¾Ï¤Ç¤Ï¡¢Linux ¥«¡¼¥Í¥ë¤¬¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ê¤É¤Îµ¡Ç½¤ò¡¢É¬Íפʻþ¤À¤±
ưŪ¤Ë¥í¡¼¥É¤¹¤ë»ÅÁȤߤˤĤ¤¤ÆÀâÌÀ¤¹¤ë¡£
<P>
<P>Linux ¤Ï¡¢¥â¥Î¥ê¥·¥Ã¥¯¤Ê¥«¡¼¥Í¥ë(monolithic kernel)¤ò»ÈÍѤ·¤Æ¤¤¤ë¡£¤¹¤Ê¤ï
¤Á¤½¤ì¤Ï¡¢Ã±°ì¤ÇµðÂç¤Ê¥×¥í¥°¥é¥à¤Ç¤¢¤ê¡¢¤½¤³¤Ç¤Ï¡¢¥«¡¼¥Í¥ë¤Î¤¢¤é¤æ¤ëµ¡Ç½ÊÌ
¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¡¢¤¹¤Ù¤Æ¤ÎÆâÉô¥Ç¡¼¥¿¹½Â¤¤ä¥ë¡¼¥Á¥ó¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤ë¡£
¤½¤ì¤È¤ÏÈ¿ÂФλÅÁȤߤȤ·¤Æ¡¢¥Þ¥¤¥¯¥í¥«¡¼¥Í¥ë(micro-kernel)¹½Â¤¤¬¤¢¤ë¡£¤½¤Î
¾ì¹ç¡¢¥«¡¼¥Í¥ë¤Îµ¡Ç½ÊÌÉôʬ¤Ï¡¢¸ÄÊ̤Υæ¥Ë¥Ã¥È¤Ëʬ³ä¤µ¤ì¡¢¥æ¥Ë¥Ã¥È´Ö¤Ç¤Î¸·³Ê¤Ê
ÄÌ¿®¥á¥«¥Ë¥º¥à¤¬ÀßÄꤵ¤ì¤ë¡£¥â¥Î¥ê¥·¥Ã¥¯¥«¡¼¥Í¥ë¤Ç¤Ï¡¢¿·µ¬¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ò
¥«¡¼¥Í¥ë¤ËÄɲ乤ë¤Ë¤Ï¡¢¤½¤ÎÀßÄê¥×¥í¥»¥¹¤ò·Ðͳ¤¹¤ë¤Î¤Ç¡¢¤ä¤ä»þ´Ö¤¬¤«¤«
¤ë¡£¤¿¤È¤¨¤Ð¡¢NCR 810 SCSI ¤Î SCSI ¥É¥é¥¤¥Ð¤ò»È¤¤¤¿¤¤¤Î¤À¤¬¡¢¤Þ¤À¤½¤ì¤ò¥«¡¼¥Í¥ë
¤ËÁȤ߹þ¤ó¤Ç¤¤¤Ê¤¤¤È¤¹¤ë¡£¤½¤ÎºÝ¤Ï¡¢¿·¤·¤¤¥«¡¼¥Í¥ë¤òÀßÄꤷ¡¢¥Ó¥ë¥É¤¹¤ë¤³¤È¤Ç¡¢
¤Ï¤¸¤á¤Æ NCR 810 ¤¬»ÈÍѤǤ­¤ë¤è¤¦¤Ë¤Ê¤ë¡£
¤·¤«¤·¡¢°ã¤¦ÁªÂò»è¤â¸ºß¤¹¤ë¡£Linux ¤Ç¤Ï¡¢É¬Íפ˱þ¤¸¤Æ¡¢¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°
¥·¥¹¥Æ¥à¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤òưŪ¤Ë¥í¡¼¥É¤·¤¿¤ê¡¢¥¢¥ó¥í¡¼¥É¤·¤¿¤ê¤Ç¤­¤ë¡£
Linux ¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë(module)¤È¤Ï¡¢¥·¥¹¥Æ¥àµ¯Æ°¸å¤Ê¤é¤¤¤Ä¤Ç¤âưŪ¤Ë¥«¡¼¥Í¥ë
¤Ë¥ê¥ó¥¯¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¥³¡¼¥É·²¤Ç¤¢¤ë¡£¤½¤ì¤é¤Ï¡¢É¬Íפ¬¤Ê¤¯¤Ê¤ì¤Ð¥«¡¼¥Í¥ë¤È¤Î
¥ê¥ó¥¯¤ò²ò¾Ã¤·¤Æºï½ü¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ÂçÉôʬ¤Î Linux ¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Ï¡¢
¥Ç¥Ð¥¤¥¹¥É¥é¥¤¥Ð¤ä¡¢¥Í¥Ã¥È¥ï¡¼¥¯¥É¥é¥¤¥Ð¤Ê¤É¤Î²¾Áۥɥ饤¥Ð¡¢¤¢¤ë¤¤¤Ï¥Õ¥¡¥¤¥ë
¥·¥¹¥Æ¥à¤Ê¤É¤Ç¤¢¤ë¡£
<P>
<P>Linux ¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Ï¡¢<CODE>insmod</CODE> ¤ä <CODE>rmmod</CODE> ¥³¥Þ¥ó¥É¤ò
»ÈÍѤ·¤Æ¡¢ÌÀ¼¨Åª¤Ë¥í¡¼¥É¤È¥¢¥ó¥í¡¼¥É¤¬²Äǽ¤Ç¤¢¤ë¡£¤Þ¤¿¡¢¥«¡¼¥Í¥ë¼«¿È¤â¡¢
¥«¡¼¥Í¥ë¥Ç¡¼¥â¥ó(<CODE>kerneld</CODE>)¤Ë¤è¤Ã¤Æ¡¢¥â¥¸¥å¡¼¥ë¤Î¥í¡¼¥É¤È¥¢¥ó¥í¡¼¥É¤ò
ɬÍפ˱þ¤¸¤Æ¹Ô¤¦¤³¤È¤¬¤Ç¤­¤ë¡£É¬ÍפʤȤ­¤ËưŪ¤Ë¥í¡¼¥É¤Ç¤­¤ë¥³¡¼¥É¤È¤¤¤¦¤Î¤Ï¡¢
¥«¡¼¥Í¥ë¤Î¥µ¥¤¥º¤òºÇ¾®¤ËÍÞ¤¨¡¢¤½¤ì¤Ë½ÀÆðÀ­¤òÍ¿¤¨¤ë¤È¤¤¤¦°ÕÌ£¤ÇÈó¾ï¤ËÌ¥ÎÏŪ¤Ê
µ¡Ç½¤Ç¤¢¤ë¡£¤ï¤¿¤·¤Î¸½ºß¤Î Intel ¥«¡¼¥Í¥ë¤Ï¥â¥¸¥å¡¼¥ë¤ò¹­ÈϤ˻ȤäƤ¤¤ë¤Î¤Ç¡¢
406 K ¥Ð¥¤¥È¤ÇºÑ¤ó¤Ç¤¤¤ë¡£VFAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ï¤¿¤Þ¤Ë¤·¤«»È¤ï¤Ê¤¤¤¿¤á¡¢
VFAT ¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤¬¥Þ¥¦¥ó¥È¤µ¤ì¤¿»þ¤Ë¼«Æ°Åª¤Ë VFAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¥í¡¼¥É
¤µ¤ì¤ë¤è¤¦¤Ë¡¢¤ï¤¿¤·¤Î¥«¡¼¥Í¥ë¤Ï¥Ó¥ë¥É¤µ¤ì¤Æ¤¤¤ë¡£VFAT ¥Ñ¡¼¥Æ¥£¥·¥ç¥ó¤ò¥¢¥ó¥Þ¥¦
¥ó¥È¤·¤¿¤È¤­¡¢¥·¥¹¥Æ¥à¤Ï¤ï¤¿¤·¤¬¤â¤Ï¤ä VFAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¥â¥¸¥å¡¼¥ë¤òɬÍפÈ
¤·¤Æ¤¤¤Ê¤¤¤³¤È¤ò¸¡½Ð¤·¤Æ¡¢¥·¥¹¥Æ¥à¤«¤é¤½¤ì¤òºï½ü¤¹¤ë¡£¿·¤·¤¤¥«¡¼¥Í¥ë¥³¡¼¥É¤ò
»î¤¹¤È¤­¤Ç¤â¡¢»î¹Ô¤Î¤¿¤Ó¤Ë¥«¡¼¥Í¥ë¤ò¥ê¥Ó¥ë¥É¤·¤ÆºÆµ¯Æ°¤ò¤«¤±¤ëɬÍפ¬¤Ê¤¤¤Î¤Ç¡¢
¤½¤ÎÅÀ¤Ç¤â¥â¥¸¥å¡¼¥ë¤ÏÊØÍø¤Ç¤¢¤ë¡£¤·¤«¤·¡¢¤½¤Î¸«ÊÖ¤ê¤È¤·¤Æ¡¢¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë
¤ò»È¤¦¤È¼ã´³¤Î¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤ÎÄã²¼¤È¥á¥â¥ê¤Î¾ÃÈñ¤¬µ¯¤³¤ë¡£¥í¡¼¥À¥Ö¥ë¥â¥¸¥å¡¼¥ë
¤Ë¤¹¤ë¤¿¤á¤ËÄ󶡤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¥³¡¼¥É¤¬¾¯Î̤¢¤ê¡¢¤½¤Î¥³¡¼¥É¤ÈÉÕ²ÃŪ¤Ê¥Ç¡¼¥¿
¹½Â¤¤È¤¬²Ã¤ï¤ë¤¿¤á¤Ë¡¢¥á¥â¥ê¤Î¾ÃÈñÎ̤¬¤ä¤äÁý²Ã¤¹¤ë¡£¤Þ¤¿¡¢¤¢¤ë¥ì¥Ù¥ë¤Ç
´ÖÀܽèÍý¤¬Æ³Æþ¤µ¤ì¤ë¤Î¤Ç¡¢¥â¥¸¥å¡¼¥ë¤Î¾ì¹ç¡¢¥«¡¼¥Í¥ë¥ê¥½¡¼¥¹¤Ø¤Î¥¢¥¯¥»¥¹¤¬
¤ä¤äÈó¸úΨ¤Ë¤Ê¤ë¡£
<P>
<P>Linux ¥â¥¸¥å¡¼¥ë¤Ï¡¢¤¤¤Ã¤¿¤ó¥í¡¼¥É¤µ¤ì¤ë¤È¡¢Ä̾ï¤Î¥«¡¼¥Í¥ë¥³¡¼¥É¤ÈƱÍͤË
¥«¡¼¥Í¥ë¤Î°ìÉô¤È¤Ê¤ë¡£¤¹¤Ê¤ï¤Á¡¢Â¾¤Î¥«¡¼¥Í¥ë¥³¡¼¥É¤ÈƱ°ì¤Î¸¢Íø¤ÈÀÕǤ¤ò»ý¤Ä¡£
¸À¤¤´¹¤¨¤ë¤È¡¢Linux ¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Ï¡¢¤¹¤Ù¤Æ¤Î¥«¡¼¥Í¥ë¥³¡¼¥É¤ä¥Ç¥Ð¥¤¥¹
¥É¥é¥¤¥Ð¤ÈƱÍͤˡ¢¥«¡¼¥Í¥ë¤ò¥¯¥é¥Ã¥·¥å¤µ¤»¤ë¤³¤È¤â¤Ç¤­¤ë¡£
<P>
<P>¥â¥¸¥å¡¼¥ë¤¬É¬Íפʥ«¡¼¥Í¥ë¥ê¥½¡¼¥¹¤ò»ÈÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¢¤Þ¤º¤½¤ì¤é¤Î¥ê¥½¡¼¥¹¤ò
¸«¤Ä¤±¤À¤¹É¬Íפ¬¤¢¤ë¡£¤¿¤È¤¨¤Ð¡¢¥â¥¸¥å¡¼¥ë¤¬ <CODE>kmalloc()</CODE> ¤ä¥«¡¼¥Í¥ë¥á¥â
¥ê³ä¤êÅö¤Æ¥ë¡¼¥Á¥ó¤ò¸Æ¤Ó½Ð¤¹É¬Íפ¬¤¢¤ë¾ì¹ç¤Ê¤É¤ò¹Í¤¨¤Æ¤Û¤·¤¤¡£¥Ó¥ë¥É¤µ¤ì¤¿»þÅÀ
¤Ç¤Ï¡¢¥â¥¸¥å¡¼¥ë¤Ï¡¢¥á¥â¥êÆâ¤Î¤É¤³¤Ë <CODE>kmalloc()</CODE> ¤¬¤¢¤ë¤Î¤«¤òÃΤé¤Ê¤¤¡£
¤·¤¿¤¬¤Ã¤Æ¡¢¥â¥¸¥å¡¼¥ë¤¬¥í¡¼¥É¤µ¤ì¤¿¤È¤­¡¢¥«¡¼¥Í¥ë¤Ï¡¢¥â¥¸¥å¡¼¥ë¤¬Æ°¤­½Ð¤¹Á°
¤Ë¡¢¥â¥¸¥å¡¼¥ëÆâ¤Î <CODE>kmalloc()</CODE> ¤Ø¤Î»²¾È¤ò¤¹¤Ù¤Æ²ò·è¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
¥«¡¼¥Í¥ë¤Ï¡¢¥«¡¼¥Í¥ë¤Î¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ëÆâ¤Ë¥«¡¼¥Í¥ë¥ê¥½¡¼¥¹¤Î¤¹¤Ù¤Æ¤Î¥ê¥¹¥È¤òÊÝ
»ý¤·¤Æ¤¤¤ë¤Î¤Ç¡¢¥â¥¸¥å¡¼¥ë¤Î¥í¡¼¥É»þ¤Ë¡¢¥â¥¸¥å¡¼¥ë¤«¤é¤Î¤½¤¦¤·¤¿¥ê¥½¡¼¥¹¤Ø¤Î»²
¾È¤ò²ò·è¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
Linux ¤Ç¤Ï¡¢¥â¥¸¥å¡¼¥ë¤ò¥¹¥¿¥Ã¥¯²½¤Ç¤­¤ë¡£¤¹¤Ê¤ï¤Á¡¢¤¢¤ë¥â¥¸¥å¡¼¥ë¤Ï¡¢Â¾¤Î
¥â¥¸¥å¡¼¥ë¤Î¥µ¡¼¥Ó¥¹¤òÁ°Äó¤È¤·¡¢¤½¤Î¥µ¡¼¥Ó¥¹¤òÍøÍѤǤ­¤ë¡£¤¿¤È¤¨¤Ð¡¢VFAT ¥Õ¥¡¥¤
¥ë¥·¥¹¥Æ¥à¥â¥¸¥å¡¼¥ë¤Ï¡¢FAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î¥â¥¸¥å¡¼¥ë¤Î¥µ¡¼¥Ó¥¹¤òɬÍפȤ¹
¤ë¡£VFAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ï¡¢Â¿¤«¤ì¾¯¤Ê¤«¤ì FAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î³ÈÄ¥¤Ç¤¢¤ë¤«
¤é¤Ç¤¢¤ë¡£Â¾¤Î¥â¥¸¥å¡¼¥ë¤Î¥µ¡¼¥Ó¥¹¤ä¥ê¥½¡¼¥¹¤òɬÍפȤ¹¤ë¥â¥¸¥å¡¼¥ë¤È¤¤¤¦¤Î¤Ï¡¢
¥â¥¸¥å¡¼¥ë¤¬¥«¡¼¥Í¥ë¤½¤Î¤â¤Î¤Î¥µ¡¼¥Ó¥¹¤ä¥ê¥½¡¼¥¹¤òɬÍפȤ¹¤ë¾õ¶·¤ÈÈó¾ï¤ËÎà»÷
¤·¤Æ¤¤¤ë¡£É¬ÍפȤ¹¤ë¥µ¡¼¥Ó¥¹¤¬¡¢Àè¤Ë¥í¡¼¥É¤µ¤ì¤¿Â¾¤Î¥â¥¸¥å¡¼¥ë¤ÎÃæ¤À¤±¤Ë
¤¢¤ë¤«¤é¤Ç¤¢¤ë¡£¸Ä¡¹¤Î¥â¥¸¥å¡¼¥ë¤¬¥í¡¼¥É¤µ¤ì¤ë¤È¡¢¥«¡¼¥Í¥ë¤Ï¡¢¥«¡¼¥Í¥ë¥·¥ó¥Ü¥ë
¥Æ¡¼¥Ö¥ë¤òÊѹ¹¤·¤Æ¡¢¿·¤·¤¯¥í¡¼¥É¤µ¤ì¤¿¥â¥¸¥å¡¼¥ë¤¬¥¨¥¯¥¹¥Ý¡¼¥È¤·¤¿¥ê¥½¡¼¥¹¤ä
¥·¥ó¥Ü¥ë¤Î¤¹¤Ù¤Æ¤ò¤½¤³¤ËÉÕ¤±²Ã¤¨¤ë¡£¤³¤ì¤¬°ÕÌ£¤¹¤ë¤Î¤Ï¡¢¼¡¤Î¥â¥¸¥å¡¼¥ë¤¬¥í¡¼¥É
¤µ¤ì¤¿¤È¤­¡¢¤½¤Î¥â¥¸¥å¡¼¥ë¤Ï´û¤Ë¥í¡¼¥É¤µ¤ì¤Æ¤¤¤ë¥â¥¸¥å¡¼¥ë¤Î¥µ¡¼¥Ó¥¹¤Ë¥¢¥¯¥»¥¹
½ÐÍè¤ë¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£
<P>
<P>¥â¥¸¥å¡¼¥ë¤ò¥¢¥ó¥í¡¼¥É¤·¤è¤¦¤È¤¹¤ë¤È¤­¡¢¥«¡¼¥Í¥ë¤Ï¤½¤Î¥â¥¸¥å¡¼¥ë¤¬»ÈÍѤµ¤ì¤Æ
¤¤¤Ê¤¤¤³¤È¤òÃΤëɬÍפ¬¤¢¤ê¡¢¥â¥¸¥å¡¼¥ë¤Ë¤³¤ì¤«¤é¥¢¥ó¥í¡¼¥É¤µ¤ì¤ë¤³¤È¤òÃΤ餻¤ë
ÊýË¡¤ò¤âɬÍפȤ¹¤ë¡£¤½¤·¤Æ¡¢¤½¤ÎÊýË¡¤Ë¤è¤Ã¤Æ¡¢¥â¥¸¥å¡¼¥ë¤Ï¡¢¥«¡¼¥Í¥ë¤«¤éºï½ü
¤µ¤ì¤ëÁ°¤Ë¡¢¥«¡¼¥Í¥ë¥á¥â¥ê¤ä³ä¤ê¹þ¤ß¤Ê¤É¤Î³ä¤êÅö¤Æ¤é¤ì¤¿¥·¥¹¥Æ¥à¥ê¥½¡¼¥¹¤ò
²òÊü¤¹¤ë¤³¤È¤¬½ÐÍè¤ë¡£¥â¥¸¥å¡¼¥ë¤¬¥¢¥ó¥í¡¼¥É¤µ¤ì¤ë¤È¤­¡¢¥«¡¼¥Í¥ë¤Ï¡¢¤½¤Î
¥â¥¸¥å¡¼¥ë¤¬¥«¡¼¥Í¥ë¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤Ë¥¨¥¯¥¹¥Ý¡¼¥È¤·¤¿¤¹¤Ù¤Æ¤Î¥·¥ó¥Ü¥ë¤ò
ºï½ü¤¹¤ë¡£
<P>
<P>ŬÀڤ˽ñ¤«¤ì¤Ê¤«¤Ã¤¿¤¿¤á¤Ë¡¢¥í¡¼¥É¤µ¤ì¤¿¥â¥¸¥å¡¼¥ë¤Ï¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à
¤ò¥¯¥é¥Ã¥·¥å¤µ¤»¤ë¤³¤È¤¬½ÐÍè¤ë¤È¤¤¤¦¤³¤È¤Î¾¤Ë¤â¡¢¥â¥¸¥å¡¼¥ë¤Î»ÈÍѤÏÊÌ¤Î´í¸±¤â
¤â¤¿¤é¤¹¡£¸½ºß»ÈÍѤ·¤Æ¤¤¤ë¥«¡¼¥Í¥ë¤è¤ê¤â¡¢¸Å¤¤¤«¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤Î¥«¡¼¥Í¥ëÍѤË
¥Ó¥ë¥É¤µ¤ì¤¿¥â¥¸¥å¡¼¥ë¤ò¥í¡¼¥É¤·¤¿¾ì¹ç¡¢²¿¤¬µ¯¤³¤ë¤À¤í¤¦¤«¡©¤³¤ì¤¬ÌäÂê¤ò
µ¯¤³¤¹¤Î¤Ï¡¢¤¿¤È¤¨¤Ð¥â¥¸¥å¡¼¥ë¤¬¥«¡¼¥Í¥ë¥ë¡¼¥Á¥ó¤ò¥³¡¼¥ë¤·¤Æ¡¢¸í¤Ã¤¿°ú¿ô¤òÅϤ·
¤¿¾ì¹ç¤Ç¤¢¤ë¡£¥«¡¼¥Í¥ë¤Ï¡¢¥ª¥×¥·¥ç¥ó¤È¤·¤Æ¤Ç¤Ï¤¢¤ë¤¬¡¢¥â¥¸¥å¡¼¥ë¤Î¥í¡¼¥É»þ¤Ë
¤½¤Î¥â¥¸¥å¡¼¥ë¤ò¸·³Ê¤Ë¥Ð¡¼¥¸¥ç¥ó¥Á¥§¥Ã¥¯¤¹¤ë¤³¤È¤Ç¡¢¤³¤ÎÌäÂ꤬µ¯¤³¤é¤Ê¤¤¤è¤¦¤Ë
¤·¤Æ¤¤¤ë¡£
<P>
<P>
<H2><A NAME="chapter_m_sect1"></A> <A NAME="ss13.1">13.1 ¥â¥¸¥å¡¼¥ë¤Î¥í¡¼¥Ç¥£¥ó¥°</A>
</H2>

<P>
<P>
<A NAME="figure12-1"></A> <P>
<FIGURE>
<PH VSPACE="1">
<IMG SRC="./The-Linux-Kernel-images/figure12-1.gif">
</FIGURE>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>¿Þɽ(12.1)¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Î¥ê¥¹¥È
<P>
<P>¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤ò¥í¡¼¥É¤¹¤ëÊýË¡¤Ï¤Õ¤¿¤Ä¤¢¤ë¡£¤Ò¤È¤Ä¤Ï¡¢<CODE>insmod</CODE> 
¥³¥Þ¥ó¥É¤Ë¤è¤Ã¤Æ¼êÆ°¤Ç¥«¡¼¥Í¥ë¤ËÁȤ߹þ¤àÊýË¡¡£¤â¤¦¤Ò¤È¤Ä¤Î¡¢¤º¤Ã¤È¸­ÌÀ¤Ê¤ä¤ê
Êý¤Ï¡¢É¬Íפ˱þ¤¸¤Æ¥â¥¸¥å¡¼¥ë¤òÁȤ߹þ¤àÊýË¡¤Ç¤¢¤ë¡£¤³¤ì¤Ï¡¢¥Ç¥Þ¥ó¥É¥í¡¼¥Ç¥£
¥ó¥°(demand loading)¤È¸Æ¤Ð¤ì¤ë¡£¥æ¡¼¥¶¤¬¥«¡¼¥Í¥ëÆâ¤Ë¸ºß¤·¤Ê¤¤¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à
¤ò¥í¡¼¥É¤¹¤ë»þ¤Ê¤É¡¢¥â¥¸¥å¡¼¥ë¤ÎɬÍ×À­¤ò¥«¡¼¥Í¥ë¤¬´¶ÃΤ·¤¿¤È¤­¡¢¥«¡¼¥Í¥ë¤Ï¡¢
¥«¡¼¥Í¥ë¥Ç¡¼¥â¥ó(kerneld)¤ËŬÀڤʥ⥸¥å¡¼¥ë¤ò¥í¡¼¥É¤¹¤ë¤è¤¦¥ê¥¯¥¨¥¹¥È¤¹¤ë¡£
<P>
<P>¥«¡¼¥Í¥ë¥Ç¡¼¥â¥ó¤Ï¡¢ÉáÄ̤Υ桼¥¶¥×¥í¥»¥¹¤Ê¤Î¤À¤¬¡¢¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¤Î¸¢¸Â¤ò
»ý¤Ã¤Æ¤¤¤ë¡£Ä̾ï¤Ï¥·¥¹¥Æ¥àµ¯Æ°»þ¤Ë¼Â¹Ô¤¬³«»Ï¤µ¤ì¤ë¤¬¡¢¤½¤ì¤¬¼Â¹Ô¤µ¤ì¤ë
¤È¡¢¥«¡¼¥Í¥ë¥Ç¡¼¥â¥ó¤Ï¥«¡¼¥Í¥ë¤ËÂФ¹¤ë¥×¥í¥»¥¹´ÖÄÌ¿®(IPC)¤Î¥Á¥ã¥ó¥Í¥ë¤ò³«¤¯¡£
¤³¤Î¥ê¥ó¥¯¤Ï¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¡¢<CODE>kerneld</CODE> ¤ËÂФ·¤ÆÍÍ¡¹¤Ê¥¿¥¹¥¯
¤Î¼Â¹Ô¤ò°ÍÍꤹ¤ë¤¿¤á¤Î¥á¥Ã¥»¡¼¥¸¤¬Á÷¿®¤µ¤ì¤ë¡£<BR>
[see: 
<A HREF="./The-Linux-Kernel-images/linux/include/linux/kerneld.h">include/linux/kerneld.h</A>]<BR>
<CODE>kerneld</CODE> ¤Î¼çÍפʵ¡Ç½¤Ï¡¢
¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Î¥í¡¼¥É¤È¥¢¥ó¥í¡¼¥É¤À¤¬¡¢Â¾¤Î¥¿¥¹¥¯¤Î½èÍý¤â²Äǽ¤Ç¤¢¤ë¡£
¤¿¤È¤¨¤Ð¡¢É¬ÍפʤȤ­¤Ë¥·¥ê¥¢¥ë²óÀþ¾å¤Ç PPP ¥ê¥ó¥¯¤ò³«»Ï¤·¡¢É¬Íפ¬¤Ê¤¯¤Ê¤Ã¤¿¤é
¤½¤ì¤òÀÚÃǤ¹¤ë¤È¤¤¤Ã¤¿¤³¤È¤â¤Ç¤­¤ë¡£<CODE>kerneld</CODE> ¼«¿È¤¬¤½¤¦¤·¤¿¥¿¥¹¥¯¤ò
¼Â¹Ô¤¹¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢<CODE>insmod</CODE> ¤Ê¤É¤ÎɬÍ×¤Ê¥×¥í¥°¥é¥à¤òµ¯Æ°¤·¤Æ¤½¤ì¤Ë
»Å»ö¤ò¤µ¤»¤ë¡£<CODE>kerneld</CODE> ¤Ï¡¢¥«¡¼¥Í¥ë¤ÎÂåÍý¿Í(agent)¤Î¤è¤¦¤Ê¸ºß¤Ç¤¢¤ê¡¢
¥«¡¼¥Í¥ë¤òÂåÍý¤·¤Æ»Å»ö¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤ò¹Ô¤¦¡£
<P>
<P><CODE>insmod</CODE> ¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢¥ê¥¯¥¨¥¹¥È¤µ¤ì¤¿¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤ò
ȯ¸«¤·¤Æ¡¢¤½¤ì¤ò¥í¡¼¥É¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¥Ç¥Þ¥ó¥É¥í¡¼¥Ç¥£¥ó¥°¤Ç¥í¡¼¥É¤µ¤ì¤¿
¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤ÏÄ̾ï <CODE>/lib/modules/kernel-version</CODE> ¤ËÊݸ¤µ¤ì¤ë¡£
¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Ï¾¤Î¥×¥í¥°¥é¥à¤ÈƱ¤¸¤¯¥ê¥ó¥¯¤µ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë
¤Ê¤Î¤À¤¬¡¢¥ê¥í¥±¡¼¥¿¥Ö¥ë(relocatable)¥¤¥á¡¼¥¸¤È¤·¤Æ¥ê¥ó¥¯¤µ¤ì¤Æ¤¤¤ëÅÀ¤Ç°Û¤Ê¤ë¡£
¤¹¤Ê¤ï¤Á¡¢ÆÃÄê¤Î¸ÇÄêŪ¤Ê¥¢¥É¥ì¥¹¤«¤é¼Â¹Ô¤µ¤ì¤ë¤è¤¦¤Ë¥ê¥ó¥¯¤µ¤ì¤¿¤Î¤Ç¤Ï¤Ê¤¤
¥¤¥á¡¼¥¸¤Ç¤¢¤ë¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£¤½¤ì¤é¤Ï <CODE>a.out</CODE> ¤« <CODE>ELF</CODE> ¤«
¤Î¤¤¤º¤ì¤«¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤ò¼è¤ë¡£<CODE>insmod</CODE> ¤Ï¡¢Æø¢Åª¤Ê¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò
ȯ¹Ô¤·¤Æ¡¢¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤Æ¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¥·¥ó¥Ü¥ë¤ò¸«¤Ä¤±¤À¤¹¡£<BR>
[see: sys_get_kernel_syms(), in 
<A HREF="./The-Linux-Kernel-images/linux/kernel/module.c">kernel/module.c</A>]<BR>
¤½¤ì¤é¤Ï¡¢¥·¥ó¥Ü¥ë̾¤È¡¢¤½¤Î¥¢¥É¥ì¥¹¤Ê¤É¤ÎÃͤȤò´Þ¤ó¤À¥Ú¥¢¤È¤·¤ÆÊݸ¤µ¤ì¤ë¡£
¥«¡¼¥Í¥ë¤¬¥¨¥¯¥¹¥Ý¡¼¥È¤·¤¿¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤Ï¡¢¥«¡¼¥Í¥ë¤¬´ÉÍý¤¹¤ë¥â¥¸¥å¡¼¥ë
¤Î¥ê¥¹¥È¤ÎºÇ½é¤Î <CODE>
<A HREF="The-Linux-Kernel-16.html#module">module</A></CODE> ¥Ç¡¼¥¿¹½Â¤ÂΤËÊÝ»ý
¤µ¤ì¡¢¤½¤Î¹½Â¤ÂΤϡ¢<CODE>
<A HREF="The-Linux-Kernel-16.html#module">module_list</A></CODE> ¥Ý¥¤¥ó¥¿¤Ë
¤è¤Ã¤Æ¥Ý¥¤¥ó¥È¤µ¤ì¤ë¡£<BR>
[see: 
<A HREF="./The-Linux-Kernel-images/linux/include/linux/module.h">include/linux/module.h</A>]<BR>
¥«¡¼¥Í¥ë¤Î¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤ËÄɲ䵤ì¤ë¤Î¤Ï¡¢ÌÀ¼¨Åª¤ËÄɲ䬻ؼ¨¤µ¤ì¤¿¥·¥ó¥Ü¥ë
¤À¤±¤Ç¤¢¤ë¡£¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤Ï¡¢¥«¡¼¥Í¥ë¤Î¥³¥ó¥Ñ¥¤¥ë¤È¥ê¥ó¥¯¤¬¤Ê¤µ¤ì¤ë»þ¤Ë
ºîÀ®¤µ¤ì¤ë¤Î¤À¤¬¡¢¤¹¤Ù¤Æ¤Î¥·¥ó¥Ü¥ë¤¬¥â¥¸¥å¡¼¥ë¤Ë¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤ë¤ï¤±¤Ç¤Ï
¤Ê¤¤¡£
¤¿¤È¤¨¤Ð¡¢<CODE>request_irq</CODE> ¤È¤¤¤¦¥·¥ó¥Ü¥ë¤¬¤¢¤ë¤¬¡¢¤³¤ì¤Ï¡¢¥É¥é¥¤¥Ð¤¬ÆÃÄê¤Î
¥·¥¹¥Æ¥à³ä¤ê¹þ¤ß¤òÀ©¸æ¤·¤è¤¦¤È¤¹¤ë¾ì¹ç¤Ë¸Æ¤Ó½Ð¤µ¤ì¤ë¥«¡¼¥Í¥ë¥ë¡¼¥Á¥ó¤Ç¤¢¤ë¡£
¤ï¤¿¤·¤Î¸½ºß¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢¤³¤Î¥·¥ó¥Ü¥ë¤Ï 0x0010cd30 ¤È¤¤¤¦Ãͤò»ý¤Ã¤Æ¤¤¤ë¡£
¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¥«¡¼¥Í¥ë¥·¥ó¥Ü¥ë¤È¤½¤ÎÃͤò´Êñ¤Ë¸«¤ë¤Ë¤Ï¡¢<CODE>/proc/ksyms</CODE> ¤ò¸«¤ë¤«¡¢<CODE>ksyms</CODE> ¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò»È¤¨¤Ð¤è¤¤¡£
<CODE>ksyms</CODE> ¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò»È¤¨¤Ð¡¢¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î¥«¡¼¥Í¥ë
¥·¥ó¥Ü¥ë¤ò¸«¤ë¤³¤È¤â¡¢¥í¡¼¥À¥Ö¥ë¥â¥¸¥å¡¼¥ë¤Ë¤è¤Ã¤Æ¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¥·¥ó¥Ü¥ë
¤À¤±¤ò¸«¤ë¤³¤È¤â¤Ç¤­¤ë¡£<CODE>insmod</CODE> ¥³¥Þ¥ó¥É¤Ï¡¢
¥â¥¸¥å¡¼¥ë¤ò²¾ÁÛ¥á¥â¥ê¤«¤éÆɤ߽Ф·¤Æ¡¢¥«¡¼¥Í¥ë¤¬¥¨¥¯¥¹¥Ý¡¼¥È¤·¤Æ¤¤¤ë¥·¥ó¥Ü¥ë
¤ò»È¤¦¤³¤È¤Ç¡¢¥«¡¼¥Í¥ë¥ë¡¼¥Á¥ó¤Ø¤Î»²¾È¤Î¤Ê¤«¤Ç¤Þ¤À²ò·è¤µ¤ì¤Æ¤¤¤Ê¤¤»²¾È¤ò
Ŭµ¹²ò·è(fixup)¤¹¤ë¡£¤³¤Î²ò·è¤Ï¡¢¥á¥â¥êÆâ¤Î¥â¥¸¥å¡¼¥ë¥¤¥á¡¼¥¸¤Ë¥Ñ¥Ã¥Á¤òÅö¤Æ¤ë
¤È¤¤¤¦·Á¼°¤ò¼è¤Ã¤Æ¤¤¤ë¡£<CODE>insmod</CODE> ¤Ï¡¢¥·¥ó¥Ü¥ë¤Î¥¢¥É¥ì¥¹¤ò¥â¥¸¥å¡¼¥ëÆâ¤Î
ŬÀڤʾì½ê¤Ë½ñ¤­¹þ¤à¡£
<P>
<P><CODE>insmod</CODE> ¤Ë¤è¤Ã¤Æ¡¢¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¥«¡¼¥Í¥ë¥·¥ó¥Ü¥ë¤ËÂФ¹¤ë¥â¥¸¥å¡¼
¥ë¤Î»²¾È¤¬²ò·è¤µ¤ì¤ë¤È¡¢<CODE>insmod</CODE> ¤Ï¡¢ºÆÅÙÆø¢Åª¤Ê¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò»È¤Ã
¤Æ¡¢¿·¤·¤¤¥«¡¼¥Í¥ë¤òÊÝ»ý¤¹¤ë¤Î¤Ë½¼Ê¬¤Ê¥¹¥Ú¡¼¥¹¤ò¤¯¤ì¤ë¤è¤¦¥«¡¼¥Í¥ë¤Ë°ÍÍꤹ¤ë¡£
¥«¡¼¥Í¥ë¤Ï¡¢¿·µ¬¤Î <CODE>
<A HREF="The-Linux-Kernel-16.html#module">module</A></CODE> ¥Ç¡¼¥¿¹½Â¤ÂΤȡ¢
¿·¤·¤¤¥â¥¸¥å¡¼¥ë¤òÊÝ»ý¤¹¤ë¤Î¤Ë½¼Ê¬¤Ê¥á¥â¥êÍÆÎ̤ò³ä¤êÅö¤Æ¤Æ¡¢¤½¤ì¤ò¥«¡¼¥Í¥ë
¥â¥¸¥å¡¼¥ë¥ê¥¹¥È¤ÎºÇ¸åÈø¤ËÃÖ¤¯¡£
¤½¤Î¿·¤·¤¤¥â¥¸¥å¡¼¥ë¤Ï UNINITIALIZED ¤È¥Þ¡¼¥¯¤µ¤ì¤ë¡£<BR>
[see: sys_create_module(), in 
<A HREF="./The-Linux-Kernel-images/linux/kernel/module.c">kernel/module.c</A>]<BR>
<A HREF="#figure12-1">¿Þɽ(12.1)</A>¤Ç¤Ï¡¢VFAT ¤È FAT ¤Î¤Õ¤¿¤Ä¤Î¥â¥¸¥å¡¼¥ë
¤¬¥«¡¼¥Í¥ë¤Ë¥í¡¼¥É¤µ¤ì¤¿¸å¤Î¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Î¥ê¥¹¥È¤¬¼¨¤µ¤ì¤Æ¤¤¤ë¡£
¿Þɽ¤Ç¤Ï¼¨¤µ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢¥ê¥¹¥È¤Î
ÀèƬ¤Î¥â¥¸¥å¡¼¥ë¤Ï <CODE>pseudo-module</CODE> ¤È¤Ê¤Ã¤Æ¤¤¤Æ¡¢¤³¤ì¤Ï¥«¡¼¥Í¥ë¤Î
¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤¿¥·¥ó¥Ü¥ë¤Î¥Æ¡¼¥Ö¥ë¤òÊÝ»ý¤¹¤ë¤¿¤á¤À¤±¤Ë¤½¤³¤ËÃÖ¤«¤ì¤Æ¤¤¤ë¤â¤Î
¤Ç¤¢¤ë¡£<CODE>lsmod</CODE> ¥³¥Þ¥ó¥É¤ò»È¤¨¤Ð¡¢¥í¡¼¥É¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥â¥¸¥å¡¼¥ë¤È
¤½¤Î°Í¸´Ø·¸¤òɽ¼¨¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£<CODE>lsmod</CODE> ¤Ïñ¤Ë <CODE>/proc/modules</CODE> ¤òºÆ¹½À®¤·¤¿¤À¤±¤Î¤â¤Î¤Ç¡¢<CODE>/proc/modules</CODE> ¤ÎÊý¤Ï¡¢¥«¡¼¥Í¥ë¤Î 
<CODE>module</CODE> ¥Ç¡¼¥¿¹½Â¤ÂΤΥꥹ¥È¤«¤éºîÀ®¤µ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¡£
¥â¥¸¥å¡¼¥ëÍѤ˳ä¤êÅö¤Æ¤é¤ì¤¿¥á¥â¥ê¤Ï¡¢ <CODE>insmod</CODE> ¤¬¥â¥¸¥å¡¼¥ë¤Ë¥¢¥¯¥»¥¹
¤Ç¤­¤ë¤è¤¦¡¢<CODE>insmod</CODE> ¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Ë¥Þ¥Ã¥×¤µ¤ì¤ë¡£
<CODE>insmod</CODE> ¤Ï¡¢¥â¥¸¥å¡¼¥ë¤ò³ä¤êÅö¤Æ¤é¤ì¤¿¥¢¥É¥ì¥¹¶õ´Ö¤Ë¥³¥Ô¡¼¤·¤Æ
¥â¥¸¥å¡¼¥ë¤ÎÃÖ¤­¾ì½ê¤òÊѹ¹¤¹¤ë¤³¤È¤Ç¡¢³ä¤êÅö¤Æ¤ò¼õ¤±¤¿¥«¡¼¥Í¥ë¥¢¥É¥ì¥¹¶õ´Ö¤«¤é
¥â¥¸¥å¡¼¥ë¤¬¼Â¹Ô¤µ¤ì¤ë¤è¤¦¤Ë¤¹¤ë¡£
¤³¤¦¤·¤¿½èÍý¤¬É¬ÍפʤΤϡ¢°Û¤Ê¤ë Linux ¥·¥¹¥Æ¥à¾å¤Ç¤Ï¥â¥¸¥å¡¼¥ë¤òƱ¤¸¥¢¥É¥ì¥¹
¤Ë¥í¡¼¥É¤¹¤ë¤è¤¦Í×µá¤Ç¤­¤Ê¤¤¤À¤±¤Ç¤Ê¤¯¡¢Æ±°ì¥·¥¹¥Æ¥à¾å¤Ç¤âƱ¤¸¥¢¥É¥ì¥¹¤Ë
ÆóÅÙ¥í¡¼¥É¤¹¤ë¤è¤¦Í׵᤹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¤«¤é¤Ç¤¢¤ë¡£¤³¤Î¥¢¥É¥ì¥¹¤ÎÊѹ¹¤ÎºÝ
¤Ë¤Ï¡¢¥â¥¸¥å¡¼¥ë¥¤¥á¡¼¥¸¤¬Å¬Àڤʥ¢¥É¥ì¥¹¤ò»ý¤Ä¤è¤¦¤Ë½¤Àµ¤¬¤Ê¤µ¤ì¤ë¡£
<P>
<P>¿·¤·¤¤¥â¥¸¥å¡¼¥ë¤â¥«¡¼¥Í¥ë¤Ë¥·¥ó¥Ü¥ë¤ò¥¨¥¯¥¹¥Ý¡¼¥È¤¹¤ë¤Î¤Ç¡¢<CODE>insmod</CODE>
¤Ï¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤ë¥¤¥á¡¼¥¸¤Î¥Æ¡¼¥Ö¥ë¤òºîÀ®¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤¹¤Ù¤Æ¤Î
¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Ë¤Ï¡¢¥â¥¸¥å¡¼¥ë½é´ü²½¤Èºï½ü¤Î¥ë¡¼¥Á¥ó¤¬´Þ¤Þ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð
¤Ê¤é¤º¡¢¤½¤ì¤é¤Î¥·¥ó¥Ü¥ë¤Ï¤ï¤¶¤È¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤Ê¤¤¤Î¤À¤¬¡¢<CODE>insmod</CODE> 
¤Ï¡¢¥«¡¼¥Í¥ë¤Ë¤½¤Î¥ë¡¼¥Á¥ó¤Î¥¢¥É¥ì¥¹¤òÅϤµ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤Î¤Ç¡¢¤½¤ì¤é¤Î¥¢¥É
¥ì¥¹¤òÃΤäƤ¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
¤³¤ì¤é¤¹¤Ù¤Æ¤¬¾å¼ê¤¯¤¤¤Ã¤¿¾ì¹ç¡¢<CODE>insmod</CODE> ¤Ï¥â¥¸¥å¡¼¥ë¤ò½é´ü²½¤¹¤ë½àÈ÷¤¬
À°¤Ã¤¿¤¿¤á¡¢Æø¢Åª¤Ê¥·¥¹¥Æ¥à¥³¡¼¥ë¤òȯ¹Ô¤·¤Æ¡¢¥«¡¼¥Í¥ë¤ËÂФ·¤Æ¡¢¥â¥¸¥å¡¼¥ë¤Î
½é´ü²½¥ë¡¼¥Á¥ó¤Èºï½ü¥ë¡¼¥Á¥ó¤Î¥¢¥É¥ì¥¹¤òÅϤ¹¡£<BR>
[see: sys_init_module(), in 
<A HREF="./The-Linux-Kernel-images/linux/kernel/module.c">kernel/module.c</A>]<BR>
¿·¤·¤¤¥â¥¸¥å¡¼¥ë¤¬¥«¡¼¥Í¥ë¤ËÁȤ߹þ¤Þ¤ì¤ë¤È¤­¡¢¥«¡¼¥Í¥ë¤Î°ìÏ¢¤Î¥·¥ó¥Ü¥ë¤¬
¹¹¿·¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢¿·µ¬¥â¥¸¥å¡¼¥ë¤Ë¤è¤Ã¤ÆÍøÍѤµ¤ì¤ë¤³¤È¤Ë¤Ê¤ë¥â¥¸¥å¡¼¥ë¤Ë
ÂФ·¤Æ¤â½¤Àµ¤¬²Ã¤¨¤é¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
¾¤Î¥â¥¸¥å¡¼¥ë¤«¤é°Í¸¤µ¤ì¤Æ¤¤¤ë¥â¥¸¥å¡¼¥ë¤Ï¡¢¤½¤Î¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤ÎËöÈø¤Ë¤¢¤ë
»²¾È¥ê¥¹¥È¤ò´ÉÍý¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢¤½¤Î»²¾È¥ê¥¹¥È¤Ï¼«¸Ê¤Î <CODE>
<A HREF="The-Linux-Kernel-16.html#module">module</A></CODE> ¥Ç¡¼¥¿¹½Â¤ÂΤˤè¤Ã¤Æ¥Ý¥¤¥ó¥È¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤é
¤Ê¤¤¡£
<A HREF="#figure12-1">¿Þɽ(12.1)</A>¤Ç¤Ï¡¢VFAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¥â¥¸¥å¡¼¥ë
¤Ï¡¢FAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¥â¥¸¥å¡¼¥ë¤Ë°Í¸¤·¤Æ¤¤¤ë¡£¤·¤¿¤¬¤Ã¤Æ¡¢FAT ¥â¥¸¥å¡¼¥ë
¤Ë¤Ï¡¢VFAT ¥â¥¸¥å¡¼¥ë¤Ø¤Î»²¾È¤¬´Þ¤Þ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤½¤Î»²¾È¤Ï¡¢VFAT 
¥â¥¸¥å¡¼¥ë¤¬¥í¡¼¥É¤µ¤ì¤¿¤È¤­¤ËÉÕ¤±²Ã¤¨¤é¤ì¤ë¡£
¥«¡¼¥Í¥ë¤Ï¥â¥¸¥å¡¼¥ë½é´ü²½¥ë¡¼¥Á¥ó¤ò¸Æ¤Ó½Ð¤·¡¢¤½¤ì¤¬À®¸ù¤·¤¿¾ì¹ç¡¢¥â¥¸¥å¡¼¥ë¤Î
¥¤¥ó¥¹¥È¡¼¥ë¤ò¹Ô¤¦¡£¥â¥¸¥å¡¼¥ë¤Îºï½ü¥ë¡¼¥Á¥ó¤Î¥¢¥É¥ì¥¹¤Ï¡¢¤½¤Î¥â¥¸¥å¡¼¥ë¤Î 
<CODE>module</CODE> ¥Ç¡¼¥¿¹½Â¤ÂΤËÊݸ¤µ¤ì¡¢¥â¥¸¥å¡¼¥ë¤¬¥¢¥ó¥í¡¼¥É¤µ¤ì¤ë¤È¤­¤Ë¡¢
¥«¡¼¥Í¥ë¤Ë¤è¤Ã¤Æ¸Æ¤Ó½Ð¤µ¤ì¤ë¡£ºÇ¸å¤Ë¡¢¥â¥¸¥å¡¼¥ë¤Î¾õÂÖ¤¬ RUNNING ¤Ë¥»¥Ã¥È¤µ¤ì
¤ë¡£
<P>
<H2><A NAME="chapter_m_sect2"></A> <A NAME="ss13.2">13.2 ¥â¥¸¥å¡¼¥ë¤Î¥¢¥ó¥í¡¼¥É</A>
</H2>

<P>¥â¥¸¥å¡¼¥ë¤Ï <CODE>rmmod</CODE> ¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æºï½ü¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¢¤ë¤¬¡¢
¥ª¥ó¥Ç¥Þ¥ó¥É¤Ç¥í¡¼¥É¤µ¤ì¤¿¥â¥¸¥å¡¼¥ë¤Ï»ÈÍѤµ¤ì¤Ê¤¯¤Ê¤Ã¤¿¤È¤­ <CODE>kerneld</CODE> ¤Ë¤è¤Ã¤Æ¼«Æ°Åª¤Ë¥·¥¹¥Æ¥à¤«¤éºï½ü¤µ¤ì¤ë¡£¥¢¥¤¥É¥ë¥¿¥¤¥Þ¡¼(idle timer)¤¬
»þ´ÖÀÚ¤ì¤Ë¤Ê¤Ã¤¿ºÝ¤Ï¤¤¤Ä¤â¡¢<CODE>kerneld</CODE> ¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤òȯ¹Ô¤·¡¢
¥ª¥ó¥Ç¥Þ¥ó¥É¤Ç¥í¡¼¥É¤µ¤ì¤¿¥â¥¸¥å¡¼¥ë¤Î¤Ê¤«¤Ç»ÈÍѤµ¤ì¤Ê¤¯¤Ê¤Ã¤¿¤â¤Î¤¹¤Ù¤Æ¤ò
¥·¥¹¥Æ¥à¤«¤éºï½ü¤¹¤ë¤è¤¦¥ê¥¯¥¨¥¹¥È¤¹¤ë¡£
¥¿¥¤¥Þ¡¼¤ÎÃͤϡ¢<CODE>kerneld</CODE> ¤ò»ÏÆ°¤·¤¿»þ¤Ë¥»¥Ã¥È¤µ¤ì¤ë¡£¤ï¤¿¤·¤Î 
<CODE>kerneld</CODE> ¤Î¥¿¥¤¥Þ¡¼ÀßÄê¤Ï 180 Éäˤ·¤Æ¤¢¤ë¡£
¤¿¤È¤¨¤Ð¡¢iso9660 CD-ROM ¤ò¥Þ¥¦¥ó¥È¤·¤Æ¡¢¤½¤Î iso9660 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬
¥í¡¼¥À¥Ö¥ë¥â¥¸¥å¡¼¥ë¤Ç¤¢¤Ã¤¿¾ì¹ç¡¢CD-ROM ¤¬¥¢¥ó¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤«¤é¤·¤Ð¤é¤¯
¤¹¤ë¤È¡¢iso9660 ¥â¥¸¥å¡¼¥ë¤Ï¥«¡¼¥Í¥ë¤«¤éºï½ü¤µ¤ì¤ë¡£
<P>
<P>¾¤Î¥«¡¼¥Í¥ë¤Î°ìÉô¤¬¡¢¤¢¤ë¥â¥¸¥å¡¼¥ë¤Ë°Í¸¤·¤Æ¤¤¤ë´Ö¤Ï¡¢¤½¤Î¥â¥¸¥å¡¼¥ë¤Ï
¥¢¥ó¥í¡¼¥É¤Ç¤­¤Ê¤¤¡£¤¿¤È¤¨¤Ð¡¢¤Ò¤È¤Ä°Ê¾å¤Î VFAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¥Þ¥¦¥ó¥È¤·¤Æ
¤¤¤ë¾ì¹ç¡¢VFAT ¥â¥¸¥å¡¼¥ë¤Ï¥¢¥ó¥Þ¥¦¥ó¥È¤Ç¤­¤Ê¤¤¡£<CODE>lsmod</CODE> ¤Î½ÐÎÏ
¤ò¸«¤ì¤Ð¡¢¸Ä¡¹¤Î¥â¥¸¥å¡¼¥ë¤¬°Í¸´Ø·¸¤Ë¤Ä¤¤¤Æ¤â¥«¥¦¥ó¥È¤ò»ý¤Ã¤Æ¤¤¤ë¤³¤È¤¬Ê¬¤«
¤ë¡£
<P>
<PRE>
Module:        #pages:  Used by:
msdos              5                  1
vfat               4                  1 (autoclean)
fat                6    [vfat msdos]  2 (autoclean)
</PRE>
<P>
<P>¥«¥¦¥ó¥È¤Ï¡¢¤½¤Î¥â¥¸¥å¡¼¥ë¤Ë°Í¸¤·¤Æ¤¤¤ë¥«¡¼¥Í¥ë¼ÂÂÎ(entity)¤Î¿ô¤òɽ¤·¤Æ¤¤
¤ë¡£¾åµ­¤ÎÎã¤Ç¤Ï¡¢<CODE>vfat</CODE> ¤È <CODE>msdos</CODE> ¥â¥¸¥å¡¼¥ë¤Ï¤É¤Á¤é¤â <CODE>fat</CODE> ¥â¥¸¥å¡¼¥ë¤Ë°Í¸¤·¤Æ¤¤¤ë¤Î¤Ç¡¢<CODE>fat</CODE> ¤Î¥«¥¦¥ó¥È¤Ï 2 ¤È¤Ê¤Ã¤Æ
¤¤¤ë¡£<CODE>vfat</CODE> ¤È <CODE>msdos</CODE> ¥â¥¸¥å¡¼¥ë¤ÏξÊý¤È¤â¤½¤ì¤Ë°Í¸¤¹¤ë 1 ¤Ä¤Î
¼ÂÂΤò»ý¤Ã¤Æ¤¤¤ë¤¬¡¢¤½¤Î¼ÂÂΤȤϥޥ¦¥ó¥È¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç¤¢¤ë¡£
¤â¤·¡¢¤ï¤¿¤·¤¬¤â¤¦¤Ò¤È¤Ä VFAT ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò¥Þ¥¦¥ó¥È¤·¤¿¤È¤¹¤ë¤È¡¢
<CODE>vfat</CODE> ¥â¥¸¥å¡¼¥ë¤Î¥«¥¦¥ó¥È¤Ï 2 ¤Ë¤Ê¤ë¤À¤í¤¦¡£¥â¥¸¥å¡¼¥ë¤Î¥«¥¦¥ó¥È¤Ï¡¢
¥¤¥á¡¼¥¸¤ÎºÇ½é¤Î¥í¥ó¥°¥ï¡¼¥É(longword)¤ÎÃæ¤ËÊÝ»ý¤µ¤ì¤Æ¤¤¤ë¡£
<P>
<P>¤½¤Î¥Õ¥£¡¼¥ë¥É¤Ë¤Ï¡¢AUTOCLEAN ¤È VISITED ¥Õ¥é¥°¤âÊÝ»ý¤µ¤ì¤ë¤Î¤Ç¡¢¤ä¤ä
¾ðÊó²á¿¤È¤â¤¤¤¨¤ë¥Õ¥£¡¼¥ë¥É¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£¤³¤ì¤é¤Õ¤¿¤Ä¤Î¥Õ¥é¥°¤Ï¡¢¥Ç¥Þ¥ó¥É
¥í¡¼¥Ç¥£¥ó¥°¤Ç¥í¡¼¥É¤µ¤ì¤¿¥â¥¸¥å¡¼¥ë¤ËÂФ·¤Æ»ÈÍѤµ¤ì¤ë¡£
¤½¤¦¤·¤¿¥â¥¸¥å¡¼¥ë¤¬ AUTOCLEAN ¤È¥Þ¡¼¥¯¤µ¤ì¤ë¤Î¤Ï¡¢¥·¥¹¥Æ¥à¤¬
¤½¤Î¥â¥¸¥å¡¼¥ë¤ò¼«Æ°Åª¤Ë¥¢¥ó¥í¡¼¥É¤¹¤ëÂоݤÈǧ¼±¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë¤¿¤á¤Ç¤¢¤ë¡£
VISITED ¥Õ¥é¥°¤Ï¡¢¤Ò¤È¤Ä°Ê¾å¤Î¥·¥¹¥Æ¥à¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¤½¤Î¥â¥¸¥å¡¼¥ë¤ò
»È¤Ã¤Æ¤¤¤ë¤³¤È¤ò¼¨¤·¤Æ¤¤¤ë¡£VISITED ¥Õ¥é¥°¤Ï¡¢Â¾¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¤¬¤½¤Î
¥â¥¸¥å¡¼¥ë¤È»È¤¦¤È¤­¤Ïɬ¤º¥»¥Ã¥È¤µ¤ì¤ë¡£¥ª¥ó¥Ç¥Þ¥ó¥É¤Ç¥í¡¼¥É¤µ¤ì¤¿¤¬»ÈÍѤµ¤ì
¤Ê¤¯¤Ê¤Ã¤¿¥â¥¸¥å¡¼¥ë¤òºï½ü¤¹¤ë¤«¤É¤¦¤«¤ò <CODE>kerneld</CODE> ¤¬¥·¥¹¥Æ¥à¤Ë¿Ò¤Í¤¿
¤È¤­¤Ï¡¢¥·¥¹¥Æ¥à¤Ï¥·¥¹¥Æ¥à¾å¤Î¤¹¤Ù¤Æ¤Î¥â¥¸¥å¡¼¥ë¤ò¸«²ó¤·¤Æ¡¢»ÈÍѤµ¤ì¤Ê¤¯¤Ê¤Ã¤¿
¤È¤¤¤¦¾ò·ï¤Ë³ºÅö¤¹¤ë¤â¤Î¤òÁܤ¹¡£¥·¥¹¥Æ¥à¤Ï AUTOCLEAN ¤È¥Þ¡¼¥¯¤µ¤ì¤Æ¤¤¤Æ 
RUNNING ¾õÂ֤ˤ¢¤ë¥â¥¸¥å¡¼¥ë¤À¤±¤ò¸«¤ë¡£³ºÅö¤¹¤ë¥â¥¸¥å¡¼¥ë¤¬ VISITED ¥Õ¥é¥°¤ò
¥¯¥ê¥¢¤·¤¿¾ì¹ç¡¢¥·¥¹¥Æ¥à¤Ï¤½¤Î¥â¥¸¥å¡¼¥ë¤òºï½ü¤¹¤ë¤¬¡¢¥â¥¸¥å¡¼¥ë¤¬¥Õ¥é¥°¤ò¥¯¥ê
¥¢¤·¤Ê¤¤¾ì¹ç¤Ï¡¢¥·¥¹¥Æ¥à¤¬¤½¤Î VISITED ¥Õ¥é¥°¤ò¥¯¥ê¥¢¤·¤Æ¡¢¥·¥¹¥Æ¥à¾å¤Î¼¡¤Î
¥â¥¸¥å¡¼¥ë¤ÎÄ´ºº¤Ë°Ü¤ë¡£
<P>
<P>¥â¥¸¥å¡¼¥ë¤¬¥¢¥ó¥í¡¼¥É²Äǽ¤Ê¾ì¹ç¡¢¤½¤Î¥â¥¸¥å¡¼¥ë¤Îºï½ü¥ë¡¼¥Á¥ó¤¬¸Æ¤Ó½Ð¤µ¤ì¡¢
¤½¤Î¥ë¡¼¥Á¥ó¤¬¡¢¥â¥¸¥å¡¼¥ë¤Ë³ä¤êÅö¤Æ¤é¤ì¤¿¥«¡¼¥Í¥ë¥ê¥½¡¼¥¹¤ò²òÊü¤¹¤ë¡£<BR>
[see: sys_delete_module(), in 
<A HREF="./The-Linux-Kernel-images/linux/kernel/module.c">kernel/module.c</A>]<BR>
¤½¤Î <CODE>
<A HREF="The-Linux-Kernel-16.html#module">module</A></CODE> ¥Ç¡¼¥¿¹½Â¤ÂÎ¤Ï DELETED ¤È¥Þ¡¼¥¯
¤µ¤ì¡¢¥«¡¼¥Í¥ë¥â¥¸¥å¡¼¥ë¤Î¥ê¥¹¥È¤«¤éºï½ü¤µ¤ì¤ë¡£(ºï½ü¤µ¤ì¤¿¥â¥¸¥å¡¼¥ë¤¬°Í¸
¤·¤Æ¤¤¤¿)¾¤Î¥â¥¸¥å¡¼¥ë¤Ï¡¢ºï½ü¥â¥¸¥å¡¼¥ë¤¬¤â¤Ï¤ä°Í¸¤¹¤ë¤â¤Î¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿
¤Î¤Ç¡¢»²¾È¥ê¥¹¥È¤ò½¤Àµ¤·¤Ê¤¤¤È¤¤¤±¤Ê¤¤¡£
ºï½ü¥â¥¸¥å¡¼¥ë¤¬É¬ÍפȤ·¤Æ¤¤¤¿¥«¡¼¥Í¥ë¥á¥â¥ê¤Ï¤¹¤Ù¤Æ³ä¤êÅö¤Æ¤ò²òÊü¤µ¤ì¤ë¡£
<P>
<HR>
<A HREF="The-Linux-Kernel-14.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="The-Linux-Kernel-12.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="The-Linux-Kernel.html#toc13">Ìܼ¡¤Ø</A>
</BODY>
</HTML>