Docsity

Contiguous and Non-Contiguous Memory Management, Study notes of Operating Systems

Partial preview of the text

Download Contiguous and Non-Contiguous Memory Management and more Study notes Operating Systems in PDF only on Docsity!

oS Moen Manag oueut._ on DS: Memory a isa ma function that ly, ovali np —_ a reviont au re dubton ef. es vgrams auol lenses M nag ment is critical to the: conputer tustal ts ecauxe, the awount- ef wain ewan ore tS very limited . At nee time, ata Process. 04 aye eS fost. bo, to ayoidl I ¥ ocakion xelates issues, mewery managesueut 16 impertant aud tis mewory pad oddianink € alone. by mewoery Managgy- Mauory managment encom eval) key aspects ing miwory allocation , puathLti fo) ts : ; shaving axel cura ping Or 4 Managewek Techoniguce : el 3 | to a PYocees by. pr Aaron } d Tn isin Schewes Cac process Is given a single 4 Po_whicd 1h Jen hoad aud execute. iL sb {|B Gn iced ite | Sob ee NP ell ee Smb - || IP (Yon - Bomb Taput, Pyocer ——— Day aS Lee Gas _ Queue S| cass pueda et nN Toe Kis fi - \ ran cies. ana Haan ee Cohewe Thi is the Si lest. smesony naranagieds ements holes ees | used to the earlier g } et Computers. Tn thts, tebenie: thu finales: eaguaor wwory te divided int two contig OLA. _partitions. the LOS yesides pevmaneily 1h tn_one_ parctttian and. the user process_ts fo aded int the cther pastitio De. (Oni = Prog resort gs ui : ee fies, is a Oe. paxtilicy fov processes £0_onl an ‘veside , [ ; ™ A. mnewor ata ie : ee; the user LPes a eo on the procapt. . he OS: . ni S Lesios vogyass feonn. Ale AS te mewn = Execute the. proqyau. q . é 2 After executio voropt fs avarlab in: 3 The New: pyogvous 1S copied into RAM » ovewwrifi dhe. peal Us One - tily so Pavtion pong : AS ea Bx it hoot cemputer TD exe pal one pas at A Mind eae: ES ee ge ted enausory CPU rst check every. sonewsdsy aoe aa img Ilo usey moodle te ba. buce af ts etwieen — aul Limit fa that usey. - ; \ slases Os tae en, bee ait 242090 — Boppp Ns sage awe 3 bpo4b = 120900 : = Base Proc en : 42-0446 <— 120480 Base vedistevs Wlbere Tis proc 230000-| _Procen soko Starts in mmewsery. | joahonr Limit vesictey: Hoo much memory this: procem ae 1S: ptloweal » tp ee Co hou CPL apuerates ay addvew , thotddlrey wu be Areater ov esual to base aud ew thou Pe based: Buds Buse Baie liratt | n ¥ 4 [ero] Aes A 2 RT Yo ~ mie a yap OS : (alt ont oxrey) Mowery Managewout Unitt(mmu): Te MMV 1S weapons ale. tor the. banslatian of wicbucd - bathe Jeno vine el: beh sefliware ial physical subdvien ck uses ie! mead i Syste, us cempangut coryes ara buffer Leben the CPV Pe SS teu Sane bis a hardwave pena a tena chip Us v) Q integrated toto the contval_procwtsing unit (aa Ass \ Poot (Gindt Rey —f > 2 b L_—_+_5[ Comparator pi ceca x >I ANddo-+. LL Oy tat Ce OR aes MA . in f ; : os aero a Swapping VU Whew Main Meunory te not enol +o bold all active procenes ee GA axe_snotad tp disk. 2 Whew o.protes fs fable moved to disk it is Whex a proces fe peach oly. moved ty click it <2 fc boi ed th vital msuors. he leue soultrple syopparg ab govifans {h) Round Robin ores eee A Mae time. a uaukinus expires “b> Gp tig caret Suivi DYDLOAA (2 Sw ouster proces te (eed esis i Apis {5} frievity Based Selvdubling: ; Vv Lea lighey Priority preces arrives | I een poise prcceds 2 Sw ima lighey! a ‘ 4. Whew the luighey priaaity Placer catty sup in the Lowey pelbaite proces Por ee ‘- ps EE re —amecpaee es TPT uev. < te All —;| Po. |] Space a Leia” Fe : ty a Context Suritch Time : Lt mext.s procey to be put on CPU is met tn mewmry, we mecal tp cap, out a ince’ ve swap. in Faget pace eas.. : onaeweeerens Dick i ig yrucle “blue 5 RAM _, 60 context Switels time tan be. ven Ligh. C9: Proce size > loo MB Disk tianster tate < 50 MB [sec 7 Qoap ort time {s 2epoms C2 gech) . L? Susoup in hme ef sae cized fYocew, D opows an om Lotad context gwitels Sweep pion Hme = Yow [esd zi Hf kee. => Tics is voy baal baciuie, GV tetas walle wei l¢ waiting. Cystaul feels slow. andl unresponsive. a tp xeduce this ela 7 Paread Bi suiap ing the. entire proven the OS dhru: = Sunp gut ee ae actually being wed. a Tis! fs MS eoy tp vir tus f steady bebhastor DAGAOY {h really needs. TANCE mneuory (ie: PxOceAd belle OS boo mug Webeasg. procen Vie its as Sey “ae Lon a ex. needs Same mMenory. eg q uic means , if the OS bnew exact: moupry usAae it can “evap lew data mada deing witect gwikoles much tasber al) Paging: ; faging Is a mowpr cut scheme, thal eliminal the, wweocl ox contiguous allocattor ef. plulceel meu) CNc Ls 2 = lhe. process Pai hen in the 5 f ie pages from the steondny storage. into | the malin. wenety is kno ouin_ad Pagina Thyccigh this, the whe : not. have. to be in ee an be preseut aud Some. pages can be loadecl wheo aged ads J, it allbuss miare processes: auol even piece sei faxger, } than main memo, to wun Natual addyess spaces is: Aintdé al dots unite cdied Pages. rei Puusical aaldyess “inact divided jto units res Frdmne Puc these. Yoqos aud bea oe: aba the. Same. Si2e- Why. Pages auel_ Fr Frames aust toe a 8 Ae 60.4. les rawat oe ep sae size. co that the fhsek Xemain uochanged chaning addyer translation trallina Sioaple. “fast waak efficient anapplog ef pages Pe fia ces. Every addres as by the. CPU _is “clivided Sto tut q parts: 3 T th -a page number lp)? (ya page fleet (A) ive keep record ef where each page. is_stored tn deen 2 meee table. audthe MMU tomas SG A = |Ioa page cual (p) ts used as an_idex into a page tal &. it ant althe.p oe I FN of eat page_in phycicad memory . Pod U¢ d Base addven + Offset dcdtins the. papi l snacd addyers. oe = ‘ Page 0 Sa \[Pge.0 = re i” L Beetles: - “2 ae fage L Logical menery) sfc 2 “ (recers) ch, = To a seal Scenario oe ferst z La vor Tan * placa aE OOS anos - al fe waber. ‘S| ae inate’ ica =| Newt pages = 2. . —) yerorar yop = Tro RAST Viper = ar —— ee oloae old ‘ | |__| — b10 | 00° pe . apo!) | =} — | (or 4 | ! U ee a : lesica) addi" (pagitable) (Pasi addven Kpace). Space T inlba Doaical addlvers space Cannot be emalley thdus flysical delves cpace vi hint +f Logical addyeues ab teal yuubors 1 cxdtbesees mewcery a actuad chasy. re sell fax low _seate oil aual uk looo Chyaiy in eg batt. ve Co, ofllu lop chatrve haw-vwubers the vest — cannot We nedéoved to at all, (meu wastage, IT gd frauple in terms 4 bite. CPD has lb- bit lesical adclnesoes lo max. 64h RAM ts 1MB. ae CPU cau canl say." Gaius me address CID ke EFEF”. hold terse beyond thak canuot -be. wappe by the 0% ic! OP seam 6 locations hee, uiveachadole « a \ oy ok. Van K \Tpes of loging) (1) Sinpl vain aval Paging : Meuory mand Tieton Z ie Mirtuad sensory —> nto Bu dizeal pages. Phesicad mowoly =2 into ogual sized! Haw Back PAA 6. fits exaclly into me frau. ee The ee cid ia, maps Zack intial. page, rule te A Prawn el muse % ' Advautogos 2 = No exteynal fragmeutation, meus all ty are, : q t the Same size) ta unesed ep do not appa. 2 _|Grarvake haical sntewsp7y lew fox each pxd ; oveaee f nrg meas facde proces think. it haa, tke mw cotinwiguA Memory ¢pace » eveushioush plujcical Me is Sabteved. - ae Simple. soil aivect mapping boarcal adden 2 page ie” Hack. pode mutdoey divest indexes Hie ‘page, table . | Disadvantages ¢ 7_| lavae pase tables, means In 32-bit py 64-bit on ee Tae yuwAbey af pas {s. Luge, oR if bles Cerna. abot of en i Tug meuub74 Acer th per Teboyenc, Meausl_ me lt ad fiz: page table entry s oupthex tid acen the actual data. 2 Rowe table pyevhead | mesuu extra mmeuapy y Lil —d lhounaa gomenrt are require ol D_ctpve anal wointain page table fos every PyYOCey - DAVE? nasi fo Feceee 7? meeded . Cautes ~mousery by cueabing page tables my Effecieut px Spayse adden Spaces. Disad veut ess Docvease Lankup time Leuliple Weutory 4 yh Consplex stauctlve toy havolwave. je phes ceesped) fora’ fit) Hashed og e. lable + Tn 64-bit Syct ous Logical addlyes space {s luge Mosk of itis unused, en” anormal pan table. ala waste ama ive, rn ee Haghad Page tables fix tak. User a hoh funchion to quad Z pee. fodole evibviad s The hash welts cmtaing Td Lists | How it pee 2, Om a8 Take the Virtual Tage Nuusbey CVPN). i beply a hash function fo it. CUS the Sea dP points toa buchet in q hash tal ag (4) Each bucket 'holal a Linked pict (to haute col ision )) (> Mlable the Vist uwutil the VPN matoles- Tea watch is found , we get fue ply sic i frase, if not itis a —- DATE: —_. ies (a Feels entry Mare: p 7? VPN aed Page Newubes 4 Used to sapien the Coy rect mapping NG: PEN (Phuycical Evame Nuubey Je Tells whee the. Oe ; Ete Liver in ply cical Meuse. . ay ¢ Next pointer: Linke bo the next entry td the Lobel» | Dish it wu ple MPN« bash ty the cad. bon mentation: Segmsutabion alivides cacks DY OCEN iuin Several tegrncsits oy sections of Lif veut Sizes. & Segment Zeit om aA main puna tat, fis tron hae [ie spent tables hid igailaene 2g te. Every a isa Ae beveict Legtcalad ReZl . pace of. the Progra . i aia; (z2- These eee aye A variable. Leughh $ yes veHocks the users view of ~mewory ~vodhey v2 I thas the. Computes. plussical Bidauisatte hon aleing it calty (a enaiuage usd protect DYOCEM ZA