Professional Documents
Culture Documents
What Is A Linux 0: Device River
What Is A Linux 0: Device River
• •
•• ••
• •
Wh at is a Linux Device 0 riv er ?
1
. I
• Linux Device drivers are distinct ''bla ck boxe s'' that mak e a
., ·:. · particular piece of bard ware respond to a well-def ined inte rnal
\
• · - -_ l e'•;-
'
,'
j fi 1 l I
~ -= ;--::_~-
,, ' I
l1 I
I.
I '
ii ;>~¥"-e1','1," -T-"" :, .
,1,
I I II -~ ., -
, I -;"¼•·=,e"c- - · - -
....::ce-c:i a;:c--
,_ _ - - -=---
",,.-.- --~.,__
::,Jter Do /GJ
Keep Discard
- ' ' ' I I" T9'1 lmi·~· ~i : '-~r"'' I I" ,
I
11
I
I
l'Vl :e n 11111, ,1,1. ,11 t~~ 1111, ·1,
l11 I I 11
,I
I
i:I~II
I I ·I I ' ' I, .
,.
, • Memory eons1Sts ,~f RuXM ~_Ra11cdomAccess Memory) cells, 1 1' '
1 {
r 'IL.d L . ,
r e, 1
reta. 11ed onl
· y tempo rar1·1y (.1.e. ,
extrem 1
e y 11g~1
1
,spee /
S,1,
ut1t a. i i1 1
11 *
~·
·1 . ' I I I j-; 1 tl
supp Iy re1nam. s Oil )'.
Wl11 'e ID uSr Of~ '~f fUOSt W u1e 1e powe
I /,
r
I
• Its purpo se iS' tb~o!d p~ograms and data that are curren tly in
use and thtjrJh1 s~tve as a high speed interm ediary betwe en the
1
''
CPU (ce11t1ral J~t<J1c~ssi11,g tutit) anti ·th:~ 11rit1cl1 s1<.)\.\ler storag e,~
1
1111
"fl i
I
I
I I 1/111
1
I
I
1
' 1/
'I': 11, ,I I I I
I1,1 11~
'I
I I
I /
I
I I I •',1/
'1 l
/, II II I
' I I
I
••
/ 1/ ./
•
' 1
,/
•·•
'ser Space
'
.
a ." .
~
Kernel Sp e d111' 1
11
,
I
I
1
1
11
11111I
ii
1/1/ll a·
I
II
1, , ,
1 1i/l
I II I
lr l i 111, u., / , ,,
, , ,1,
I Ii
I 1/
.·
- -
- - - - - - - - ~-
• -
- -
- .
-- - •
111I I I/! I ii
p•r ov id es I
1
I ,I I, I 1/
d ii 1/
II
d~n&,,~ft11~11'~1
p er at in e. sv s,tem n1ns an
I ,I 1
11
I
• K,
~ - • -- -
•,
1 . I
J'
- 11 · ,, J /, •/11 ~~ 1'~ , 1: ,t"'I"" I I _,
its services.
11 1
11 111, , ' , ,, I 11
1 I I
,,,ru c
. h (i. e. ,
I
oc e
, ss es
'
pr
_;.
•
13 r lo 9,t io 11 S in 11 ser
• User space is tl1a.t se t of 1n~irno
11 1e l) A p1 1io ces s is a11 execut.it1g. iti st an ce o
evef)lthin_g ot11er tl1at1 t11e ke 111.'.fl.
1
od1er~ I
IUI ,I
se.r S'p ac e
II
J(e rn I
e_ ·
Sp ac e I· ,1
I ' 1
/
II I IIIi 11 I I I
1
1
, ~11~~11'" J11roc:,~1sses
Co re Kerne) Ru ns I I IJJ 1S
1'/ ,1 ,, I ~li0
I 1
' I
~~~~~~~~~
I!
I I
I I / I
I I '
II
I I' I
l'l11\ M
1
1
~:1, ,\ J.k,1111I" ,,,rt,v
~~/t1,eir1w
S1 , ., 1 / I 1/
1' /
I (
I 1
,)
1I
, i1
, I I
•• • •
• •
•• ••
Kernel S ••
-
1 1
ii, , !i' I ,1 i'r' 1''" I ii I i'1l,1" 11,I I I I'
Ij ,1'i' ,,,, ,I I/' "'' I
' I
-
·
~a l sl
/'
rS ,rS
I
1
,t /eii
1111/
D/ ca ll$ ar e
11
re qu es ts in a U ni x- like
11
I
ch
I I
ib pU tlo ut J) ut (Y O ) or pr oc es s cr ea tio n.
by th e ke rn el . su I I' I '8 8 1
,I I I
I
~ tli ~t
I
tJ1
•
th e C PU " as '
cc.1.1 i
it11 ,~.1
I'! :~, ~ Ci \,
1 \ t 1 l I~
r ".n ,~ r 1 , , r 111
de- .
1
,..1
1
1,,1 · , , '4,,..- ·
·
. - lr , I~~ I' rli t '
1 ..
,, ' 1 I,
at
1
io
1
n or · n
· ee
1
,! I i, ' ., . •
1
I I
~
I;
r; f
I ./ I I
,: t t1 te rs).
I
J,
I
I i1 1'
~l~
I
;t1 1
!~
~ : u in
Ii1
nd pr
I
ch as dr $ R
•I '
I '1' 11 II I I,,,'1 11
J' I I
I ,I
I II ' 11 1 1
'1' ' ' '
1 I,I i1I
1
' I I 11 ,11,I
_ _ _,,,,. I " I
r I "i~
vers Part 2: Sy sten1 Men1ory, Stat ic rv1od ules and Dynar,1i c r··./lodu lf:<:;
••
•
• •
User Space and.Kernel Space •• ••
User Space
System c ,
11n.:1:!J::r '·;r,·::··'•
1
' '
rnp~ter Do yGu
•• • •
• •
•• ••
Ke rnel Space ••
User Space and
i\ p p li ca ti o n Our Program
User- Space, Su p p o rt in g
Linux:Kernel
- K e rne r Space
D ev ic e D ri v e rs J
H a rd \v a re
np urer Do ~'Ou
Keep Disca rd
' I I' \
I I
I
S ta ti c l\!lodules: T h e
s e are co1npiled as a p
a t a n y ti m e . T h e s e ro a rt o f the ken1el a11d
8.ke th e kernel la rg e r a n d h are av ailable
u s to re b u il d a n d re a s th e d is a d v a n ta g e o f
boot. th e k e rn e l every requiring
ti m e w e w a n t n e w :f unctionality.
·,~•,:r ·"' :r
'i;; · C o re K e rn e l fe a tu re s s ·M1
'
,, 1:
SM2
Ill U
I\,l,,, , ,,,,
S ta ti c Mo d u les
Keep Di sc a rd
•• ••
• •
I'
• •
Dynamic 11/1 ~,i j tl h!s 1
111
1 •• ••
Dyruuni~ Modules~l;i'.Jb~~ei~dules are pieces of code that can be loaded and
., '.. unloaded into the 'kem~l t1p,on de111and. They extend the functionality of the
1
I 1I
l
St<ltic Modules Dynan1i c
Modules
Keep Discard