<<

& ' prtn ytmCnet 21Slesht n Galvin and Silberschatz 22.1 Concepts Operating • • • • • • • • • • • Security Structure Network Interprocess Output and Input Management Memory Management Modules Kernel Principles Design oue2:TeLnxSystem The 22: Module tag">c 1998 $  & ' prtn ytmCnet 22Slesht n Galvin and Silberschatz 22.2 Concepts System Operating • • • • • entire code. tcnrnmc xsigfree existing but much original, run entirely can is it kernel operating-system Linux core The thsbe eindt u fcetyadrlal ncommon on reliably and efficiently run PC to designed been has It the over exclusively from almost Internet. users corresponding many world, by the collaboration around of all one been has history Its of goal by compatibility. design 1991 major in the kernel with self-contained Torvalds, but Linus a as developed First standards. iu samdr,fe prtn ytmbsdon based system operating free modern, a is Linux adae u lorn navreyo te platforms. other of variety a on runs also but hardware, cmail prtn ytmfe rmproprietary from free system operating -compatible History UNIX otae eutn nan in resulting , UNIX UNIX c 1998 $  & ' prtn ytmCnet 23Slesht n Galvin and Silberschatz 22.3 Concepts System Operating • • • iu . Mrh19)icue hs features: new these included 1994) (March 1.0 Linux the system. only file supported and support, device-driver limited extremely eso . Mrh19)wstefinal the was 1995) (March 1.2 Version 08-optbeItlpoesr n on on and only ran processors networking, 80386-compatible no had 1991) (May 0.01 Version – – – – – – upr for Support upr o ag of range a for Support system file Enhanced xr adaesupport hardware Extra access disk high-performance eiedie upr o running for support Device-driver programming BSD cmail oktitraefrnetworking for socket -compatible UNIX h iu Kernel Linux The sstandard ’s SCSI otolr for controllers TCP/IP IP ewrigprotocols networking PC vra an over ol iu kernel. Linux -only PC adae had hardware, c 1998 $  & ' prtn ytmCnet 24Slesht n Galvin and Silberschatz 22.4 Concepts System Operating • • • ytm,adfor and Sparc systems, Sun processors, 68000-series for Available te e etrsincluded: features new Other eesdi ue19,20addtomjrnwcapabilities: new major two added 2.0 1996, June in Released – – – – – – tnadzdcngrto interface configuration Standardized demand. on modules of loading forautomatic and modules, loadable handling between for dependencies threads, kernel internal for Support Improved code memory-management Improved upr o utpoesrarchitectures multiprocessor for Support 64-bit port fully Alpha a including architectures, multiple for Support TCP/IP PC performance n oeMcsystems. PowerMac and iu 2.0 Linux c 1998 $  & ' prtn ytmCnet 25Slesht n Galvin and Silberschatz 22.5 Concepts System Operating • • • • iu ewrigamnsrto ol eedrvdfrom 4.3 derived were tools networking-administration Linux community. Linux the by provided improvements with fpbi ie ciga efcosadr repositories. facto de as acting sites number ftp small public a of with of Internet, network the loose over a collaborating by developers maintained is system Linux The return. in Linux from code borrowed h ansse irre eesatdb the by started were libraries system main The otaeFoundation’s Software prtn system, operating iu ssmn ol eeoe spr fBerkeley’s of part as developed tools many uses Linux BSD oe recent code; h iu System Linux The MIT BSD sXWno ytm n h Free the and System, X ’s GNU eiaie uhas such derivatives project. FreeBSD GNU project, have BSD c 1998 $  & ' prtn ytmCnet 26Slesht n Galvin and Silberschatz 22.6 Concepts System Operating

• • • • of common packages ready-to-install and and installation utilities, system management system, Linux the include al itiuin included distributions Early management. advanced package the include into distributions files modern the places; all appropriate unpacking of simply means by a packages providing these managed distributions first The aiu iu distributions. Linux various The respectively. sources, noncommercial tnad rcmie eso akgs or packages, of sets precompiled Standard, RPM oua itiuin rmcmeca and commercial from distributions popular are UNIX akg l omtpriscmaiiiyaogthe among compatibility permits file package tools. iu Distributions Linux SLS

n Slackware. and

distributions e Hat Red , and c 1998 $  & ' prtn ytmCnet 27Slesht n Galvin and Silberschatz 22.7 Concepts System Operating • • ies ( License iayol product. binary-only a o aetedrvdpoutporeay software the under proprietary; released product Linux, derived of the derivate own not their may creating or Linux, using Anyone Foundation. Software h iu enli itiue the under distributed is kernel Linux The GPL ,tetrso hc r e u yteFree the by out set are of terms the ), iu Licensing Linux GPL a o erdsrbtda a as redistributed be not may GNU eea Public General c 1998 $  & ' prtn ytmCnet 28Slesht n Galvin and Silberschatz 22.8 Concepts System Operating • • • • • mlmnstestandard the implements iu sdsge ob opin ihterelevant the with compliant be to designed is Linux standardization. and efficiency, speed, are goals design Main h iu rgamn nefc dee othe to adheres interface programming Linux The t l ytmahrst traditional to adheres system file Its eatc,rte hnto than rather semantics, achieved have distributions official Linux two least documents; UNIX iu samlisr uttsigsse ihafl e of set full a with system multitasking multiuser, a is Linux cmail tools. -compatible POSIX certification. einPrinciples Design UNIX BSD behavior. ewrigmodel. networking UNIX eatc,adi fully it and semantics, V4UNIX SVR4 POSIX c 1998 $  & ' prtn ytmCnet 29Slesht n Galvin and Silberschatz 22.9 Concepts System Operating management programs System opnnso iu System Linux a of Components Loadable kernel modules System Shared Libraries processes programs utility User c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.10 Concepts System Operating • • btatoso h prtn system. operating the of The components. between other is all distinction and important kernel the the code; of bodies main iemost Like – – l enlcd n aasrcue r eti h same the in kept space. are address structures single and code kernel All . the of resources physical the enlcd xctsin executes code Kernel opnnso iu ytm(cont’) System Linux a of Components kernel UNIX srsosbefrmitiigteimportant the maintaining for responsible is

mlmnain,Lnxi opsdo three of composed is Linux implementations, enlmode kernel ihfl cest all to access full with c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.11 Concepts System Operating • • aaeettasks. management code. The kernel of privileges full the need that not functionality does operating-system which the and of kernel, much the implement with interact applications which through The opnnso iu ytm(cont’d) System Linux a of Components ytmutilities system libraries system efr niiulspecialized individual perform en tnadsto functions of set standard a define c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.12 Concepts System Operating • • • • • he opnnst iu ouesupport: module Linux to components Three built drivers a device with extra in. up any set without be kernel, to minimal system standard, Linux a allow modules Kernel htcudntb itiue ne the under systems distributed file be or not drivers could device that terms, and own their to on parties distribute, third allows interface module The file protocol. a driver, networking device a a or implement system, typically may module kernel A kernel. the of and rest loaded, the compiled, of be independent can unloaded that code kernel of Sections – – – oflc resolution conflict registration driver management module enlModules Kernel GPL . c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.13 Concepts System Operating • • • s,adwl nodi hni sn ogratvl needed. actively longer no is it in when still it is unload module will loaded and dynamically use, a whether the see queries to regularly kernel also it modules; but unloaded, requested, currently loading manages requestor module The ouelaigi pi notosprt sections: separate two into is loading Module to kernel. the them of letting rest and the memory into modules loading Supports – – adigsmosta oue r loe oreference to allowed are modules that memory symbols kernel Handling in code module of sections Managing oueManagement Module c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.14 Concepts System Operating • • • eitaintbe nld h olwn items: following the include tables Registration or to . added any be at to tables drivers these allow from to removed and routines drivers, of known set all a of provides tables dynamic maintains kernel driverThe new a that kernel the available. of become rest has the tell to modules Allows – – – – iayformat Binary protocols Network systems File drivers Device rvrRegistration Driver c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.15 Concepts System Operating • • h oflc eouinmdl isto: aims module resolution conflict The driver. another from by resources use those accidental protect to reserve and to resources drivers device hardware different allows that mechanism A – – –

eov oflcswt utpediestyn oacs the access to hardware trying same drivers multiple with conflicts Resolve drivers Prevent hardware to resources access over clashing from modules Prevent autoprobes oflc Resolution Conflict rmitreigwt xsigdevice existing with interfering from c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.16 Concepts System Operating • • • Under ne iu,poespoete alit he rus the context. and groups: environment, three identity, into process’s fall properties process Linux, Under a program. of single context a the of track to single maintain must system operating the rcse n h unn fanwpormit distinct two into program new a operations. of running the and processes UNIX – – e rga srnatracl to call a after run is program new A The rcs aaeetsprtsteceto of creation the separates management process UNIX rcs nopse l h nomto that information the all encompasses process a , ytmcl rae e process. new a creates call system rcs Management Process execve . c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.17 Concepts System Operating • • • al ecmail ihcranseicflvr of flavors specific certain system with that compatible request be to calls libraries emulation by primarily Used certain of semantics calls. the system modify slightly personality can associated that an identifier has process each Linux under Personality files. and resources system access to Credentials another for wait or modify, , process. to application call an system when a system makes operating the to processes specify n n rmr group or one and rcs ID Process o rdtoal on on found traditionally Not . (PID) ahpoesms aea soitduser associated an have must process Each . h nqeietfirfrtepoes sdto used process; the for identifier unique The . rcs Identity Process ID htdtrietepoessrights process’s the determine that s UNIX ytm,but systems, UNIX . ID c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.18 Concepts System Operating • • • h rcs’ niomn sihrtdfo t aet n is vectors: and null-terminated parent, two its of from composed inherited is environment process’s The ai,rte hnbigcngrdfrtesse sawhole. a as system per-process the a for on configured set being be than can rather that basis, system operating the of customiz- ation a provides mechanism environment-variable The system user-mode the of software. components means to flexible information are passing children of process’s a by variables inheriting and processes among variables environment Passing – – h niomn etri itof list a is vector environment itself The program the of name starts conventionally the program; with running the invoke arguments to command- used the lists vector argument The eta values. arbitrary textual with variables environment named associates rcs Environment Process “ NAME=VALUE ” that pairs c 1998 $  & ' prtn ytmCnet 21 ibrcazadGalvin and Silberschatz 22.19 Concepts System Operating • • • • hi ne noti table. this into index their hnmkn file making When far. so lifetime The its in process the the by and consumed process, resources each total by consumed being currently resources maintains kernel The process the needs scheduler restart the and that suspend information to the is it context; process The any at time. program in running point a one of state changing) (constantly The l table file ceuigcontext scheduling sa ra fpitr okre l structures. file kernel to pointers of array an is I/O rcs Context Process ytmcls rcse ee ofie by files to refer processes calls, system accounting stems motn ato the of part important most the is nomto bu the about information c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.20 Concepts System Operating • • • otnso t rvt drs space. address private its of contents drs pc ob aldwe pcfi inl arrive. The signals specific when called be to space address The file new for here. used stored be are to searches directories default and root current the files, existing context the file-system lists table file the Whereas ita-eoycontext virtual-memory table signal-handler rcs otx (cont’d) Context Process ple orqet ooe e The files. new open to requests to applies ensteruiei h process’s the in routine the defines fapoesdsrbstefull the describes process a of c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.21 Concepts System Operating • • • itnto sol aewe e hedi rae ythe by created is new a when made only is distinction A parent. its to as happens space that address process same new the a simply and is processes thread for a representation threads; internal same the uses Linux Using xcl hti hrdbtentothreads. two between shared is what exactly clone – –fork loe osaetedt tutrso t parent its of structures data the share to allowed context process clone ytmcall. system rae e rcs ihisonetrl new entirely own its with process new a creates rae e rcs ihisoniett,btta is that but identity, own its with process new a creates ie napiainfiegandcnrlover control fine-grained application an gives rcse n Threads and Processes c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.22 Concepts System Operating • • • nenlyo eafo eiedriver. device a execute of that behalf tasks on and internally process running are a that by tasks requested both encompasses tasks kernel Running tasks. kernel various the includes of also running scheduling the and Linux, running in the processes, as of of interrupting thought normally is scheduling While system. operating h o fallocating of job The CPU Scheduling iet ifrn ak ihnan within tasks different to time c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.23 Concepts System Operating • • enlsciia etost u ihu nerpinb another by interruption section. without critical run the to allow sections will critical that kernel’s a requires synchronization Kernel eus o enlmd xcto a cu ntoways: two in occur can execution kernel-mode for request A – – o htinterrupt. that for eiedie a eie adaeitrutthat the hardware causes a deliver may driver device A occurs. for fault implicitly, or a call, when system example, a via explicitly system either operating an service, request may program running A enlSynchronization Kernel CPU osateeuigakre-endhandler kernel-defined a executing to c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.24 Concepts System Operating • iu sstotcnqe opoetciia sections: critical protect to techniques two uses Linux .Tescn ehiu ple ociia etosta occur that sections critical to applies technique second The 2. .Nra enlcd snonpreemptible is code kernel Normal 1. – – nitrutsrieroutines. service interrupt in ocretacs fsae aastructures. data of shared risk of the access without concurrent proceed can kernel it the that section, guarantees critical a to during hardware control disable interrupt processor’s the using By ob eundt srmode. about user is to control returned and be completed to has call system the once xctn enlsse evc otn,tekernel’s the routine, need is service process system a kernel while a received executing is interrupt timer a when enlSnhoiain(cont’d) Synchronization Kernel resched a ssts htteshdlrwl run will scheduler the that so set is flag c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.25 Concepts System Operating

• • nerp evc otnsaesprtdit a half into bottom separated are routines service Interrupt section’s critical the duration. for entire disabled interrupts to having sections without critical run long allows that a architecture uses synchronization kernel Linux’s penalties, performance avoid To – – – eetdbto avswieeeuignra,foreground code. kernel normal, executing disabling while for halves mechanism bottom a selected by completed is architecture This never halves themselves. a bottom interrupt by that enabled, ensures interrupts that all scheduler with miniature run, is half bottom The runs and routine, disabled. service interrupts interrupt recursive normal with a is half The enlSnhoiain(cont’d) Synchronization Kernel

. o half top n a and c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.26 Concepts System Operating • • hnatm-hrn ceuigitrutoccurs. interrupt scheduling process time-sharing another by a preempted when be always can processes User same the at level. running lower code a by higher or interrupted a be at never running will code but level, by interrupted be may level Each srmd rgas(preemptible) programs user-mode enlsse evc routines service kernel-system otmhl nerp handlers interrupt bottom-half o-afitruthandlers interrupt top-half ntpreemptible) (not nerp rtcinLevels Protection Interrupt nraigpriority increasing eraigpriority decreasing c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.27 Concepts System Operating • • • ae . based o iesaigpoess iu ssaprioritized, a uses Linux processes, time-sharing apply. For to algorithm which defines class scheduling process’s A iu sstopoesshdln : process-scheduling two uses Linux – – – – hsceiigsse uoaial roiie neatv or interactive prioritizes automatically system priority. crediting its This and history process’s the both in factors h rdtn rule crediting The I/O eltm loih o ak hr bouepirte are fairness priorities than absolute important where more tasks for algorithm real-time A processes scheduling multiple preemptive between fair for algorithm time-sharing A budprocesses. -bound rcs Scheduling Process rdt := credits credits 2

+priority credit c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.28 Concepts System Operating • nadto oisshdln class. priority scheduling a its has to process addition each in cases, both in classes; scheduling iu mlmnsthe implements Linux – – – qa-roiypoess trn h ogs-atn one longest-waiting for the priority; runs highest it the processes, with equal-priority process the runs scheduler The iesaebtenthemselves. between automatically time-share that priority equal so queue, of scheduling processes the round-robin and of while end a the after to preempted moved be will process round-robin A FIFO rcse otnet u ni hyete xto block or either they until run to continue processes rcs ceuig(cont’d) Scheduling Process FIFO n on-oi real-time round-robin and c 1998 $  & ' prtn ytmCnet 22 ibrcazadGalvin and Silberschatz 22.29 Concepts System Operating • • requirements, synchronization nonpreemptible kernel’s the preserve To on parallel processors. in execute separate can threads or processes separate pnok htol n rcso tatm a execute may time a code. at kernel-mode processor one only that , iu . a h rtLnxkre osupport to kernel Linux first the was 2.0 Linux ymti Symmetric SMP moe h etito,vaasnl kernel single a via restriction, the imposes SMP hardware; c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.30 Concepts System Operating • • eoympe noteadessaeo unn processes. running of space address the memory, into mapped virtual handling memory for mechanisms additional has It small and memory. , of of blocks groups pages, freeing and with allocating deals system memory-management physical Linux’s eoyManagement Memory c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.31 Concepts System Operating • • • ottm)o yaial vatepg allocator). page the (via system dynamically during or memory time) of boot area statically contiguous either a occur reserve kernel (drivers Linux the in allocations Memory pages. physical available h loao ssa uses allocator The request. on pages it physically-contiguous pages; of physical ranges all allocate frees can and allocates allocator page The – – – esbiie notoprnr ostsyterequest. the satisfy will to region partners free two larger into a subdivided then be allocating region, by free satisfied small be existing cannot an request memory small region. a larger If a form up, to freed combined both are are they regions partner allocated two Whenever adjacent an with paired partner is region memory allocatable Each

aaigPyia Memory Physical Managing buddy-heap loih oke of track keep to algorithm c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.32 Concepts System Operating • • drs space: address The required. as their disk or to disk out from back pages and swapping those demand, of on loading memory the virtual manages of pages creates It process: The – – h adaepg alsfrteprocess. in the stored for is tables which page space hardware address the each of view physical A space. address the of page-aligned subset continuous, nonoverlapping a of representing set each a regions, of consists space address The space. layout address the the concerning of instructions describing view logical A VM VM aae anan w eaaeveso process’s a of views separate two maintains manager each to visible space address the maintains system ita Memory Virtual c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.33 Concepts System Operating • • h enlcetsanwvruladesspace address virtual new a creates kernel The ita eoyrgosaecaatrzdby: characterized are regions memory Virtual .Uo raino e rcs ythe by process new a of creation Upon 2. .We rcs usanwpormwt the with program new a runs process a When 1. – –

call h einsrato owie pg hrn or sharing (page -on-write). writes to reaction region’s The o eincm;rgosaeuulybce yafieo by or file a by backed usually ( are nothing regions pages come; the region where a from for describes which store, backing The demand-zero ita eoy(cont’d) Memory ) fork ytmcall system system c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.34 Concepts System Operating • • oyo h xsigpoessvruladesspace. address virtual process’s existing the of copy with process new a Creating virtual-memory with regions. space address the populate program-loading new,routines the a space; given virtual-address is empty process completely the program, new a executing On – – – ae fmmr nteradesspaces. physical address same their the in share memory child of and pages parent the fork, the After being covered page each incremented. child’s, of the count reference into the directly with copied child. are the tables for page tables parent’s page The of set new a creates then h enlcpe h aetprocess’s parent the copies kernel The ita eoy(cont’d) Memory Virtual fork novscetn complete a creating involves VMA descriptors, c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.35 Concepts System Operating • • The for needed is memory the else. when something disk to out memory physical The – – ae aabc nopyia eoya needed. as memory physical into and transfer, back the data out pages carries actually mechanism paging The when. and write disk, to to pages out which decides algorithm pageout-policy The VM VM aigsse a edvddit w sections: two into divided be can system paging from memory of pages relocates system paging ita eoy(cont’d) Memory Virtual c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.36 Concepts System Operating • • hskre ita-eoyae otistoregions: two contains area virtual-memory kernel This own its for process every of use. space internal address virtual the architecture-dependent of constant, region a reserves kernel Linux The – – opitt n te ra fmemory. of areas other modified any be to can point entries to for page-table reserved its not purpose; is specific section any reserved the of remainder The code. virtual kernel to running physical when from addresses translation that simple so a system, is the there in every memory to of references physical page available contains that area static A ita eoy(cont’d) Memory Virtual c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.37 Concepts System Operating • • • • edn h edradmpigtescin ftefieinto file memory. the virtual of of sections regions the separate mapping and header the reading euti htpg en oddit hsclmemory. faultAn physical page into a loaded will being page page given that a in access result to only tries memory; program a virtual when into mapped are pages binary-file Initially, eea aeaindscin;the sections; page-aligned several h eitaino utpelae otnsalw iu to the Linux both allows routines support multiple of registration The file given the loading try an to when opportunity it programs; the loading function for each functions gives of table a maintains Linux ELF xctn n odn srPrograms User Loading and Executing fra iayfiecnit fahae olwdby followed header a of consists file binary -format exec ytmcl smade. is call system ELF n .u iayformats. binary a.out and ELF odrwrsby works loader c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.38 Concepts System Operating               Memory-mapped region Memory-mapped region Memory-mapped region eoyLyu for Layout Memory Kernel Virtual Memory Uninitialised data Initialised data Run-time data Program text Stack     Forbidden region the ‘brk’ pointer Memory invisible to user mode code ELF Programs c 1998 $  & ' prtn ytmCnet 23 ibrcazadGalvin and Silberschatz 22.39 Concepts System Operating

• • • irre nommr nyonce. system only the memory loads into it libraries because usage disk-space and memory Dynamic eeae utcnancpe featytesm common functions. same the exactly system program of every copies that contain is must linkage generated static of disadvantage main The libraries. its to linked ietyi h rga’ xctbebnr l is file binary program’s embedded the are in functions directly library necessary whose program A ikn smr fceti em fbt physical both of terms in efficient more is linking

ttcadDnmcLinking Dynamic and Static statically c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.40 Concepts System Operating • • • h Linux The aae h utpedfeetfiessesvaa the an is, via that systems layer, file different multiple the and manages details implementation hides kernel the Internally, n scmoe ftocomponents: two of composed is and oteue,Lnxsfiesse per sahierarchical a obeying as appears system file Linux’s user, the To – – ∗ ae fsfwr omnplt hs objects. those manipulate to software of layer A e fdfiiin htdfiewa l beti allowed is ∗ object file a like what look define to that definitions of set A

the files individual the

l ytmobject system file -object VFS

sdsge rudojc-retdprinciples object-oriented around designed is ita l system file virtual ieSystems File n the and UNIX ersnsa niefiesystem file entire an represents

semantics. file-object

( VFS ). tutrsrepresent structures c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.41 Concepts System Operating • • • ota tcnsbi an disk, submit on blocks can adjacent it physically that into so file a logically of place blocks to adjacent designed policies allocation uses Ext2fs disk their concern ffs policies. allocation and ext2fs between file. differences specific main a The to belonging blocks data locating for (ffs) System igeoperation. single x2sue ehns iia ota of that to similar mechanism a uses Ext2fs – – lhuh2bad4bbok r losupported. also are 1Kb, blocks is 4Kb ext2fs and on 2Kb size although in block allocations default its The performs units. file. it smaller a fragments; of use end not the does at Ext2fs blocks filled store partially with to or 8Kb, 1Kb files of of small blocks fragments in into files subdivided to being allocated blocks is disk the ffs, In h iu x2sFl Ext2fs Linux The I/O eus o eea ikbok sa as blocks disk several for request BSD atFile Fast c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.42 Concepts System Operating Allocating continuous free blocks Allocating scattered free blocks x2sBokAlcto Policies Block-Allocation Ext2fs Free block Block in use Bitmap search by allocator Block selected boundary Bit boundary c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.43 Concepts System Operating • • nd ubrfrec ietr n lsi contains. it files and persistent directory and each unique for a number define inode then must it within; contents proc r optdo eadacrigt srfile user to according demand on computed are The – – tit h eusigpoessra buffer. process’s places requesting and the form into text it into files, it these formats of information, one appropriate from inode. read directory is particular data a When file in particular lookup a a from perform read or is to inode operation tries what user just a identify when to required number inode this uses It proc utipeetadrcoysrcue n h file the and structure, directory a implement must l ytmde o aa ahr t contents its rather, data, store not does system file h iu rcFl System File Proc Linux The proc I/O olcsthe collects requests. c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.44 Concepts System Operating • • iu pisaldvcsit he classes: three into devices all splits Linux h iu eieoine l ytmacse ikstorage caches: disk two accesses through system file device-oriented Linux The

– – – – –

ewr devices network devices character edt upr h ucinlt frglrfiles. regular of functionality the support to need devices block needn,fie iebok fdata of blocks size fixed independent, subsystem nee ytepyia ikblock. disk separate physical a the cache, by buffer indexed the in cached is the Metadata with unified is system which cache, memory page virtual the in cached is Data lo admacs ocompletely to access random allow nu n Output and Input r nefcdvatekre’ networking kernel’s the via interfaced are nld otohrdvcs hydon’t they devices; other most include c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.45 Concepts System Operating • • • ufrcnet oadfo lc eiedriver. device block a from and to contents buffer The system. The a in devices disk all to interface main the Provide – –

tat sapo fbfesfractive for buffers of pool a as acts it tsre saccefrcompleted for cache a as serves it

eus manager request cache buffer block lc Devices Block aae h edn n rtn of writing and reading the manages evstomi purposes: main two serves I/O I/O c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.46 Concepts System Operating • • • • hc h enlmitisasadr interface. standard a maintains kernel for devices, the of which subset implement special which the drivers is device rule character this to exception main The the on passes device. simply the but to or device, request read character file a a to of request preprocessing write no almost performs kernel The hrce eiedie utrgse e ffntoswhich functions file of various driver’s set the a implement register must driver device character A fixed to access random data. offer of not blocks does which driver device A hrce Devices Character I/O operations. c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.47 Concepts System Operating • • •

ceuigsae and via states accomplished scheduling is kernel rather, the mode, within kernel communication with in communicate running to are signals with use processes not does kernel Linux The to available is occurred signal process. a carry a that cannot fact they the and Only signals, of information: number limited a is There via Like signals UNIX iu nom rcse hta vn a occurred has an that processes informs Linux , nepoesCommunication Interprocess . wait queue structures. c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.48 Concepts System Operating • • • sdi ojnto ihaohrinterprocess-communication mechanism. another with conjunction be in must used memory shared however, synchronization, space. obtain To address its into process region other that any mapped by has immediately that read shared be a can to region process one memory by written data of way any fast communicating; extremely an offers memory Shared other. the of at end read one be to can written pipe data the parent; its to channel communication The pipe asn aabtenProcesses between Data Passing ehns losacidpoest nei a inherit to process child a allows mechanism c 1998 $  & ' prtn ytmCnet 24 ibrcazadGalvin and Silberschatz 22.49 Concepts System Operating • • • rcse r urnl apn hmit ita memory. virtual into them mapping no currently if are even processes contents their remember objects Shared-memory object. pages shared-memory in persistent map a to from faults page direct mappings Shared-memory as region. act memory can memory-mapped file a a for as store way backing same for the store in backing regions a shared-memory as acts object shared-memory The hrdMmr Object Memory Shared c 1998 $  & ' prtn ytmCnet 25 ibrcazadGalvin and Silberschatz 22.50 Concepts System Operating • • nenly ewrigi h iu enli mlmne by software: implemented of layers is three kernel Linux the in networking Internally, Linux. for functionality of area key a is Networking – – – – – ytm,i atclr rtcl sdon used protocols particular, in systems, sApeakand Appletalk as tas mlmnspooosntv onon to native protocols implements also It ewr eiedrivers device Network drivers Protocol interface socket The for protocols Internet standard the supports It ewr Structure Network IPX PC UNIX ewrs such networks, UNIX operating to UNIX c 1998 $  & ' prtn ytmCnet 25 ibrcazadGalvin and Silberschatz 22.51 Concepts System Operating • ytmi h nentpooo suite. networking protocol Linux Internet the the in is protocols system of set important most The – – ICMP ntpo h otn rtclaebitthe built are protocol routing the of top On on anywhere network. hosts the different between routing implements It protocols. ewr tutr (cont’d) Structure Network UDP , TCP and c 1998 $  & ' prtn ytmCnet 25 ibrcazadGalvin and Silberschatz 22.52 Concepts System Operating

• • • • cescnrli efre yasgigojcsa objects assigning mask by performed is control Access vial ne Linux. under available efre hog h s fuiu uei dnies( identifiers numeric unique and of use the through performed cescnrlunder control Access users. authenticate to needs that component system xct—r ob rne opoesswt we,gop or group, owner, access. with world processes to granted be to execute—are PAM The

gid lgal uhniainmodules authentication pluggable sbsdo hrdlbayta a eue yany by used be can that library shared a on based is hc pcfiswihacs oe— rt,or write, modes—read, access which specifies which , ). ytm,icuigLnx is Linux, including systems,

( PAM

ytmis system ) protection uid c 1998 $  & ' prtn ytmCnet 25 ibrcazadGalvin and Silberschatz 22.53 Concepts System Operating • • ways: eetvl asacs oasnl l osm evrprocess, privileges. other some any to it file granting single without a to to client access a allows selectively that mechanism another provides Linux iu umnstestandard the augments Linux – – tipeet the implements It usto h ihso h fetv uid. effective the a of just rights grants the that of characteristic subset process a added has It and uid drop effective repeatedly its to reaquire process a allows which mechanism, euiy(cont’d) Security POSIX specification’s UNIX

setuid ae user-id saved two in mechanism c 1998 $