0% found this document useful (0 votes)
82 views251 pages

Os NotesFULL

Uploaded by

Manish Roy
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)
82 views251 pages

Os NotesFULL

Uploaded by

Manish Roy
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/ 251
ra) gc sar rem mntigen | allocator 1) antroduction' 2) Paves management ~ Ot erage and executiin of 3) proceed aynckuont ratum 4) weadtorn kauck tung ‘he why, 5) Hionntsy mR sya: | 6) Pile tanagadleat.- pp eb takn iat (os) oa aot of program that Eee and “tpamjace betuseen, the Werk anal pruswide an | erartrAonm oxacte pAgirams enn, Os can P taclo Comuind at anu) oppceent (mann : oe Ns" a Yueounel im eos Reouwrce allow E we ore . examples Of Maer OAR! CPL, memgty » ‘ erubice Procter. Do wanst operating egeeem do? . Side Ur] pal 1 | | . “Conlpaiips POA lap Appa Lp owt styalem |r We | : vas f Operating Syalem " resinplaee wie NS ©, aos. putes e O yale as ir ecealirana eek \— R top ree 9 Main hrvtume tmec) ivuanee aa Pmexumuie aeasurte. utc zatim Scanned by CamScanner rhe] ; ee computer _ agate — operation - i) intbealize © ALL dauites AXE Comnecked oy wt) OS till be Jyacted. Keanel woul Le loaded in gan | Ceore park of prrcios or) . Ontguupl : unwanted argnal Ont evutpl vector. rbouipts are atorrd i ons nt }P Normal 2<0cettion wy pv. aE eal = aac : sie | — ayatem Calls. peuiatu from main program and 2k ect tng WEsrupt acd ain emi back ‘anal BEES ry main Pg a called ayekem cats pe Cuebutusn Gf operating eyatem i) Gator byrne eT Tob ° On Bokeh proussing bechnique EER, type of yobs one batehed pagrthir an axettedat @ tune. ° the mayor laok of of woo tp beans fer contral Qitemotrieatl one job bd eat nbd job t pom d Weary \ L Scanned by CamScanner ble CRernal) | 20K + MeMOY ta qout of Tes batch poverating lik i ar sail et COU bound COU bound “~ fo bound. eae! in o buoy CPD ahould always fe 6 wn a to DOwace penjormarte. od ~ Advantage of Batch pr Ceasurg aryakem t) mean wm faaker - ODvadvank t) cPU o ween tdle i) user Cannek crbenack with the gob when uk b axe aking _ kyaten 5 oe en ¢dte) droadvantage fi) MuLecpro g £2 ATG _= d Cepv We eagle Pe tnkrro duty ced - a bechnique to exe- MuLLecpao) pare paog Ne phage pimuLipnrsoualy ly Tob echecubing a angle ee Bue C JN, as dls | [2] <—> — a) Te mae we Re Tob Pool . 8 moO puch contacnt sabe and axecertio- CPU Ready duct Aueve Ouse uu nee poo ose heady tome Scanned by CamScanner = ob mm Reads Gueue @nd proc- Select ong tne 4? bt to bared! a CPU OChe Go caning we came lr f Cu works Hus much, atowk Tobi G P10: ePUI Tepe ie wer HU - _ Rene, then kets ad Jobs Cov work Asrnoinuny to Stb| + Aduantage i) Of CcLank (aa psAty ulclizakum taebtiple obs ane atotedk Wo cpp & nwa Idle . ici) Unroughpuk of re CPU moay cy an iw) woltuy tune uy Umited. Tea] a tlh aa Re ig apenanteng Ye 4 “ol | ii) vg mata yp a ebgtcal 2 Tune - 4 et sam ovtenaton Ch Red te Oe Scanned by CamScanner - Aduanknge c) uaer can takwact uuth the 4b wren th & exe - cede ip wae “ogpeereet — ee a cou be cpu uklicakecn- muLTrpRacessok Syetem. or PARALLEL SYSTEM oF Wigrily Coupha ayater ayakern haue moe than one. proccasors catitl fone Caompubin bus, mensiy, percipherct goustia Bea, khan thu i of ayatem One calte mm LLL Lepr toed oe Wty polvantage i) ineacqacol bheed pee ee eames ovocited in porkicutac ture P ‘pebigipet) i) ft % economical: eagt 5 thesaaaned agbiablity: grace of 43 to conten Aras g Her fo Mubel poocees7e home beyond the qracefuul og ee id foul t olox peo of mubhiprpleasor payne: mullet p aD esting — comp) olf and theor. ge Qnothnr Uthon - Gach procure Aune a copy cops Com municabe © ith = one- neecteo) = Bn emP au the pr doaaars Gna peas Scanned by CamScanner ii) Acymimataiens MmULbPAP eres ing _ ey Sie | q a dhay “cope 2ach proceaer Aastgmeal i pectic loak ~ A Mmoala pro teosor contwols the uthole and athex procs follows the marge pro carer's Wakwuc tors — the maakea pxocuesey ethedulu and allo gay dhe’ work to the Mla pv (easy. ‘ 5) Datatbuted oyakem ov Lootely Coupled My abem, Bo Sutrtbuted “ayatems the pavcecinw any ahonre memo » lock and percpheral Obercieg, €ach pr Coaor havo sl un Local mem and thef are, COMMmunrcat eal OM O79 thom uto | though high apes — buoea (ayitrlhs/areinyh Advcentages . t) Reoguree Lose uu) computation apeedup. ia) Relea bly. al *liy L, Mi) Network operaliry ayokem A Network hao a nitmbe&r ey manny doo. When pus meds and a npde hai want fo uaz Te Meoounces , we nevel to Kno ishere the npoouree are ovattalle and Connect that machine tp onettety avail the A ounces This Can be & unplemented by folouturg OAC tectuts a) Pesrd-to = Perns Qyatom : b) euink-Seruen fyptern No chanee of farlune fatlure % possible ‘Pompute GO UA, ~Styabern i) Pue- ener fyatom. vif Real- time Operating _ayatem _ — A Real- ime ayatem % Used then a Laid ttre requvament haus been placed on tye. Operation Oh a fee Condi oo the por) of data Scanned by CamScanner me oN tha” - A heal time aiyaiom han well alof cncal paw * conatedint. Pavleating muet be clone etthin defprred conatras Athyreuae the ayakem ueritl fait ~ Thee ane two types of sacl time ayatem. a) Hand wad téms _eyaten . This abem guarantec Oo Thal CAEnCaL HOE ant compilred on He. bo) Sopt JWAl Hime auyatem- sre ‘meant that Ine “pracedlanca \and the gequance for the tae epenations ane defined: + COMPONENTS Of OpaRATING SYSTEM (L8) pg. t) Proceet _managernont * prrgwam in ewectekum w called a proces ara Prgram vw paste enitty ushineo? process ae ee, Otek. athena crag is eueubad fected! yA mee" ® allocated to it. when execution Ou the pro cead neleaeesa atl the nesrurte- One uthich manage owl Orr: Gnd pro eke wo done by Res manag an . nt Wi). NO? FN ey a) kennineriblactor 4N8 mon, 1 Age . mem oy co fale of ato erther O oe | : 4 each att. hag a pi eteal odd Azod - f Dare Con be grovtd loececserl worng 1% physical cual clits “J cpu genenalts epeaatwn Z cpu ly iy pe —_-eb'u ore. © [memey mansgerentirit| My main memovy: » Aandoresy wt Ay 4p physical adovucs OlCeos as, OF th Some. Cre caas ONY adidrtos i tum rer) erent Poe: collect of infocm a Wi) Pile manag Pole: : vee oe efit Felden: collectum y fle File character Nimenle \ ! hanurn ete ‘ ee ' Scanned by CamScanner aS V sasts| anagament : 4, a]o syotem me ; flo ON emclromethanicol dase. Jt cannot be wanected — dinec tu due io cpeod minmatth to come buffer (Cache enero om wm put tow — speed covice (eg sprinter) How buffer 210) gubsytlem. | some pAtdefered coptinrares ~ | al vi uses gre alo Asian, comotiner rea | &. Socon day akonage Manogement - | main mim vole ¢ power on worles ), | 30 . Dt further dac b partiononad into = tracker ay seth druceed cto sector: atk yo aud head & Used data. ' — @ P and dala a Asad. ‘ hobat ed head > eo igrtotin \f Ae OPA Ce ene cide, i! olata on athonr side 6 Nekwere an, WAN Sint inet da pieag mentakim \ pragram —* prragrarn. needs ppme Aloource that nat uth “ma + then 9 “nandl “to acceas that aspurce FIM O Ainowree Syctem . THe w prouloledl th thio, Network cyst \ \ 4... Paptection Soke Asse . 4} Tw0 protease.” bath Wedel Be. protected from each pth 2 type C) wasr. pro tues | Wie > vise prog ran, Ta ye ey } ehecution = pro uss t) Syakem pao ws § when we Actas come program wo Aaeal Some System ram. and we Acces | Gran ia Cpa eon paca, i. = poo Scanned by CamScanner Bt enced ee \ f lor mand antnpseter : id dive U (aim a te trndace bl" usin and Os —+ operating Syatem cervnces. (va). Pg-S4. os prourdes @oriuis to utr ayakem ete 1 chow lat of direct & program 10 Show st’. Pog vam rectum program executes ‘—_ olP or wall ri 2, 10 _eperatn i whik execttur program pe Qive epput wang kerybuard » mbuct, LAN , wome pile 3. Fue Syotom Hanipilatun - i Reading dala foo file — write lapp end ate wpe. 4, £enm unicaker 2 proeeos ae ane Pt 4 may stemmunicalz They among dhemeelusa + 4) Shared mim concept ii) meos same. posted, Tuo po Cres uaLthinns yalom ¢ Two proces in cliff, Syotem: i) Shared! miro ols . bath proces can send oF rece we alata. worl . Shona = Measage Paoddy —p-1 PrcommuP —| als ¢xeanel) Pel eee COMM roca with OS then 0.8 commune aes with Pd 4, Roource Allocation - AuLocat Ug ponetrrces tp proctos or a AyYakern.at tune ed gre cutwn » Scanned by CamScanner y a how Man, Row many Users woe D keep ivack pasa ancl_S¢ wnii 6.) protection 2 no bectur t protect ung one. uchelhen oT not you OAL Litho aud peu’ to uae syotem. 7 teak it uatrrcl and pasword io ured, procvas to Anbthey ge curt ty - praia ureNores (hn wan ond ath | @yarem pg ram: [im Srforface Cut @hs--~ | Cotes | peer EEE . ia} . — pee ! ; \ Senvites Hondwone ‘ po Syakern Call aouidie the Nee between tne y proces Cned a os CPA 61) i Typco. ayetem call othe One 9 6 Eyper > nt) procuqs control | vi) Rue manipulation . wa) Dewice mani pulation Wi) ) thpremat ton maLntownarte. v) terormunicattont - vi) psstectin. (6g 69) opent? Scanned by CamScanner wode bit wits pre ha proce ae [calls ovoke Retuan form ‘ [a executwn aa em | eres ——— Kennel emodapit = bpt= O° mode eb 0 execute gyster call ——, mihith » determined by bit in aor mode Kernel 9 [Supenvite and wnteraupt gyotem buna in 2 mo des “Y wit Oo 1 Hen aAyatem Babe ” won mode bik changed using uberrup t executed by oyotem call. Ths now on and Kerns) proces Worle hampeung each athin: sith out Scanned by CamScanner 7 CHAPTER 2% a alae process coNncerT Pav tras O program tn execution _ poo YO untt Of work, - Procas needo eVUQuy neowren auch 09 CPL Lune mem and (#10 olewltn tp dp jy work, ° Theae, vusauwreta ane allocated ty Protas ef her ab the time oh) Creation on at the tum of exe cut Lon, = Pootras + main mm Program : Stonda rales func? Arguments func? return type: total vari ables Qnternal olauctune of _Pmecan Dynamic. memory allocation Ylobal variates Erotauck uss * » —+ Paoeras @tote” e when Q pw leas eyecutes ut cha the otate e Uhe atote the pwta vuntied by cuwuent lt of othe —pr0ttes d othe at ane bk New : The proces to berha @reated. ' The tnatarictions Are berg executed, t The pydted ts watking for Pome euent to OCCUA . 4 Realy + The prrotees b waiting fo be oasigned .do 5 Toumtnale ! The procs hdo Yiniohed ik exeouhim Pay a FS Scanned by CamScanner oUt @ 10 prwtes CPU can ‘mun Lert ing ayatun 94 = Proties tentrol ber Aleck’ Cece) in akote ~ Rogulins 7 OR: mim Limut ee . ot abl time utilization - - The oljecttue the (PU Gmong pr0Teass 40 a atngle prowa at a Hie } ; prottes: Ypmcaas 1ep Y Sere dislns _prrces Atite 4 . holds Adder of 22th peb peb ib im ushidh alate bo protet numba | +empy u holds cwuenk aitdon tone fogs s seater of me od Cpud schedules tre of by dbp » agnumlos _ on eppeno. Miho in to Rane. 07 notes Schedhulir d P - The objective maultipaogy omer] maiumize the UY < oyaterr ty Aimwitch puquuntly that vain Con Scanned by CamScanner P Yatooupt with eae | fregre tah 2h ib i = Yo” med heat olgeckcuss, the Protea pthediler oats, an dwvoitorte process fom a att 6f oeueral asp protects from the Acadia (ueut fr execution on The CPU f) Schaduling Quenss - ob queue C neualiy erxcated process) Reooky queue , , 7 ! Deutee qpeciee’ Cevury | derite matntoins aquene) Sh proties ee C Fopqueue & not need) Ready , Deve Fucus - ° Job queue : uthen (tne procias enters the ery 4 Are» put trto 2 Job gquout-. Iidb GueiLe cONdLa} of aU ‘proteases WW the Qyatem. + Realy qyrore { Ye Processes Ahab Ore Avati uw tke” moigll wa anol are and nniti 40 creeds ore kefe en @ lak called Ready | ; queue . ¥ r 0 Deutee queue : Jha Usk GY pweresto waitd porticitar ‘tle deuice % Called “device Eurny Guete bb maintained in the form o) Unked Late Hensler my ! , jer aha 26l NNT ‘ a 7 Diagram Reprecertation 4 prvtied mee Scanned by CamScanner I ready Qucrre] send: j Queee| yep Gs [re game Je [FE Raa [rikne Sticeexpined— |__ (Oa [roe geil | jualt for an Preovpt noprecents the apne vaed (Ready ana P ruocuntes .thak aeuse anctanguias bex _ ree two glia, Ont ~The ClAcle, , neprLennte She the guediee- Sche duke Te ates onignets “on vanuiocnaga ths tushy un EL ( Apok piuak UES oat Sebo, proc & ag ' spre 9 set Ab BT aie - bam echo CUULtA 08 qpv scheduler beam sche clisler en ob pool and loado (eeady Ouse). fer ayoctstton i thak ii) Shenk - LAE 2 abe 2 fi Galacts & proces al = eae axe | Ase to gxe cute anol ~ cpu do oh phat the meron 2 - The mumba poet & dogsce oy _mulkipropromay— spew a) 3, He - plo pmceas wo one, doing Blo then, en, coemputakions 1 sere asl 4) ‘ Scanned by CamScanner P - A chu _beund proces b ome that ppendos mow i a q Gp dine tH Computation, than Lip ] note! Long 700m sche elen colocke aes prbeeas andy a ilo beund and |c Pv nana Pp oP dpa scheduler bakeo lomilticeconds to decideto | a: Brecuts a proces The Pwmcas takos lop me by! execute » How mouth Here percentage of of ttme @ qaken tor scheduling a pr0caoa, b 4 dcheckudes | time = SChealuling dime | jizp ; . Total, time | Total +tme 5/Sth Roldan + Crecutten tue op gS ‘ 5 4 } hey schedulers tut 2 top lo. x We. Nor 100: . aap 4% ey Hota cpu Hine soaked pr schedisting A prothes . iti) Hedlum team scheolulen : eo Pn time @hart arjetem , wie, Are Aem py ¥ , oO a ; Aun ning an from CPU to the 74 55 Gaba Opter: hice expires» $0 Remourn rsa nem CU eck ALady quioie. wise a i checuuler caltecl medium team Scheadutor . oMedinin team scheclulor CEQ) opt Prantiouy executed |, simpaut gwap pedi out. ro etad —+ context SHaley , Saute the CPR Aaom' ome: eas, bs, t protec fenubany » a pt ata As et pres and na ach i. oo eal Nhe ney prow LW eater ie ae, Ue Scanned by ‘CamScamner. [Sava the abate ilo Peto} : Panteaao Proceed). \ Dae Tale. Cgpteit Reload atate pron Po] sth | he pe a | “ ; t erecting Bolle « i context Outten tHme i pure ounhead because the ayaken olor no Upeful worl (ubhile ae hig + cpu |paottas gone cuiling Algorithms 0 ae at let : i : o The CPU othe algonithon determither tow the CPU Sp the proctel aT-F é ae re The «CPU Scheduler wctlachs % protest + cou schede’! © ao pean) onatlabl. proceape em CRe Qusie) that are eed te. wy allocates the CPU ty ais ’ i en i a module that ptues © papalchyr * Te Ppa pe cpu in the Vibelas selected U6 Che dulen 5 PY ear il phe sche cul’ 4 aun mein Tye chu rm ome rms another pyro” . . b- becate Ub te invoked sepipbebea johould +be aa uk anc) 2uery prowm suttteh . The ¢ oon a takes for | the dspaches a iad es kno procead \anderebaat anather pro teas apache = Scanned by CamScanner r CPU sched ulus orth, Ue Of um Hyper: 8) ED lay algerutthm : Fi) nemepeete Hine n ote non pawemi we : = The CPU ochedubing detown mony take place, Und four fetloutig CiNLUMAtANtes . i) uthen a fyloteas Atal theo Mm Aunning atate ty the! waiting atote cue to P/d.moguloe . Wy) uthon a partes auutthts frm running obote ty reody atate due 10 intevurpt ie) uthen” a proceed — auriterte fom wattug do atate often Coimp lution of 2/0. iv) bthen proces terminates - (OVW 2 NON -premitve.. UU, UE) Scheme + preemby ~ Dp proomtive oche cute) the, Civ) can nelaaae Le process eutn in the “midldle 6) the exeentin , - Dp nom- proombue eh, » once the CU hae,, been alloted 12 A proteas!) the prpttas keope tne cpU ountil dF seloonon the CPU aitht, by bermin oLuy or by suuttohurg to the thy atoate my Scheduling euttola + v The cuteua \dotpaming. the beat Oberon thhien Cony acuinal ‘best algorltin . H) cpu_ubilination 7° DF io the peveentage of tune thak the pooetedine ta bue W) THeupughput : no. af proce Completed y che Mig beuted 1 Poughpube Per sdeoee #8)! Tun around ttre? The thtowal fase the tine aumbiaton Of pretties to the time ef completion bb aolled twin around = ttme at ava Titan around June = Hme apent in Jeb queue, ; + Hine opent in Ready que , PT erecutton Hine of paceee ee i + doing £10. . 40 THO ‘ground Hive finish -Hone'= anasual duane} Scanned by CamScanner vy) waitthg dime: £4 in the Amount of time that ..a proceas , @pencls toad ting tn the” ready qUrue poaching: ihe. = akanting dime '- avriival tme v) Reponae time: The hme interval Mm QUbmiason eo} 0 zaquet until the pot vepence & Known ao Reopanae tume Reoponas Hinge = Pirak vLoponaa - Arrival Hine - y> 4 \ t) G) ahould be T ti) iv) v) should be + > er i) Aviat junk ouwe Bt tet Oo ok ‘yl pro clases pr to p® nue awiues faunuung if onder poreile Burst 1 pyoy At | er Pubal jhe ‘athedtule- r pola I 2 |I 3 2 |a ' 4 3 2 5 4 =) ‘ | Cant 5 . s-eniteua 1 AT non- pes ; fete [eres] mI pert | pest aT pe Pa | Mode : cont pao par] at er or ‘seer feat FRE huv bAUpeee ae y- eT T EP e pe og: ie 2! “4. |B 3 2]. [@ 5 5 g {ie fo F é z a |e le fot 92 pise ? A Tuan around Hime = (terete! ~ v c pe rere)/5 ~ Av wr =. (BFF oar 5aste) 152 Scanned by CamScanner g Prop AT | BT P oo |: 1 P2V eT st Ly LAP] ons 4s y 2 5 16 PNOl ary BT er TATE eF-AT | Whe gar-er| eT= FRoap ' ° 2 2 2 o. ° 2} a4. 44 ' oO. © Fle er ge NP 6 oO oO. Here Wr meena (Pirin waitre fer protec, cuhtato, th previous =e > Thee wad ag ued Fume | MAN proceesto mene wath Jor cPu, eho the 4 convoy effect + a) etna ogad! waht one bP oe Pate a "ep sTu affect NOME He gtten Th onrival time 1 nat gilen ali procted enter the 4 oe at teme=d j Dem ff) 4g Pron Ar BT ET TAT ECrAT IST. mmt-er RT APR Ar 1 OU 20 20 wD. Sa. ay & y 8 eb el 14° iq. 3 i) 1 3 oo 2) 2 Avg TAT = B Avyrs Yo. 4 P KO; HAT, 8T ¥ a ty eo Pa] ts | Pr m ° 2 0 ry ial” 3 ° Les} po, AT BY CT TAT=CT-AT We TAT-gr RIsFeA 1 | 2 98 ae L, > e AL 2 oO. 3 2 1 & 3 @ py TAT wr a ss Scanned by CamScanner ow executing prococs you aho.la rer wehenene You , P d past QO Qo to Keep wat tong time execute big proceas f! Leas « . . convey eqgfect = thoreoee wo time ~~~ vii\chorkeat Tob Finok cso) he : © The proetes hauwing amotleat exertion hme aned bp the pspceaier next. wil) be Lp Fe procieaes howd name 2k wen wat sue tp bacak the you opply frat come Zi ; He Hane! Thin - ngoreka according to buwt 4 Junie (ud) mode nen - preemie qe pNo. AT BT {Lewd . 2 2 ue ooh algo 10 fod oe 2 jute pooling eae to yo 4 8 qe eee bE eee : ea Ea [Paps] Cala 47 te 84 vide: “AL OTA TAT-Bin, RT PR -AT ) 1 oy & 4 ° rf 2 2 8 bb 14, 4. PA 3 Cie 6 5 ie 4 Gy &,.0) + 5 s. 5 Bb a4 14 1 iy) tt Rega, 28 pug pat = $3: 4 joie 6 Avg RT = 6 e ahorteat Tob poak writ precliton a purat]execution me. Adnankage 4 SIF: Dis calvantage oy STF = macimuun Thaough pub -at to atonvatwn = mins ong. waiting fume Clongerprocas wai dus romony ores} and +unn around tm - ft a nat unplemente : becawwe burat Heme & the py0l@e4 cannot be known wm aclvance nH ba . Aeal oftuottant The somswo & STP with pacaliction |p ‘Fed \b -. Scanned by CamScanner Technique Pradictuizy pegs ae J yi grare ‘ Byram ST frame ata proceas type Exponential Bevin ge Ng ela = Prrothas ate xe Ogle) 316 units - re, aioe aie nor rs my Prose: ye cia Kernel aaa % Hipeyo Guid” » im og isenectnt rt, " airpadchor Brkenach ve. fouqaouay) Background sures prr@ek (s ex games ors ee : " 0-15 Jusnite is -runib » | (5-8) y pene ; pynomic | + ensubect Pemasnrry time mole + preenHve — . 4B tet: for Completion Hine move, ght 4° dt — Paigvity scheduling a gaithm * Apatouty 4 Gasoctated wlth each prec and whe cpu Uw atlncated tO the pAotect cusith the highest paloritg 1 © equal prisrity frrotectts are pchecduled ln fcfe + priority ean be dajthed Parent or eackeinally: \ nothing qn @malbiat no. 3S Rend Peiowtg career arf oot: AT - aT) AE see ar Fy Gt 4 Scanned by CamScanner Avg. WT = P Thaoughput = = Non pasemHve._patority Séhediteny 7 a = 4 “Pe. es Ang, TAT Total yoo Tota] Hume TAT [wh Avg. wre? pa 4 TAT! Pa | 23S ane woking « A odtution’ £0 this 9 tethnique to prpceases pericd hear oRetHit. Cee) og = oy wm Longer ap rountp ROBIN ALY prt al wh 20 n RTE? \ Thoouphpurs Po " woOLens Hine @ pcheduling alge ‘ 4 pal, proocnes ts wel ok prtority Process. sheen ee ing pekiad of etme bluin s @gU Poe ably dresuace he that ane" waiting im tne syale ow okanvatus Gesigies! yor time orang, 4PM o The RR gaithm fn this i pb added fe initlon te 14s algo but the preemesn © ip viemitcht “Btw Yih, Pe ° A omau tome 4 § : quontum ¢ A pee in dejened PY OF: ; aC. + an this algesithm “the CPU auiitchos blo the a Le prdceos 00 the Hime quantum expuus q 1 . Cl Scanned by CamScanner Ae ie ber “rar ast eT MO ¢ Coe a o Bae 1s It 12 pasenctive. sb : 8 ‘ Tor ! Checlicle Jule ea | pr] py PS pe] pe ps] px [Pe TPs, = 6&8) @ lye lm. ts te 18 = 4 2lehe] ' ; ; : 8 BNO At | or er gatect-at|wrerat-eT| RT = BRRAT pets «| ete a2,| oF a2. 10 t a ty |r oF jos. eH 5. Tas 093 | 3. le aac] 33 go! 23, 2. nyse Mae Ns eB.) aO4 | 24 ao oO: Bg 2 a & q wD Pei, te, 6. be) sted hay ws 12 po i : pT aaa Less TPE Tor ae Se ee | | Sthealule : pu Jes] Pa |p [Pa er | eal P2.] Pe) pyPsl P34 | mi Pooy “ra MORIN "hy Pr 24 a 20g." a rane quantum trereme + ffs | rn uantum detec, uy ma then tune 9) dust jumps from one do anole, Ye oo man Ce nounsl! ABbLA Ob genuthm olependa on = a ~ yeh. Quantum prouns ne ash! 2 uantum b 2% the aR dyeuthn phoeel ooune “oo! fere algoultinmy 6 4 fire quantum 2, ‘emoul Cres), the R& ataerithn a colton protecsor a . Pariah uns Ho Tene Quant content auch. mast WL apt 6 ! 1 Big Scanned by CamScanner seme Guantesm, context euritch se be mene. . omalle Lhe Atgerithm 3 louel Queue Seheoluling a oo Heltil D+ protease and claasijed ~ pack 9g vu have difh . . oenealuleng V4 an) Ay af proceosed | yore, -—[emmactive pmeus < pencncana eaihg, POR] > . _ pean pee | tre ready queve Scanned by CamScanner iL jnugheat Reopence ¢ © The Criteria ©| Aoponce ae Uene fe Nr waiting H Tes sbauceasPimer egf O—-P? + Mode. + Neon - prtezmtue. | | ° + HREN algorithm nok only jovours alo ‘imita the. © wiatting Hime, Of yobs: \ alelie ] ( arg i oe Re, = CITY, | blis 7 ie 4 | oe (4-L) 4B rz UNG, One uthorar | a ALponle & more | i BRys Car Gt > = ns ual 90 for } a a ae er 2cutioyn - ALL oe Py | meg ag ee Py wit be recently, s Bey (ise type oe ee | Scanned by CamScanner SIF sthedude ‘(re [ede * Tes mos - tas Pray? wo divided into number 64 omaller or cometimes called — Leght cag epy utilization ; 4 pyran courten CPE) » REQ and ~ aback te petned execute at’ o Scanned by CamScanner 70 20s , - ta teas Hime td taker i i eres enone tune Lf)rhnod Th 4 * Fe pada, execute anol j ube») ere Ce a comp} rag complak. i operation dete ib open nie tune 7 i +u a) ae fone mow tune to |W) GE bane? tea ee tadla , BTN culth 012% pryDcradto Suitt blo : Ta ii) Pro cres roromunicatun ts wc) thaend vommu.nicaten a mone obefpeeretle eootin * b taht ' iv) papewsta ONL) lovely | wy thacoda = Oe righ Ly v) corupld comple , wv) pe aequioies more nO. wv) pe requires jouer no. oj ruesourter tm execute] of patel fo execute . m ‘ pe wb Ugh puskght . a Alera Jut) remade, one aaettabte fr soa paratlel |" panallel ackeuchts “thee Thee Oe o phAsool. © L) user th : fi) kennel thawed —duaethaend: | : : » ane Loaoleel Anitaely ty uoar paces Kernel | Knots |". nee ng, about , them, | © when theuiadls Oe managed Hvar apace the proteas needa wt Sun pave Ih The taead fable contains wjeunatirn about | - tram cdtenter, stack pornter, nag iatena ind atate lof thanad) Ott. , sorbed felte, © MnO el by a . f \ en ulaonme Scanned by CamScanner each pried thot’ keops track of ayekem, : odel mo att thaendng mane aryokor paride orp ; Apo. ‘ ‘i entadtion : nae i Ei cmupettratadiog YOR © Thace model i) eT fe thiood pak for Wotthy Geen and wasn = vend thiead > Scanned by CamScanner i) ene_to © * dn thin maps 200 i) rang t2_mony model ' | * Thio multipart | ues devel threode bo | « yhio model mape many reaer towel phacad to Fe konne) thazaol. ace a They ankle | ipyoctes ual! bloke a4, He makes & blocking migotern call. ono. | ereochel. one tO OF | T | ‘ _—-uan thread \ — eernel thrend - deer thread, 4% vernal | thacad tone “blocked” get, ots piok Codiventoge) oO omalter or equal numbr 3} kennel thread, * 3 a | f \ + + | PE ene) kernel % blocked then f van thread tennects || $B Onather keandl thaene | i Coolvantaye) | Scanned by CamScanner eynrcu RONDZA TION ele )F tH, Process ie ten THe Ox mane toaperaking proteases Oweeute a ahaned Maniable »% ononed Ascend a abil file olmultantor be chances a data ineanatatency: called nace -tcandition. , 1p owed this parblem prraas ayndvipntzat ten & needed , me one tw utnos = dp ayn eKronizatin ty pata-acties oyndmrentzotion s MNT Shak aro dota doe not ge Troe, conalehenuy ) abhen they Tune? Uapels bedl,o bg 5, Ceuenal co aperating pwrceser x) contre - aynconizatuin + Bt enowies thak co -opevat ng proceases perform fren actions t desired order: Races condition woeKs and UNLOCK S + HU extical ection prob lems Unk boeken and unloc- King: Sup pose J have Obte+ Oo ohowd vari Scanned by CamScanner toekCL) exetualuely © LocktL) + Aguine ; i : the onttital decd Only Ore protres with L tan Ly: ‘neleaoe axedualue a other proceailo to cenas te Weel) | the otal access kit's * vocieing pend ‘eintneking Sxouelll) 86 _luatgried ta eT requirement oy guth Q Wa that the Hee 4 cuted settrom ehould be patiapced » | > worry interrupt | ei)Db ts errple + tthen itenaupts ane daabled auLttth cut nt hopper ’ «ii ob Aeguines -priualege | Uner paptiasee Qenonally canna Nt ; akable the Sothielh wr software aolirtions -{ fer Hu oninital Ceetsn} Scanned by CamScanner = statemsrte : {See [yer ru dhen nothany ekecuteo qo” folee then etatemenda vacost] pi— P27 Pl APD ~ Vere Onby OMe PPCies Pr cant proceod potsfied 20 soxisfis = mubual gxetuctan” EE avecuteo OF & tome - HL PL exabthee wd prapeaen ie OT thio fous » (i pr dosnt wont fo execelay) oyelualen . 7 erased OAL ex ceuted alrernatiusly in eta) pr 9p

name bons ® ushich pr? pred ip the itieal acctin Uy Wwe Scanned by CamScanner VOAECbbe gaged foe | proces! suns? pee white) 1 cad] tyre cplag ce") ; a tatty {| 1 ocadia cpg 0) > i ” fing Co) = ues aoction eos ly —_ ical td Fim : fits -{ fog Crs fates += Gnubual peetuoten faile our bye .-—- and bath proteas art uatontes the mutual excluator) proceas | anal prouc 2 are * ft means mame tune - eection at ~.paoblun with attempt 2 The flags Qne mk GPX Wwe ies a * —+ goptioare eatution (attempt D hanced vonrla qantas [x Co}= flagcr] = folac. _Proeeas 2 ed ea), ee Cod= Trust 5 fa ode TAU iS oy; J Cag Cod) | coh — a tritical cecttimn | flog) = “Plog til = pales ee Scanned by CamScanner a ae ai Tp euiten fates, plate “udheh ventint trip cALHcal bacak form the while ty eatHteal | oO Qchieuss mutual ex Cluown + St dines not Athleve progace! 00 thie two pro cseseo ——— gnd deadlock 4a Petersen aplution tun hah. Flagco) = flag c= jot | vohle C1) t Hag Cola True s tw =2) soride Cflag C1 AND turn = 52) 5 —-“aaHtal_seckton —| on fing C01 = foulea 5 hore due to ‘turn wieh + gemnpHDRe voriatle whith i ind a) wnheger ow & & opeiol { ed 7 a? can be Alteos ey initiaLicedl on 04 PO) woltt ) eon be ; by two atomic, operatic Gir . operation ancl vey or signal O opercdurn - no conrert 2 uultch tn HW, atoms e means Scanned by CamScanner rune type mene (5 a variable. 04 620 tt condo pore Somaphere S 3 _— augnalls op? 7 pfoaites) while ( 8<20) 5 s=~4 Le I __ { v [5% s) 2a { | sees somaphore mitbex 5 pt mnutex) muter = '3 he. 7 Ne ewp |t | ext section vemutex) | vemutes) Remaindrn aections | Remaindir geet iim a eee eee a tplomont mukuads 2 «cebu e uaLn aamaphore » me can J erty eowily: propeces YB gndled waiting ® —, Semaphore ato -Cpvoties oynehnonicotlnn) o Thene are two typo pimaphore vanridlle 4 st counting é) counting aeraphort 2 The value aemaphere ean hange OWN an unneatricteal clomain (con atore “Ory wake gen Pun aarnapy hort $ The value bin only eben aad ii) binary _ormap Scanned by CamScanner ya @Q-© My tr be execute be ‘ Oe qm efre Si fee ME output Semaphore aynes eyne =F Prog ran! Proges ‘ i rey & power ot | — Pomaphere inplemendtakine ( uy woah) 5 aha a Ak 2 Lene i f 4 Busd wooly : ony Notte — This DUaH waiting dan be eliminated by modify tre aarmalphort PLLUCLURE + 3 aphowe pkAuctiAe| | lusith two frelde 2 a) hoger ii) Yok i) enkegar U vontain She vole oh pumaphere vOrue: ~ bles wi) Wat : Te toninins nO OF procyoses Arak Ore ~~ wong” typedos mtauck Aunt value 5 atauct padis * uel 5 Jasmaphere i , \ Scanned by CamScanner nm be rt) eumaphere epeatinn 6o wait (memaphere #4) t * wad go value =~ 5 a i Cs7 value <°) a add tus pavews £D gust > : It in : Now perces Dee } } block 09; UND Py aioli bul tn ‘pteck. Yakate deg ried ao * gugnall) oermaphere operation tan be seqnal Ceomaphere rc) S volus bt 5 a y ($7 valuere =o} r 1 3 Aemous O protkes P fo oo leks wakeuplP)s UY plock arate do si ' + akate o. —+ Sunewuonivabien hardware » Beme hwo unethucttoms “veairy bo Uanadl epyertt taal in astuing tre wdiical “ect ton problem . beskan. teat Land. at Chetan bang et) { boplean news 4 target s “ banget = TAue 5 return ALS Scanned by CamScanner feet dee | GL AetUans 0 asol teme 1s ‘ and. eet roplernenbat to beat - os wMutual exelucion >| funn: lock £0 i Pastas) auhtle 61) t urnile C teal and— oat Crock) = =I) abate ves pritical section ; mutual excluww de \ a oe Fi but net Othord j Note Fe at functiin Intel pro uasor diteo rot up part Feat and - re ee ee Tand. swap Curt Eualiet, 2, wrk, expectedl, tnt COrmpane and. wap be rev ‘, uik femp= * valine) y (value = = expected) x value 2 nuovalie 5 ackunn Lerap > atom Bt vodue =O expected! sO Th nao valne = volue, tomp + 0- volun = | af © mutual ex Lush up Lament o-tinn Guth Cempanre_anal- wap Pro ceo 1 {uncitory ; ronal U1), a : { muha porite. (Compare -and-ewap (Llock.,0,!) $ >0)s eed emtical Section: lock <0) aM tga atl Sf Scanned by CamScanner . AL) CR CENT, SAnather — algortthr ‘uate lat —and. at i ne a y thattuat Lom that. Qatlepeen aw : emtteal Section —- requiem ents - Global vartables - boolean watling’rJ= faloe; boslan | lock falee \ “i Pel white, C)- : ~ \ e uy toentud { are? a ais ' “Vwatkog cr) > ture 5 at lM? *Leey heue 5 I Wcal vauiable esa ae while (waiting C8 tekey) |e key = beok-and- aot (block); fara, S thie Ceiba 0 Lk | boating cya Teltows nth pro Coat fo entoa into EMH Ca) @ chs sai Hy tre (phe Horiba TPCE fooler i Key BOTH p, Now Py wants 1 enter, Whi, we Om Wes of PM Wad p> qe hue beg = re Scanned by CamScanner Ml au. the cond9S, far cortad gection * nm Vine me nota) ie i]a le fork C) —+ Mutex locks | ete sual “? txilunléery 5 ° the hardware bead mel” tp au ‘the erttetat geckion = problem en e1atly mactersthle. to application programma . 2 TO 'Qusid th problem, beat tgnexr bald a bwone tools tp adlue ge ction problem é . Hutex locks th used . to protect eatitcal aect Uno] and ake pretenta viace con dition ® B pro Cees! muck 0a Li Cae. the Loek bef one entering Ps: ip the! crittcal aectton and oe. the. dock uthen Jt ends ike the eritical eect a while C1) 7; & tt fain | anttital ceckion neleane Look rn neleane while (Lawailable) ! t nraitti eatioas gq Qrmnlaie after } 4 2 athe, prowes asem tp be Called a@pin lock apinning oo Scanned by CamScanner The main diaad vantage huey waiter e while O protuss other, protod cockton ay ue C) 2 That jypes 4 bennuise, the the Ince to become — Deadlock ane eA deadlock more an rouah loop continusely problem preceaios eur thot plement atin uw castes! ecko oe gto enter La Othe) ip the COU - 4 qh wb in thot LAs mutex lock UW called gpin_tetk, prouas opine white waiting tee aval lable ekorvation due _to gema phere uel Brit, uthen we ow One Wl Biotg can be ne y oy watsna protest Semaphore 30 ate 13 Fe Py soait C8) 5 waik (BY) t 3 mart_ 08) eaviical - 7 ; ~ — — Psectin yy signal ti ergnal (8) 5 stgnal (85 Se geo Genie (2 Sa soy ED wc em ents lanai 6S) $2) seyret C8) 52. guan 91 can ereeud, (> oe BT catisn $20 Wat (8), @co, . Now execute Por PI not (8). » of Oy wart (s) tocaay deadteer, nial Scanned by CamScanner jui0 Signal aihtogether TLD 2 pir ass OXF {hie wip es ea problems a Synehwonization Cvva) — claaste. ty produien -conatumer problery [ Bounded - buffer prvblern. Bug en Paro dutine | CORSA Bt tb also KNOWN a0 Bounded ao buyer gite ww boerndl + produc proolutes On ibm and ator Ww b fen CON eiumer conaumes » the item farm buffer a a hon 2 poe bles i) produ io wreaked to buffer wo full ii) jonaumera lo . thterratecl| the buy pe u empty: © Produce and cangumtr Chane the following data- atauckure- - bufhr problem produce buct the to consume but tne 9 3 Gemaphere mutex ='5 U mutual en clrolon acteored to the buffer Semaphore empty => I] initial OL) Lhe 9 post ont 64 “buffer ane empty Serraphore full £03; /) zew buffer a full mea all ore ernpy. | Pood con. ie Scanned by CamScanner velalr7 : ‘ale rerho ian” ve et - ope omy hort mbt = a : He ete y ntgs coleamapaares empl Es? a i gernoprare fue Paoclucnr ¢ white!) { a did | oe ’ digi * (* produce a9 Lhe mw rent proor" wack COPY) enlay [pratt Crouben: | jean b ew ee ada nant prodted a the uphen - es ge ae] @ ' , r Cons UumbA pethobtwedalddle i waikepull) » wait Comubex) 5 /* pemoue an ttyun room buffer commend by nw premeinn = Bie AREY, an maesedtaete ry Scanned by CamScanner elt siete Reader - uvatker problern 21, 22,283 --- Rn a. Ray wh K i Be ah A x 4s Wy 5 Wo x Semaphore wetals Semaphore muster = 1d unt readcert -05 Scanned by CamScanner pinot .. are ante eat Unhen O philoaphr dninks » ies Ts a mel ¢ hen coblegan - enllea gate pnatoopher ge on + Poon tine 10 se Po ehep attele trim to pick off wane) : ne E Chowtat tp hen C lyr and git ne cpropottele a © A philopher may pick up only 4Ome . taat © Ghe Cannet pickup oa chop tick the neGhbourt hand nth oncpetichs ot th, + wanen| a huonaed philosphr hao ms eametime, “oke eats eithout 74 aay iat Gshen ohe firwaheds eating, oh pub Apu the chepelicht. and otart thinking eat ee 3 ; exe © & ‘philosphir pick up the chopalitk by oh waikl) operdbion and — nelemeto the chops waing — axgnal C) operation: Serraphore ehepaticn Cs] x" 1 Sritfatice te 1, do 4 . Wait C chopotick Ci)s, rat Cohopatick C Ct +14 5°)) ; ran l uk | \ aignal Conopoticx Ce); ae agnot CohopeticeeC Cera s]); Fe Batiye fer a ushitee | f wahile Ctra) | Chopew'uc [AFT Tata oo'2 By Thin guarantees tat no +O . | retghbeu are eating amultaneorioly. i Scanned by CamScanner prodests become hungry at wine kame BU zach grabs fow Lape Enbpaick, and whe ight chopeHck i not available for Og This ado to deadlock. pheloapher- qoawid tg 9 powsthle puame des eer 220) tek ane ; . 1) allow atmoet four phitosphent to alk adnucttancovsts) ‘i, tau - is) gutoes 2. philoopher ID peck Up hen dept chepsith only 34 bath chopolickt Ore available. me wan odd no. Y philocpher pict up he yt chopshth PH Chey {vwt and then ough chopthck urhenene cue: th numberrd philotpher prchs Up hor ngpt enmpeHice then deft chopste « Z z HONSTORS- Although armaphere proud o conuionunt ond oe ey cant mechonim fre proctet _ynchn ni tas DLL the Semaphore rooults Hy carer: 1) noailk Crnutex) oignal Centex’) Cae signa! (route) wait (mutex) enter tintp the enttical problam + Beusnra) proces violating mutual oeckion aim ultane Ovaly » exctuainn nequecement ° 2) warelenuter) OS wait Cm utex) _ problem ¢ deadlock occwu. 3) Suppo that a prvceod pri wadt(muter) 7% Mnal (router) 07 bath Jett» mutual 2«cluston b “vielakd or deadtock uth occur: Scanned by CamScanner 8) 10 qwaid tress problams » moniter & ikon Bute AY Montes mon ter name Ie haned voriable declaratin | funetion pred —_ teeta pre) "a ‘ i ’ : oae\ fuetion pnl ) I Unittalizatinn — tede (-) { un one co Cogn ) monitor 9 > Monitor Uoage _ ox ‘i e moniter type ) 00 ART dhak. inelidin wet of programmer dijtned a@perdtions thot ane pro widlad ‘tuuith rjutual exclusion within tre monihr # Schemetre view af montire Scanned by CamScanner Wd, to ume. ayntheronization schtme 0 A propsamme can aleur cbefine vantables of type "sondern * condition %, Ys + The operation 2, wake 6) means that the proteas veluedl intnin cpaatun 2 oucpenden! linden O Untd Another wveke. be ms ougnal () 7 me forke) ayotem call » np ae ole lit a po ; er | fore oy 5 Mone | ie cron D, pia 2 sug, } net { 1 prewassn > 2? | (fore) mea ages vet uscd to Create proces . ayatern cou fant) b talug 7 anguments ano Aetusns oO. procs tP-

You might also like