0 ratings0% found this document useful (0 votes) 96 views5 pagesAnatomy of The Linux Kernel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
developerWorks.
Anatomy of the Linux kemel
History and architectural decompostion
Tin Joes, Constant Engineer Emulex Cap
‘Summary: The inate the care of lage nd comploxoperaing stom and
‘tate huge, ia wal panaedin ame faudeyetere adie. ne ou
‘Selre ne goneral stuck fe Lnurkemeland gti fe mar sober ard
‘Sreiatacs Whar posse you ge Its ach artles tp youd deeper
‘Dat: 050 2007
et nord
‘Ao mailto [sss Jananene Posuquese
“Tags forts artel:erainry, rosie, karl inac
@ragttst 1 Update my a inter
(een erste)
Guan atthe god this atele wn intod.ce jou Lnuckame and ators achisctro and sie companes, acs
inackomel arenes fom 3000 fst ae al sae te
‘rar autre, Tn Ln sont sorlon in cent, ois raduton i ntesbaust, Use e pars
Statin tht of unkema atay ho okat
‘harcore gin
Ashort tour of Linux history
We Lsuxis aablyne most popular open sours opereng
peti 6830 es
(arnmerts 1 (Vw rad corners
FRC SCO H Prag ag (ose on 740 es)
ooo
Aenrtar of Urothetny
nor iL? sty t oa
‘nen aor yasmin tree of i
Sferarng sje nieve osming regrrenes,YsAe toby retoad PalLiouas an peang Fresrofetrest ta Una
elopssen tatarevaranmentehemmrve gage Te Semis etad binsonecacys Lat arin
faokefanpaaingsjiom meant Pal nyere apicason ang SPers.a8"GNULLnx”Tereason bends Pa Cher
reser cause ea lg andomerivedoate tame. Eady UPURls e keel tan opening ee Thewae 01
pursing tons wwe Sewopesin te 1850s oprowan aaineer SMGeateepions Patmake Pe peringaystim
eclopmerionersnts ample ise ie Gero isor teehee Be GNU ote Fr eamnpl he fates
Grout Seirus dewtopeserve taNTovanshe, ——whdowing ston compli rtf cha,
Poem non Sam (ejomelgesoyNathamescn — SEtlopment ods, ets, tes, andthe
See Spline exat ouside the kere may of hen
ecUsctnre Fortis eason marjconase | My deve eommunty
“Unoca are appropiate name ane peat
pete ie hacer enor
Inthe 196, Maeeachsts het of ctnoogy MT) anda host
‘eonpanies deveepesanesermortal esraing jo calls
‘tes orhipiens infomation and Comgutng Senin re
stheiatgers tise
in Smctbocacie cs eat ern iyi
pedo fies eps Saou cpeargoyeenn we
fatdedea Uns senate oprgcnnas Rela brains denpatatenetonomala ss
Scatter cae eon pate one
Tey een eee reo comedian nin SLND ales errata NOY atone
Toaatatcnatcs Riou sacs owatonna aopente nauriocay
iain oases oo
eS ity tr ne ee we
a fi i pis oe
© ssrow fem ene Tse e
: fps wie
8 ame rat
ar tat Se aT aa Ste ne mt sn
Linu quickly evolved fom a single-person project loa world-wide development project imolvng tnousands ofdevelopers.One architecture stan cloud
Preterm rey rome errno ae noel Ee eae
‘al wes pected tor commer epltaion, nd ls Snefiad tam tho use=spacedeloerarl f CAU pest
(ctrecta Salman whose sous vas ta coe Lesher) ve slowed ute appestons ssh ae be GNU
Compe Catoctan (G0) ae aro shal sopp
(etaenee snd 2 design
covekgre cp
sen(scunst calpse
gereal_ pro. gr
# Backtotep
Introduction to the Linux kernel
Nowontn ahighatuteeckathe GNULinxcperaing estom achiscure ucentirkabewtancperaing system foe greenies tm
Toe ae shown Figure 2 tee oe hve
jag fectnao,. jnserit
Fare 2 The futomrtalarcitctr ofthe MUL operating system sey BE Ben fa
Web2ert linux stipe
open source parry pat
ales performance pa
— PrP php npertex
progarming python mad rst
Eo
Bs
| ==
coy reas ecerae
= scanty rcs serene
am feo. sap. sep long
Sos ponnonaniers
wo va 2
‘8, doe
wrabservens wipes
‘erotet socom
‘Atthe top is the user, or application, space. This is where the user Methods for system call interface (SC!) soa el ps
Pei Pe nanan ace SEPRERE RONEN SPS. ost archicheisntaschanas whats ay
‘Shown Fp? Foroampi be mecanam 9
“her's algo the GNUC brags pode system whch selon cas are nd faneonng Fo he
{aliaies el canract fkonel and pros he Ur space he kerel sce} ean er ‘iw oui
‘radios fansten wean ewseapaceappon and schsure Newer coral poossing ns (CPUS)
Tesamel Thais mpotae bocce ba konelandse'apalcalon Wal rouse supp fer wanton sso 3
‘caipyatrel pruaed atone space ewhiseachieu= moreoficestintrs pres ha loo i86 processors | deeper ro Linux on
Sac proces aonpioa Is an seul adress space fs kerl alse easel 009 ethos. frelon
Stn ang aun sora Perma ran suthe
‘TheLinatkerl canbe hte destino tebe ross lees. Ath pis he sso cal rear, wich mpleens pw basic ~ No Ue
Aurore suehasroacand wits. Bel De eso cal otc be rel de, whe can boar FAYED OTS has acca
‘hearer repandentkenel ads Sos common al he poossorardvncres soppy ix Sloe re
tis te archiocr-copendet code whch fms whats mere cormenlycalle a BSP (oar Suppet Pakage). TSO Cyan scan
Sones as tho prostate ard plaformsposte code fr te gan archecr
¥ Backtoup ~ woth tara ar)
Properties of the Linux kernel ane
‘en cacusing restacie flange and complexes ou ca ve he syte om many perspectives. goalotan > Ss
‘rcitecual ecanpoiton so pode a oy beta nderunda sou, ants wal wal soho
‘Tre Linucttralinploments bet otirgoranechiciralatraaes a hilo and tours he eras
Inyred ito rubato dist se ete nacre car Soed mons baene hanps a oe bae
"Serio ro tama T flex om am.rokenol rcvacire whe te kerel proves baie serio uh ‘tapi Modena
‘Svraricaton tO, ard maroy/ad process managorenansirarspocte sons ae pages inl micoserellyt. Santer Power Stems
acs. ovn aarages, Bt ster dear otal eb
Carina, he inal has ozone actin ms ofboth meron CPUs, 5 wo as eee sate Bitte
‘etierenin ape of gun sma corto if pray Lnuxear becomes ron ahge root
Ufproceston se ators wh rer: roca cosas ad neets.One orale we lyr urna on
‘ects wha memaymeragsret uit ht) a8 wo a hase Pa powde ro The irate inser
rowaoe rn MAI suport Soe he Sct seston omer dea ~ tganton oases tate
‘yar eles pn
Ftackiotp Seiya
Major subsystems of the Linux kernel sitrenmtelal
Now tt kat sme maar componerts ie Linaxkena sig ts beakonn shown in Fgue 3.s age Serco sae
Shows
Wes.
Systemcalinterface
‘The Solis ata ln al proudes he mene lo peti fucon als fom usr spe io the eel fe ase
preuusly is rtrace san be rence desert ts he same proceas arly The Sls seksyan tates
[irasnal maliplong a domuseing sence 2 cond e Sclirtemertaonninunkendl a wl
‘rciecre-dopenen partors Js Nore dels rhs oon lable he ess sean
Process management
Process managements ocuseson te omcitonctproosses.In Whats kernal?
‘eee ao ae caled foods on reesertan aa
Mrulanton ote pocester (essence daa scx andCPU PSShownInSaue akeel ealyretirg Tore
Web2PD
‘umd In WiRCPOFCot co‘egies. userspace, tem process Wcahyused, rush RANE reaurce manager near pe resource
TheUnoxinplomertaon dos ntsesaraethe wo cones aged sa proess menor orhervae Ge¥oe. he
(procassun ar teas) The kone praises ev apes Kem maregee end lv acca oe esouce
rogram stracs Pen reugh he Sclipceateanewprecess _Seisenmaliplecarosinguters hin bs hea
fork ee, orPertable Operating System hleface [POSH sed in user space),
furesons) sta process fel ext and caret ae
Stns betwee he gal or POSIT at)
‘Asoin procoss managonects he need share the CPULstean he ace reads, Th konelimpmets ane
Sched agortm Bal operas nears tno rogaress ofthe runbe’ of toads weg he Mo CPU, Tis eel bo
{ii sehedlr conan hate same amour tkon schedule oe oad ax his sent many. The Ol)
Stheklr also supports mutate pocoscors (alu Srnec MuroceesPg, SVP), can dfs process
‘managomort source Anus anéaocre-epordor sous nae You can ear mre sb
Alpert ine Essar socton
‘Memory management
‘easing esac Pats manages byne xmas mamon Fo elcony gerbe way al ehadasre manages
‘ta meno; memorys medina oe ced gos cK sural ohne) Louise te ears
‘ranagetta alana morary a: wel ae De harcware means ssa ané wal mapas
‘xtmamoryranagomartis much mor than manoging KB brs Linxpros absacon oe KB bors, Such 3 ho
Sab alos: Tis momoryranagonor{scheme uses MBs a ls oss bullpon locates sruros For wii
Keing Fackot wich pages ar paralysed, and emo Tis alow te scheme areal ro and sk se
nares of ogreal ston
‘poor mle ver of maar there are mes whe th ualable marorycan be eshte, Fore reason pages can
bemotegoutatmemaryandara he dhe proces i called snapping because he papes are swapped fom memory
(rine nari u caine ba momorymanagomertcouces noe
Virtual file systern
“Theva te sytem (VES) an iferesing aspect oe Lack because proves commen ieraeabiecon fr
Ae oma The VES powdesmscing bye botwnn' bw SCI a fl sto suposed ye or fe Fre),
Fete The VIS poids switching between users and fle systems
‘vatop othe \ESis accra #Plabsractonofuncons suchas open, dose read and wri. the baton ofe VES
{hoi sjlem aostacors hat sotns hon ho uzper lyr ncters ar memes. These are lane he gh He
Sjlom (wien ower S0 ott, Yu car in hoe ys sources Ta
‘Below hte stators te ber cache, wich povdes a conmon sla uncons ie fl sstam ler Independent of
‘ryparteuarfle yar), Ths acing lye optnaee aceasta Pa yal dees ty keeping dla taunt shortte
(o’Speneney rod ahead so hate cas alle when needed Below habe caze are deuce des, Whee
Inclement ne ase ore parkas psi doves
Network stack
“Thence stack by dosin lows a layed architecuro modelos aloe proooks Romohes Roca Pal thslriemet
Probus cor terre ts bal ne arpa polos (mest cmon Pe Tansmssin Col
Pos. or TOP) oie TOP she soca aa wre sed aur fe SL
The sockets lajersthe slandauA” tthe netwatingsubeyston ar prods a use ntarac oa arity natvering
Doct, Ram aware ascess oP polos! disunts (FOUs) andupo TCP ana ha User Dstagram Pte (JOP) he
Sout ljer rondo a standrdzed way’ manag cnnectns and move dala lveen endpams ou can nd he
etwaring sources in hekara Aunt
Device drivers
Thevastmaoty tte sours cate in e Lnurkora ess indevce divers hat make aparcar hardware dove usable,
‘TroLinuraowrn ten poudes a oni recy hes itor isos ye ara Sovens at re spies urs ae
‘Bloat 20 seal an son Youean fod doa drier soos smears
‘Aechitecture-dependent code
ste much of Linas indapendet of he aria on hich ru, he ae element a mus creda facie
lorrarmalapeaon ant fy Te nar abr delnes bs ns. dependengrton tee
Source cond arr of susdredares aoe spate te ance elect orn ie SSP Fas pel
Seah, eS8s areca used. Each arco suc cone a hare’ ae ubarertos Pallonis ova
Pear asc he aol such a baa kone nemoryrstageral ard Oe. Yascan nbs rece seperdert
‘in re
1 Backtotoy
Web2,Interesting features of the Linux kernel
It porsbllyandioconcythe Lnaxkomel werent enough, treées some cher eas that couldnt cssiosin
‘hopreous decompsiton.
Linx tenga production cps stom ard open sous, eattst best naw plod ard adtancements of ose
Linas ato a dumic ena suspatng Me sion arom sofware comsarat. on ey Theta cals
‘jars ndate keel modules, anaheyean be nse abou whose rae hes paralr Souci fun
‘equtngte module) oa ayeme ye wer
‘recent actancoment of nus its ue as an open sam fo abr opting stems (cles hypendso Roce
‘nodfeatona fe kovol vas mae ail fe Kener Sesed Vital Nacho (Wh, Ths medeazon erable aw nos
Uber space Pal alone ober poratng selon trun abow fo KWrables oro hadaton turing aneborrstaras of
LU Mosats Windows cn alsobe vlna Tne olyeonevar's Bato undoing processor mustsippat Pe new
anton returns, Soho Saari socio ore ermal
# Backtotoy
Going further
“Tia atdeustscracedtne srt of he Linacre artis and ares and capes, eu can heck ct te
Documentation cacy Bats pron uy Lnurdstibstn fr dealed woman seoe covers oe kar Ba
Suto check oth esse stan ah re oe ae or te dla naraon abot ary ties,
Grewsved ere
Resources
+ The Usa deserter fe GAU GPL ht cove he natn nd moto uso aplicaons prodded whit
Bio cercbosi less rensicho for ote GA cals bw ser OL),
+ AUG UND. Laure cowradn Wied lor wh a delle amie of he operating sys
+ The GUC Lar ogi is he implomeraon fhe saranda ts used i be GNUL operating syn,
Si ae het zoomed oping slo,
+ Clnuriaapartol te Linuctral ht can om o los Balik an MU, Tis ons he Lineman 2
‘ey mbes parm, sch 2s he Mca Drago rocssorwodin he Paes Possoral Dg
etstars FON
+ Yorn onmand ins Linas cal (Soopers, Mirch 2007 coms fw $0, which animate
‘he nurkoral wt vesace suport fom ite al abies non cls bowen ur te and kone
+ Tye aLincacstl”(eeloeA ss, dure 2006) pores fe rew Ot) Scheduler inrooatin Lina tats
‘cir sales wha re ruber of rocasses (eens) areas astartngo of SVP sss.
+ Mousse Linacamel usin hee lesan (Soalopeas, Mar 2006} ook at ep: lesen, whichis
aval sys at rou anova wayer userspace aopleatns comma wih ral Ts lo
‘mons ros as Wea loadablktel modes.
+ ‘Banarclnc Pts dasstons wos (demlopanns, 2008 das rb VES Bal ans Lito
‘suppor avai oeeret ie sytem trough commmaninsen. Ths same ites uses ar ps of
over suchas eos
+ Tuite Linas” (oelper es Ny2006) oxarines te Lucho procs ich ks car ot
Srngngup a Lnaxayetom ands he some sie process whahasyourebontg Pom he Sak hope USE monory
‘ice of tr he neuer
+ “Luca ate te seu” (GoloperosJ/2006) ope hel Ae bic lal he oot
cess for he syed medium fom hose both.
+ uternetntina win SCT (eelgperrs, Fetrsry 2008) coves one fhe mostinastg netwarng poles,
‘tear CartaTansmisionPotoed en operas ne TCP bala aro fuse eto Sa
‘meseaing mul-tomin and leaning Lele BSD, al operating ito ye tested a
ator tans
+ ‘Moaumthe nul ocala” (eelopeitioas, Me 2007) eners ane fhe moatirresing aspects of memay
‘maragerenl nina Be sla alco. Tae mecaniem oighaied San bf ena enalhame nade be
+ “Wal Lu deveopantions, Desrier 2005) shows how Ltuxcan ke anlage of procistore wih wedi
ees
+ “Linucanda nine mts (dewdopeth, Mich 2007) asses how Lnuxcan also tke abaniage of
pocensors al flr dipdowd mols,
+ eso inuxkral Va Mn (eloped, pf 2007) core a eee toon izon
|p ere whic ws Lnavemel oa hyperisor br oer Wales opera ts.
+ heck ut Tn book Gnu aaten Fragrenning fr more imation on paying Lut use space,
+ nie daslsorns Leute, ted marred br Leutdedepes,edudng Linas a wall ao
Web2,(et procs at echretoios
+ une Sr Lux a we DVD stoning he aos val sofware fer Leuttom DE2E, Lots, Retonl,
Thal an VieoSenere.
+ ty tal stars, ata fr dnicad dre tom detent, bald you not delopmere pret onLin
+ Gotinohodinthe velonatns commun rough ou deslope Hog, nuns, pasts. and communities in
urnew dealoperiors sooo,
About the author
Ten Jonas san embossed sotwaeerghser and e stor of GUL Agpeaton Progamming. Al
2oplton Programing (now ts saan eaten and BSD Sockos Pegg am a aangog?
‘erapacte. ie enineag backreure ranges form he devdepretct kara rgeosynorous
{peszerat embedded ejtens arcvecure and neering praocle developmen Consutrt
Engineer for Emdex Cap. Longmont, Clersdo,
‘Comments
‘eonments | Adicanmsat arena coer
your commis verge an
Fey tga 0 2 Darter 208
cktotee
‘eters | Wooler rs ns coon
er)
Web2