[go: up one dir, main page]

0% found this document useful (0 votes)
28 views19 pages

Operating System Notes - Compressed

os notes

Uploaded by

prmaex12
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
0% found this document useful (0 votes)
28 views19 pages

Operating System Notes - Compressed

os notes

Uploaded by

prmaex12
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
You are on page 1/ 19
}Speraling Sraleme ort iis ay yelom pond a a <_the Computer hardaase £ Cort-ols the | executian of all kinds of program ObjecHvec or goals of — opevatins stem - @ Convenience “BDEFFiciency G@ Ability te Evol | | functions 6f eperabing Byslem D Processoe _maneament IGsWeride managerand GY File “management. @MSecuaib. Ob accounting I > [ery pe ot as = @lBateh operaling — Syglem- 5 I@ath ts one of the | oldest opavoting IS pelarn i @ stn bakch operating System, Srebs with Slax need batched dogether by eperakor. run as a group (ena computer \[Sy-sher hatch) operating Syskem is ene where ms & dala dye eile together eC 2 | program in @ batch before ‘processing starts. (@ Advantages - Q@ Huge amount of data Can be processed efficiently. yathe execution of Sob becomes fast € [ovel) managed |@ Disadvan-+aqe - Mat js costly @ ab is ditticult bo debug prrogram. = fia ee Wee | Speoling - SPOOL ing. stands for Simultaneous Per’ phoma) Operation on line, j mh refers to ‘pulling dat of Various [te sebs ino buffer. la the mest common _ Speeling Sp- applica? is point spooling © spooling ts also use lat romole sites. © Advantage = the spooling apetedion Uses 2 disk as a Very tame bufters Disadvantage shee 3s an extra overhead oF mainlainig lable of Cand imag A for Processing dala 3) [multiprecessor OS ~ I A_mulliprecessor. os means the use of [Zuo ovr more precessors within a Sing] [computed sysbem + I) Mulpsecessing Means tmulkple CPUs — perform mere Shan one joh at one time. @ azupes of mulbprecessor Systems — Dasyrametaic LG) symmetric @Ahavantage ~ a} inereased Throughput by | jnereasing the number of pateeeaenen [Di sadvanlage ¢ mulhiprocessor ~ac' Syshem | acre expensine- 2) |isteribuled os — @ ath ts basically a compuley network In chi [fee ov more autonomous computers are | connected _ their Harddbare IR iSeteare Inlemactions fo -facilhake ‘Gommunioa Hen . vn a disty}buled 05, the users access | Memole osources in the Same _mpinner Advantages~ Reliability, speed, perfe rman \@xDi sad ve nlages = terouble shoot ng nebovorkin secucity _§) || Netosork 05 - —}@_A Nod puns on _a__s [he s server the data user ,secumby. @ the purpose (of Nos is shaved file & printer access among multiple Ccompukrs in a helwork l@peer-to -peer Nos {ts _an WOTS2 50 all She nedes are functionally & opel equal te cach other. am ene: E B clien) — server Nos cpomales ith a Sinale TGerver @ multiple client: Compulers 'h the network. SB 2 é Advantage - Secucity is Server managea\ . @isadvantege - High Cost of buying & | aupning aii server. | Operating System structure - athe korne| 1s the Jnnermos! Layer £ 3 the cen}rra) Co n}-relling Pard + of jhe opecraling, Vern st} js the cote of he ming isi ules he) =the meet is the _hext Layer to the ken A shel) 33 softwar tha} provides an \ntevface for users of an operating System Gi) a A User sintoract with preqrams in dhe User Bole nsatee Pee pies ly ecuith Lhe command , interpreter fo mregue se of — qegoumee GA cthe hardevae Consists oP éenlee CPU ake main memory, «lo devices ete. [peronides Vhe basic. Computing devia | || Wesources + © @ Simple Skruclure ~ @layered sleuchure @ mierelerne| Vere @. monolithic Slruclun | [Adwantaqes of wslenokatnel levathe Vnienokarnel glruclue provides Rah |Secumby € Telighility. @)ahe micaokernel Soucture is portable |4o small ‘size of kerne! it ts casy 7 [port Most it pen 7 one hardeare to other 3 ok Prolection = 6 protection: emory protection 4 ! \e Po _ Paolection me if ua open Source 09 — An open Source 05 i9 an aperating System hese Cade has been made publicly € freely available +o anyone @ Open Source O53 are available in Sawree Cede formal rather han compiled binary Code. ce kA anu [Linux is mos! popular open Source Operating System f : __@ FEreeQsp is a free open ource OS> + [aoc Wleseina Vist Syalemiesiidong b: Loading she Kernel info main memory £ glacting its execution. } yA small _pioce of Code known as the bootstrap loader. & ays Call = System. Goll Provides on inlerface belwecn ci aunning program © gn operating System: E sypes OF Syatem Calls = (GB Process Conital - Gvamples of -these lay system calls _are end -,abert, Load execube , onda ley 1 need. Process eh G File man agement Cl Gavoling a tiles delele Piles, read rtombe sete. A\Deaice management = Call sreque L device Freleage, device read © waite device, ete. (@ Communicalion = Peeire Ee neleiing Connection, S2n Rk mrective messages ae r a process states - the basic unit of ‘work to precesses- An entity cahich passant — TGmplemented in the System. i q 7 Pao 3 a ated strlenrap} Sea Eft pana Runnin Tle on Event wait slo er Event CompleHion | eae Ones - A process is said 4. be new state it je being created. DB heady - A process ix ‘said to be ready | $£ it js ready Tor the execution - @punning stale A process is Said fo be aa in manning | Btale af the Men Ghee been allocated Jo (Th OR By ie Wb leeu nN gMbietns blocked ~ A process ts sald be if it has been blocked iby come event. @ ermine ot has been terminated | by the 0S bee muse — of Some abnormal! err0 “Gonkoo! block Cece } Pro cess rrocags humber Program Counter CPU \slers tremory allecation Event tnfermation ist “of open Files | } WD iPotnte. 22 zis cian i vodduselomlhe. hort Pcp, Hhohese Process slole is ready @rocess stak- cl specifies the current sghole of the process’ @ Process Number - Fach process ts WdenliGes by ids “process number. called PED @ priovily — the process 915 sassigned the Datum kyluot swale Swaetios Mets ier eeton @ preogrram Gounler- a} js a Poinkeer Indicake the address) jof dhe next instruchion he evgeuled. @ Cry tregislens - |Navieus Cpu megislors Hkenicaumu\alors saindex): Shaek “pol aters £ general ~ prapost regiskr. ele. '@ cfu. Scheduling tnformebton- this ineludes Dratesy Priowity £ other scheduling iin Lormation. (ED raamanry Management informatie y = his includes the information of page table x memery Limits sete, A) File manageman-— tt includes inSermotian . nights ete. | F ataul all Open Files, access Same Sime ther % s to allocate 4+he cpu nay} is _@lled_ _ Process __| Processes — pes a dl which process Sthis | preosd ute Scheduling echiduling queves Ie seb queue - katp oll paecessve in the Syslem. ©) foody Queue- keeps a 5 ee ean presesne ing th main meme ry irahy #& ailing deo execute Device queue athe lis} of promsses TT eathing fer a pereliculer tle deviess 15 Ca\\ed device queue. Ey pes Sot UScheluler— rar dorm, Mediuen terre chadule x | gcheduler tga Cp is prow: Ledules th aodvees 4h “ies aialteese : 4 is. pee {Seca Ya_in belewen loth a rt € | [dovnn Scheduler anth [ok deal Gath jok deals ith Lpaatn Mem rsp main memory for| CPU | for memo nq’ leading pamces s — 1 cr gaee Ty BE [perce ses 8 ___ Gonbe xt _swltch she context isailchu ts an eesential Leake! of a mullilasking operating Syshem @ Searseching the cpu do angther process requires Saving the stale of dhe ald proc6ss 2 (oading the Sqved clale for nes process. shis task ig brown os Coplect suikeh, [A conlert Sitch is dhe machaniem to state [2 nesters Lhe Telak Vor’ conlext of a cpu \n Pro Contool Block CPcB) so that the creswen Pro execution Can lve resumed [Grom Lhe same point ot a lode Hoe I@ vsing Content wench febliniguel al context Switcher enables. mulliple | processes to shave lla single cpu ahead Scheduling — a Wread 35 a flow of execution theeugh Mhe process Code, aith its coon program Counter, System ‘Yegis ters 2 shack. «_| Procecs thread @lak ts heavy cwetaht sk is light otht @ nn executing ingtance uid Ghegad © tsi a : of a pregaam is Subse} of process called | process @precesses have Considerable Di a Aba [lo yerhend | No owrhead. “@lnanz in Sopesra le Anus. un sha meynory spa es memory Spaces. a at does not share hn shaveweistane) joepcl shames Ferd Age = iat Lewd vate Level ternol level aL a eeeie Z @ User Level mead fasle| te create & manag ON) een lamented a thread > Beinn libaady at the user Level. directly @® Vser|llevel thread con oun kernel operating System. “ Specifle te tf system: @rivitithosad & pplica Hon yea toulines lene cannot Halen advantage of Gan, be i muliitieeneys By Sea, ‘ slower to Chea operating System o kernel Freeads Verel thread one © ©peraling on an) I | ‘ |genefits ak 3 |@ Resource sharing _|@Responsiveness |G preper ublizetion of mulhprocessr | Tees ehes fa Econe m teal [E> Efficient Communicabion . » multithreading models - Orlone te Bene Wradel advantages - —|[@ahis" model provides more concurrency dha | the many to ohne model , st supports multiple threads fe eveculer in parallel oh micropre cessors | 4 " Disadvantage - f fe Bach. user thaeada dhelieenne Mend [rejuited. d 3 ID Creating a kernel thread is over many to one medel- Advantage - @Oene “kernel thoead Controls multiple user Hhereadg Bis IG) Used in language systems . portable Libraries ee aes Evie process will block if a thwead makes blocking @ystem all. @® multiple bweads are not able +e nm im | Paralle| + [requirement many te many model ~ Ad vantage - i a hi I mony Hhaeads Gn he created a5 per userls Mevovides the best aeciracy On 7 Concurrency _Pisad vantage - ss * bheead libranies- Posrx ae wlinge @lew peyformance+ IQ arrue concurrency Cannot be achicved , [threads 2 tava threads. ammo coe eo x lepy 2 slo Surst Cycle - I@ cho scheduling 2 grea affected by [how a perecesa behaves duaing Hs execution. —I@ all the proce sees conlinye fe sesiteh [belweon Coy £ alo devices during their lexeoulion ID precess execuHan begins ith a Chu [rst . @} is followed by an tle burst, which is Fellowed by another cou burst Men anolber tle burst (50 oh : @ Eventually the Last epv burst will end ath eS yl ee eis yaaa Wa PCr Medeeeng any . han another tle bursl- i , Lead store 2 e aac e (ceo burst aead ivom le, SD “Lest for le] Pale burst Lave increment _9 a y_ceu burst crite to Pile Let for clo] ele loursk load testo te t F add shore PcPv burst Fea are eee Tlevat ferisle | ¢ slo bush. » [ocheduling Criteria — —@'Irhweughpuk - one measuv of ark ts the @® turnaround -time Crat)- the amount of Hyme cpu is busy tn executing processes . he, of Pre cesses tha} ate comple: per Ame unit called throughpub- thot has “rolled by from the dime of Galo He ihe (Ne.mination lot la ipremeas @ [posal ig at inch Otte Dima Cea aby eeneeaes ee = ohile “iiatlting sn the omeady lqueue ©) || Response Hime’ the Hime “elapsed ‘belesern aw the moment chen a user inittals 4 request 2 fhe instants ehen bhe syslim « Th sharts. ves ponding is request. epul schelulen = I A_scheduler js an operating system modula jthat “selects a Job ehich is. te be admiltes [next fer execubion, é i [eniees (eGmeeea eee Piereempli re eaicege deellte Nzalion js athe Jepu ubilivabion hn this type oF ts less efPictenk, apes nq & response Mme waiting & response }inal \s lelse. ts higher y ® exanl he chi srime | Imphive scheduling nlon- Pareemplive a Hlexible . a Scheduling 33s oRyid. Jes ore Round pobin Examples are Firs} ortest Remaining Come First. Serve ere shorlest gob First. i. =the gyslem meso urces athe syslem veseurce = ae _uged efPleienti, . Ore net Used efficiently » dispatches) “ah ts the module that actually ghves Contre! of the cPO do Me process delecled by She short ‘lerm ‘scheduler. Imples on alge rithms Refs, STR y priavity CondiHon- a tivation cohave mulliple pero ses 5 £ maripulale dhe sams daka nubrently -€ the oulcame of execuhs nds on the order in ashich the ucHon executes. LeriHea! seohion problem — : aye avoid eidell de vaieins (ee Ve bulbs one must itdenhey a@desi tn. creat seckons in each Process- @ Cathal “seclten ts a) coda segment [3 PoP. Prat. Each process has a [That can be accessed by only ene proces at 4 Ame: i (2). Cmitica) Sechion contains ‘shared variables which need to be synchronized to maintain Teonsisteney of dala vamiahles- [DA Syskem Consisting of on Processes } Segmant of Code s called 9 Cribical sechton. le _4e. rae t T entey Section | critical secHon | Exit section mremainader sechen wl pekrson solution - @ veler sents solution is widely used. Seluen do sewitical Jsec Hom elpeoblams. @ +his algonithm owas developed by Compuler scientist Pelerson thatiz cob, M4 hS named as a peletson's selution. @Pelersen selution beeserves all three condiBens = @_ mutual Exclusion» @)_pregress E> Bounded aH ng = Bakery Algorithm solution = Mat is. one of he’ simplest Khown solutions de the mulual exclustan preblem fer the [gereral ease of process. @ ab ts a _cmbeal section solulten for processes. the bakery algorithm Preserves [abe © Bivel dante see) reve BFerS) @arhe Common data shruckurs are used in Bakery algorithms Boolean choosing fn]: int pumber Pn]; 4 Semaphore - A semaphore is a Variahle used AS a access aia Mieeinnennmaeseuree by mulHple processes & avetd cmibtasl section pro blem. x | types of Semaphore - @ Binary sema pho ke @® Counking Semap hore A Bounded buffer Problem - Opreducer Consumer preblem ts a _ classical synchronization problem. we can solve this problem by using Semaphores » * I@aA philosopher may anly [dick up ohe_ @) Bounded buffer problem ts alse called “Producer — Cohsumer preblem. @soluien be this Problem is . creaking too Counting Semaphotes full | & “amply fo [Heap Stack oS the current — number of | full € empty bufPers cespectively, ® producer = @ Coeake tlem 2 adds bo the bofter |@® Ge not watnt te sverfles the bufter. (®] Consumer - | @ Romeve ibeme frem buffer, | @ De net want bo gek Hthend of prvoducer. j Dining | philesapher preblem- lathe ining obilesepher 3-9 popular classic synehneniza Hien problem For: Csnaurrenty contre! . j Bohe problem ean be staled as follows - @ Consider ive. philosophers spend they [byes allewnabing belwoen thinking & eating [@they ase. seated around a circular fable. Jen Ahe Cenloe . of table 3s a bocol of Tejce & table is Satd with Fine single chepsh cles: peel @ oo philosopher has access fo the chopsticks at Ws [how [lefh or aight ‘aialionder Laden) Haiet don solo nettanet ipalhins si poeee salience emo meee chepsHeks. ‘chopstick allie) iimen Each philosopher attempls 40 plek’ up the lett € then the sight chopstick: I@ when done eating, a philosepher puts dh ichopstoieke | back Ndoun en eueeby, ae 4 begins thinking. [P) since the philasephers ate gharlng chopsticks . ib) fs not possible Pr all ef them jo be eating at the seme No iS uiecee ene dining Philosaphe re [prob New NS Vee eee iS Semaphore fs ropresemt a chapstiel. ® A chops ok con be picked up " Gait O) operatian oie llexeedh nal iia [Semaphe te K released | by) Sxeault ng aa. | stqna\_© operation semaphare | I Wal De es iinding) Byeeelial addresses | Beterated ‘by | program mast be Ma ppeot into the . process addviss Space” this mapping 's khown as address Bi nding Gry dau 2 a MCempiie time address Binding (load time address Diane DdExecution «time | Srila nage Mewes L Binding. Hee test eddie. an odd generated byiicthe ice “We iceman ly) ema logical address ARO [phy steal addiess — tha add tess | een dhe Tmamory Unit Jha is one loaded tate the memoqy addiess cesisley of dhe memory Called physics! adalpess. Dyramie leading ra oblain beller aera ulitization | roulines Con be Tata memory as equiped called dyhamte loading + Scvappi ng ait tery eters lt ene Dayne Reetopeil: technique inl hichv lary lpyoarse: lean be temporamily Stoapped Brom rain _mernsty te secondary memory ge thad dhe _maio’ homo ty canbe made available fos | other + processes. rrwe tasks — |@® sesap — in @ saqp out = iemairy siAllecation- Imiuits Bul process) by which sCompuler preqrams are assigne memory or space te a Precesg creo types of appro.aches— @ sletic CFined Sized) Memory partitionina | @ dynamie (variable sized) memory fark vias | Advantages. of mvt é inemwesses clearee of nou! } precrrann do cahich there ts he Unused/space il dhe memory. IQ an omvr space in the umaln meman lis alloca bed el atatly 4s according to “the Lpregqutre mont eth Ors 2s lA In Myr dhe osize of - Process can _ [grec oy shrink dynamica\ly 4 + | fodgmenta tion. As processes 4 removed Prem _momory , the Pree [sires Wy Mile pa de Us Wibewken winlo JitHe [pteces, xt. happens afler sometime BL ai Ws yee Rese Ice noua. Maal lead es Temasy Wbleclos Milesngilering wetheie ama size £ memory blocks yemeins Uhus mits pasblem 35 Galles! Fragmentation, Piicew pachion clethe italics Hen Wa Wifes Uspace |frorm multiple non= ontigueus blocks inle ene Large free lock ts Ina ISystinis' momory 5 | Galles Compachton. enlerthal Frag mentalion Exderre! fragmentation Muh sbeurs ghen fixed oh Sized | memory blocks are allecated do ‘the processes allecated to prscesse xt maioly mePers te the rt mainly vefers te the unusebl Space 10 the Unused blocks of the partition that oesides memory thal are hel Sn An allecakd megion . ceonbiquous. A st din ba elimina led by 2h con be elientnated allocating meme ry by. Compaction processes dynamically. fechnig ue x_||paging — ot is a memon manageme hd- f 1 [scheme }hat permis dhe pystoal address Process e hon- contiguot space of 2 Examples on. page oreplacement algonith ms. » Mfreo © eplimal @LRv

You might also like