0% found this document useful (0 votes)
3 views

Unit 4

The document discusses various aspects of memory management in computer systems, including basic concepts like paging, segmentation, and virtual memory. It covers techniques such as swapping, dynamic linking, and memory allocation strategies, highlighting their importance for efficient program execution. Additionally, it touches on protection schemes and the organization of cache memory to optimize performance.

Uploaded by

Divye Kapoor
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)
3 views

Unit 4

The document discusses various aspects of memory management in computer systems, including basic concepts like paging, segmentation, and virtual memory. It covers techniques such as swapping, dynamic linking, and memory allocation strategies, highlighting their importance for efficient program execution. Additionally, it touches on protection schemes and the organization of cache memory to optimize performance.

Uploaded by

Divye Kapoor
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/ 59
Uni}- De Memory Management : Basic Gare Machine, Resiclent Monitor, Mubkiprogrommive vsith fixeat pascitions Mublibreg aren eg with Vastiable pasilitiont , Protection schemes, Paging. Sepmedet on, Poxgecl Segmentation | Virtual mamarey concepts , Demand. Paging , Poxformants of dumand paging. Page uplacement algorithms, “Thrashing _ Cache memory. ongani- zation, Locality Beyond Memory angint is ~the functionality of - &y Be back and OF manages Poiemasry mm & moves pees . ex! ' foun blo main mpm and chsh wOond vol Lesatin 2 Mf mgmt Keeps track, of each and et sn on “ala allocated te FO™ TA checks hoo me ual be atte cats oa chee! i ok ve - P mien Segeved ls of ecthye fy proceves. §t ducal cshich procs at ushat Lime’ SL yrosks cohensver, some “~m gets pes oy unallocated and corousp' ora. uepaertis + Sheila © Process Addstess Space? mB of lagi cot add that a prec sufeuntes i > ats code - €g whi 32-bh addressing Hange fom Ow OMFS ie 13) possible members fora Joab -hroufiat size of 2 garg Ts im Ue, cdbolveyses can The O log} cok rene pf — Cha tosh’ om to physiol codes at Hin ime OF ‘ty the progam. $a Swapping: 8 TL da mechani tn which a precese Can be. avappeof Jemporavily oad of mm lo o tondlastyy Storage, ane} Amake thal ompn avedlable clo Othuye preesses AL some clatot lime Phe s/s Stoaps beck Ahe protest fom othe es Shoroge, 4p. anim > Though pou{rmance ua usually of fick by swapping Prva © hat ek helps te Jucrning mnuttiple. & a prouges in Poult that & use “Swapping Ss also Rroon as a lechnigue fer mm Compaction .” =e [eJ C¢ Py gor fou Fo wait i e=e Ganp our Suap fry i Py Comes doce ef a Saray “The total ime ctapen by ssesappiOy curs includ the op, vw aaa tne! enctint proces bp a te ase and thn ‘ copy the PROC “the chins the precas tak neg Eq lel gy owurre a En eee clonclasel haxol ole Seoopping votlt Anke place ras & ce wink cvound = 1918 pH secon The Achat bansfoo of The feom with toke 1oo0K process “ > DOAEKB/os4KB Po secon), = Q second = 2oo0o , mS 7 x SY rratat Step Rocod ng of a User Progam: (SMe. Progra Compile | acsombler& object Hactuete t Vue ol pect Wnoctalet * Linkage Getrlot Y Compile. “Vins. Wad iene Lou acount: The biveting of, dada & Popa bw mlan add try he dore at Ulow dye nt Phong © Compib trone @leed time. @ Geediva time High iuet languages au —Convetclil jasly me Coola, tr severed ee Compilation , Unting t fom an c4eecevtble file & al a teat lin i las time daccling 4 thes exccuiable nly wrnin Memo ray , sabhs get wy ; hich vast j Sp the inkor oletvimins He IO cut ali, colchroys vohen stumning then ee ey cou dina he Vg rita fhe forme vlneation wb Mun + tables et ushich , joh Vesta: t > Tf the Loader Pelsenine on oan an (CO be loaded Addbuws veh — susrrarg , thon the prog inte iit ottfpunt otations i mfny wach Aimma, at 4 Our + > Stecic Ve Dynamic ae ‘ be rade The Choice bls Static ot Dynamic beacting. usb otk +he Aime Oy Compile Progtarn being developed - 2y Statice erded , then ok Ha dene of lompilaction , The complet. progiarn wilt be Compiled & Lnked W/o Jeaying any extoinal — program or-moduly,. «The Len toe > Combines object. Pragtom with — pth Netesas object” mectults imnty an Absolut Programm , which otso inclu <5 Aagiat add, td x lipnama taclicl Pray 077, then Compile Lol lompile- dhe proper Sad Pan rts oregon pte Cae 2 facludle Ajrareically., only sufoenus with be provid eat & suse of the wok att be dans ack erection time ° a heclune - 24 &S “a Al whe dima of -Ghelle lenclag , the abselids proguara is | occ) nto main mm rm orcle Sal execution te ~ched,” | | And 4p clynamic Aencling, Dupraral c svoutiras of, Hee fibrasa, | axe Syd on a disk mm sulotaiable foon and ase. | cloastest into afm only wher thay aie rast by Progen, Spdic Vs Dynamic Unking, Ga ued ,the Linkue combina ell othe € Progham b When Stel inking crodubs resold by program ints single exe cuctable avotd any SuriLurns. perder), Lathan — clypnantc Hoking, os used, the actual! nodule oo Librarty with the progsaun , seethuse. a sefoune. te tha dypnarnic rmedule 4 poviclid af the Lima of completion & Uniiing gt da vot suguixed to ink, € Base Hachine - ' A wk yu Mae Hesee, ther J m0 -mjfen congyra le give i ry Proyarn oll ofthe mim, with mo Dmitedion. This provid maxi mum fbi bility bb the tee & amin. Wo wt. Thaw i rao 2pedak , mr. Nio'& mo mel ter ap os ws Horower |, thuw xi mo OS gowiees, the Wer must povicle Bi OF naps by Galvin Weblink: pete ran Ra: Moduin Os by Terenbawun Knowhige, Gu by. apehi Tei Pa, OS im ROM= Resiclent Monitor ont ln “5 One way te protect Jr os Het Tom rey x pat ae as inte Rom, thas Unfer tunalaly. OS ofitt melt Some RAM oO i e 1 i t ec sir ™/m “foo Aw own operations & fhis cit unprolckal t nm Device f sng pargaam , Xeeeas oF mpeclifi callon ing any. menné } pory Aolobusses Mer Mok pooleted erlhut . 9 2 Im this environment , af ig iemposcible to potted peas yon Othwe processes. Th gort 4f envenmt was cesect im cay. mini computer ¢ micaCompiders eq CP/o1_, Apple. Bath of abe ase Non- lonHguous M/rm Allocation. Posititions’, Orn of th fist rmechanisry Laeol tb Protect OS, and @ to proket procuays from ach ofhue was Pecong, Hew, we add hoo hjin sugiels to Am add clreeds; The base & Limit Jugs. oH ~the Wp add” 15 lewett “han oiriel 0! m ‘highue tran ‘Limit!, v/a he Conuider Wis, an 10 | ! a6 Ome problem votth posdlitiors 4s hows much ra/rn ebLotedle imidially 7 Th too Pitts He Prots “ened & chek Cotticl stun out of Irn urhen dali 4 too Touch, hers mfr i wruseal & wasttd « AL Hin polos, tet ub otifine A mu teunt Logica’ Acld® — ginesatt by. CPU, ako Sef fpeauel ty O4 Virtod, adcl® But becuse +he prow (an mol ratify, he imi sug sha othe process gees icy logy cout, mlm as spied io aize. Physica Adlon as the Achat, meen mMI-m & ats owdivn as geen by 06 Sascly al Jocation O, and gow up a top Aocat vn Dynamic selocation senda a pulotatlon Sug ist ee logicat eo ite | (ees GH sof by RAN. sclotcion sugisie. physica Address mn [roe ee ou —— ge ue ase. “oo methools fou mn mon- Lo ‘ afm ablotetion Conigis _renemery. and The 08 main wok Lb Jo hues bonsfor fo” seconded afm to main ohm and lopcatl addres ‘Beansbtss i oly phypicat adda’: w, nog we have to sudy how both trae bask. Ahoulsl be Complte ° [rie on oe pt oH ot de oul 0 rT ; | behove ard aftve poaermaeet a allocaticl : O Sprabalie Adduesses ? The addtewes wed im a four tools - The vosuible Tame, Cconslan and insbuchon Jokls are | the basic ehrnenty oF Symbolic — adebrew Bpace.. © Pelatine Atdrescer + A the tins of Complain < — Compilue Converts gpmbalic Adcreyes ints sulative odd” Q Physicat, Adlelwesses ! The oad, quvbs thas oddaxs ct the tim ushen a. proyram is Leadad into MIT. Vital 4 Phyen kheans qo Tes ee fo Compl Hoes & load tora addsws -bincling Scheme. Virtual A phypiot ~ iff fr execution. -lume Cachan, binding Schemas The get of att tapi cotuns gpl GS ; ab 4s vefooud bag a Aopiek — ceauts amce ™ S Seok Ch alt pyiend bun covuaponding to Hue begs audbeayes a suyoud bas phypitole coldnits, 5 PSH € bo done by. momo, rmgmnt wre hyw duvice. MMU cues fetlowsing. edanem + Prysiial aolduus » 2 The vats vm the base sagisttoe i adouol “ very. cod Jermotid by & Wee Prout sushich is Waktd ax offer od thes Hime uk cb pert “Le Ym yf fhe base spice Value 41 [0,000 Han an a uy, aad location Yoo wit be clynamicatly suatlocated 45 locadion lolo0- wluak acldseases yt ty Converct’ virteat coldrey, ) o> The ue pregua dials with VI cayer Sees Pre Peat Physical exc testes: (on TLAUVWS & WON CONTIGOUS MEMO Fao marneny plooqye S5Re__ merwecy — ALLO ae SOCLOK AIOE fos. Rua’ parser Ws of 4 Tasrnasyy FKL Acco, gmt Tractmares and VIC! NCIS To owe Awe UME , WE YONe 00 Aqhor f nN Sada Mam ( amos foscvon) Secondary wet (\ asec, | Rowe) Dexived dora found on an _ re D ce <—_|" “he OS fas KOO ousporsitstity s by w dadds woe F pee oe AMnoWrXed VO Secs Ly —Toornsare, logos add> XO. pry wok Odd ROS: “Rico Ramnsy, @tlo~rdvors Suhanst 5 L. Cow ours 2 omer allowde to wel a L. Non Contiquots - 7 WR A Ls Yosouens, vided CxO BOOK, Gincl ore A Hy ¢ SS ww 4 grew) 4, ON Gol pa crvab un Prue vf ( (alse) dow ax ) &R of ctor , (09H) Mit | Ld & 4 hpyeht hihe ‘ \ cedity HAT “ea of we uae’ ae odd Oud { boo ‘ew tivley nod yor MOmon Yor celta q Ps uf ioe \powe Io (4B, page ng, ad ve? {gone Low On OP, dy chosn{ned y: : avs teeta L A 4 \ ule ib Vy Ve P2 SKeQ Clow ou oMiotocyved op, Soc’ Jy OND NGaIe, Youd Kay Lon’ Ades WN UN (ohfiock y firyou vend f corn Pag taxon ) = Com i nnu rs WWE Cadi ae "Se ar nary oltoard We ArQN\Qos Yoryion ‘ Adv 9 Adda, Nawmno\ary Ord Women aceon - us fooa Os, Lae LON Onky \yose odd. ao Lannie, Odd’ of uy Blerwon\ » Tis ody A dllen Lape dyvenne!. vt we «| wan fe { Ae { Qe wou oe ld Coniqueus MEMO allloodton = 0) a Fnel BYE Noialie 8 Rom¥ow oY “ ¢ 3 Patong Pies wu vse ¢ ———wnT «, Ta M11) Ww SHR bagi BRST 1K Poowssson BR B® SS Gined- erire EMONY P COL Qer alld RL AOE \prenwons- ee. A QR, TUB , wor alo ore - ence & Wy \ow S¥R EGcodision AO % oss. of \es rans, BO OG Joaudoowr o— Ond ‘pscres One Ye [pes lense fox WOSKS ok ramon: Gd) Tmresroh Loge AN ONON < ee BRN Now = conriguous, men | Yon Qudr acces OM) marvworeyy ASC 0 _) a RB ¢ ILL [7 BY WE Weal AO OLE Cc dixeckty Loe Qo un \inted Vian Cand 10K Zz J Wh Us P= SQ Xs We Go allo Tr pots pointe YOUN “A ‘ ade ay § HRB VRB YY powy yo OF es > BX ag HW uses powers Dd boo] ere aegpala™ + i oe a cram Bent WO fined You psoas brshiud veo! . COCA CAO, acces direy. \o PRrenyow on due 40 > \nrervoh \ f = VS 20 - Gaga 200006 ost FRAO od aletore Wo inure: hes fa > 190, av Stott SO la WO2T eos HLKO PQS AKIAC trrecrah Leognasntoaan PA Gaur oe amantred Aechuse - 28 Bas. Machine 8 FE Reatclnt Mongo | Mernong. Allocation, om ges uti maytormang mon- Coritigk - Fixec| . | Pagi ang + vaniable Comtigious Memon Al lo tation [ (sypte view) -.62 Gmronilalion ee MM lsuabty hes 2 puritions slow Memon = OS srestcles in Pita we . High Meraciy — User proleyes Wu helol in hgh mm c Each (1 rc Be (single - fe csctition)/Gixe d-size) attocalon bay 1B ran Se pen intuenal pregmentation y a S is pe Sf Ulocectom, swhocedion -rugichse Schar t Protect we prowues form each ofthc — cure] yee Changi “OS ole. & ata: Reettoterion sugiske Containg value of, Smelt Physic addees whos Limit stec tonlaint Stange iad € Sh opi coldrers rousl be les han tre timiet ougiston base. pose +Lemet adlduess Yes | | CPU no remot PE Ke [ar 2s te ‘b OS ee =e | eruiosl- Paretite Musteple [vasiable” Pascliction Allotation’ Th this tyre of aulocstion,, M4 34 livid ino mumbo of pixed~ size pavilions, whure each — pasclbions phovtol, Contain on! one precess - thon a paselitiow is fees @ prowess Sy pelucld sfoom +he Input qpaus and Ji ond velo Phe pus, peviitiens hlhen the poocas Worninadey , she podltion recornes cveillle Hyer ioreriod! procs = kB 4x8] ake OKs eu aue thee poitilion cutlo tation eulgorsine! OD Frick FE find the ist blank apace whow the waiting Progen voit fit + Thu a fast alyo , bel igtuadlay, aves @ smedlloe blank Apate, exept who the 4ib exath « ® Best Fit > Pine the spesce -Phevt: pet pie Ha Jobe. “6 = ate Least dt Ost. suprisingly. shy 2s mot o goon! algo, art Asaves a. Aol of fing, usele holes ALL ovet the physiod mlm. @ loos ait % Aenol the biggest! paw: Arawing phe biggah ) semaiindure Ths Jy usally. the pavclitiore culfocation alge, Chose by systeen Aulgnt . Fist fit 3 P= 210 K with be altocett tm Reiter hr. UldK + Peo Kk a Pus Yaek wis wot ind any ye hosclitiion, to Actornmediat. hence Mest, wait until ethur Bor hu «& Pwappeol ad pom alm. fre DDK wilh be alloca ‘mf fo qth with be alloralid 17 p Pez link vist be alla 4 Py= U26rs with wait uni far. dition 1 07 Pasdiation + uw pus: 1 fasilition nun t® 0 ov \ po) oo } WA I); Wy, pr ; ooh D. My \. fe lovek WML E Slorlte Rasutition, fasdition Decription Table, ot. ssvf_08 vs 4 ‘ OS he 1 sok * 20K, | eee f2 aK SHC Hs Sk svt Wi ; Suppose Pa is Suapped out and neo Prous Pr vr p20 « 7 ey YZZZ7 cr 133 VZZZZ7N1 PHubdipgrengnrnry os Bp A perk Pa agk Z, b+ 199 Keay with Vasuable fasditton, Ie, 2ool< gooKk end 600 lx -cOlK , e 212K, FIFS, MN, j phe pasclited Of 100% for es of Si he Processes ee eae aac it Age. a cocking and #26 K & d : p50 ooo ——— wok Spots pool p> [ano be0 KK > best Att os zk PN ° hook fo Ait ° | WLLLZZLDI y 2 2 8 2 abe Dale °° | Psst | ap A 12K 3 |loov |300 7 or 2 7 ak Fra |ay Py 7 + [ask 4-[1300 | 600 | Reyee | p74 4 174s . « oo Leclue - 29 6) 2Tt sees clo the Condition of dick itn uhich ibe aya. clivideol init Pies Scittvad anound the dish. Fragmertafion eccuves actualy when you we @ disk Feqerlly, Creeting, Aadidng & moele ng ils - Ak zom point, the OS neds ty Shoe pasth op a file im mon iortiquous chutes - Ths epee Imvicble ty users, bt Ht fan slow clown the Gerd at hich cata Gu acewed became He dick dive rou gearch tuougte ouffuant pods of the ditk ly put” Togecthese A scingte file > frogeenta tion Gan also Seber lo RAY hat bas rail, Wrused holed Scecltowe! hoon tot id. This “4 lied exbyrel Fragmentation . "with melo 0S that tue oc paging scene , a me. Gmmon ype. of Ran piegeadicton Js ¥ called rolimal fogredttion + Thy occu when crnjen Hs obo} ‘™ pesos 4 He “pamela ws Aoseger Horn te compurd 4 mim — saquestid Ras Contebts by Galvin Weblinks * (youtube, - Com / Krouslelpe Ga, by Sanchit “Tain Po: Hodwin OS bp eumnboum a Non- Lon Memo Allocatan. Due to ex pregoabtation _aoye to non- Contefecougrn), Pg > faging is a ™fm- mgmt seherne. thet pests Hhe phypsicak add cpace of a process lo he nen condigecd = basic method fos implementing paging involves breaking. Setordasty | physicas mal inte fixed-sized blocks collrol premes ane brraktirg logical m/m (M-1,) into blocs of the game. gize Called page. ) XS > if we we cliffount Size postition in 6M. then at widl be. oti bi cat ca pera, SH into MM - So the boudition gize dhould be equal Ve fixed ize 08 Aame £12 Frames, [ow Ja LE » ; |_—_t Lagicat Phot eat Remon Semeng > Boy | add” gerwcaiak bys CPU wt Olivickol testo Q pod: oe mumbex Cp) and @. pages offset Cel). > pa wed as an index into page fabk. [ | es iw > page table Covilaint he base aolel of each page, ™ physicot os ™, Combined wilh the ct te chine the page Hh i gene the omjm writ - qtis dase. adel” a physi tot mim acto” “that 0 jn CPU G pgsvat Mew Model of. logicot & Physi cof Mem Paging, ize) 2s defined by ie of 2, vasysng b/w plc, chien, The pege ete (dike the frame Re Sie of PAGE a typlatly Sih bybs and 168 Pew page » depending A powest on Cem ral a - ne Mag >i the 02S of LA ~paw av” and : i oad cM adolaeasing ends ( hyti or wok) then Oe , weal mem bile Of LA aluignate the page 7 re ordut bik oligignale the page. off sed * Th, LAW as follaves foge number» page offsek Cr fe m7 mn M0 J od Lohot, pea an inder ints “He pager “ble ane » the displacernant wHhin phe poge E4 fags size 4 by ls Physical mf 3a byte (8 pages) * 0 rans ol2le [a1 7 3\a J l4 |< ols L|& a \s i rea Tre 4 a ofa Ht oli t 3] 2 we Page Table. iv ja |m 3 ci 3\4 fo 7 : Leie] te Legicoul. i Hemnog PT [| _J Phase Nemory Legita® onc” © pag. © O offset ©. cpocuxiny inte page fewle. + page oO ain frome ° LAO maps ® A 20(: Gxd)T°) LA & (page 0. offset 3°) maps ty PA 2a(: (s4)93) set 0) maps PA ga-(-(6rryt0) alfset 3) maps be PA 86 C (oth) nays te ra VC Gxt) LAX ( pages? 1A 6 (page 4) Law Cage 3" ose 4 ami G cseulocatt om . ofneate fg 4h page Size = 20NF by Ee a prowuss of plus ips byt “TH wooutal be cullolotedl 36 Freres , . ' resulting mn pera pagranditen My r0ug~low b= 462byke A. pect Wrfeunee& 42/166 bytes would mud BS pages DAL proous gle a | h Comsidin a LA space Of BPS of jo4 wore, eae opp Onl a physi omlen of 32 frames then Ud How many oth wu in LA? Gi) How mane bik ao in PA? tel ol lel -the m0. of bits im physlcal afm be Hun the size of Physi cat mn = T? Givens rw, of bags 8 oe ° mo. of “frames: 39° 2° Size a each fares sien Of each P2ge = JODY words a al’ s 2 then, mo ames , f= ma aUR? 3, oe ag” > m= 15. (aac bis SO, suquind MO- of, bra jn phys ot vofrn= 1S i ta, va) be’? Sierilanly Assuming. 0, of be im hag ™ of legival fn =a” gy UPSET alae mo. of Pay “Ga of each page Qs aye then, He Size clan - h 8o gr: aK a. bib in lagieat mmf Sp, -Md- eb yo equine How roared pages voit be suquireel ta (onvad a LA of \e bib ind PA cluseung mopping. + the size of each page a Lk, Size ok LAs a® cS A =4kK = size of Logi tol om|™ _ seep RE No. ef pags = or of cach Page jor4> 9” \B a] se : la ae Ie bits > Avondale mthed a a8 = a x8” a] rary se m i? a eal am-m> 9b Haridrasee Support fos Paging § cen agye qf OS has 3B over” method tex sor Page fecbles. Host Of the os allomir o page able fov each, Process _ pith ts stad lor the oth Lis asked tp ttt p¢ secloacl the >A pdntor to the page dodle lege slo valuu im PCB, ushen disp adehue —_— ; \ 1g exeeubon Phen vb mes Q process ter and st defines Sugica she Comect Vale WO Rego tnbe . page: fable carr be done YD = The hfo Vamplamentadion ef hough Ls fin anany way» Ore appreach i uslenge dictated egisios, bub Whe usage OF fable is pats factors, onty aL page table “8 page table, his apprch seagi slow 4o pe page pratt + for “amer<-/lange is aol fable ents 0 this pobum 4 jo we & Sproat = Skanctarid — golehom “lo Pr) Ayanslat 9 look- romatl «fast took “P hpo tache, Cath auide buffer (718) —> TLE» aysoclahye, > Each enh im TLE Consisb >TLR wntart only a we of, the page po a Geuss"Y as pear: a udun A ia gesakd ly CPO , Hun ads highs -cpud mim. op & pak “eg & “wah jeble erdi4s, gage nur be et 9s poueatd fm TLB. . vik FB page m0. sfound im Te, Tt wlld TLE hd by which frame 0. LL immecliadeLy avou lable, 9 phys toh apm to Aceras tb - > af The page no. 4 mop in TL®, Pun 4 (ale shy cases M2/™ sefoene, 5 he poge, TLE mis dn TL Bs sable “4 mek with TLE Paging Hoste cus TLE and ‘ts 4, i due System tata time >it 1 Compile Sys acer will Jape “tay Jp ace mm then rapped omfn " m TLE. dims when page rumba penne 1? > And whin page Tumbye ‘yg nol punt in TLS than oa i “4 suquivu “bi time Ao acess TLO ym which PO mumbue oe ee mol porn and {) dinm fo ceeeess the pag 0. 7 page table & thn by Hime w acens amr fo, we sugusa olal yt tytn tome ushen Peg iD m0. bk snot prent Im TLE. ‘To find “tho! ofpectve_aceeutrne, Cavertage acters fie), we mest coeigh each Case, bog da poobabili ty 04 | TH hit vatio * (dit 42)+ nies “soko (r+ are ee i= Ay for a poset culas Com putin hfs > ————e Oe 96 able tr aa], Comsfcs a Pew ng ssyptern vith Fhe pagyes wb af a m/m -\akeg 200 manocetonds , Noe dong dots a Roget earn suefyurnes dake ? Ww) we meed TLBs and 18% of ate pet stable sufyone. aU ‘found im TLRS what’? as thes effective: 2eprene, Hime (Assume that Finaing © page-beable. ery TLRs Kes zu tiem, sh pre erty sprue >. Cw pagiel mo sajyancs vont fake the amount of pms to peasich % page 70. Yrthe — pags tech le which, a fame, Ob The acount ey tm» of wafer acess pero, POG fale 4 pruert to mlm . &, He p ogee! salen wikt false 200 HL. Ui tk gatio = 49% = OFS. > Pye hh talio 4 (dt ba) + miss “soho A (tip Va ta) opsal 0 +2005) + (i O-4s)* (D4 2004 200°) Js50 MS. Lecture - 3) qt | Seg amenlaow > Th is another deobrneque fer the mrontorrligquo ts Plonage allocation. I as cbiffeunt fesm reging ae pags wa physicas fr mactexe and — ene, Oe of fired size whereas Logica’ divisions of a program atk of vasdable size. yarwar Segqounte ase cond hence _— J is a eof cmeest chernas tha Sep Diplawnert Weblink: utube: fom oh Br. OS Conupls by Salvin rome tah By Soh Io: Nodssun OS dy Tarenbaum Hasielvacce Support tn Seqrrertlaten, h PA Segment phe in which cach enby. ay & Legicat ada @rsists of “wo peut 's! and 'd’ - The value Sp offset ‘dl! omat be Siw O and “the Semnt init ~ TE sit is aot 40, then we hap be the OS with an Cseere - meccage im Addlvesy'n ushich Jndliates thet he legit aattege attempt — beyond the Stee. of, Segment Th the offset vale. gat then Ot achlef bh the be to proluces “the add? iy phystat mm of dura byte Seqmont Bde. 2 Soe size Of [a= 1 [3x0 | Fo [ew }—>[sfa afer en Tap, crate] vas t Stage Io00 A Sepment O o° eco LZZALA Joo0 7/7, 4-200 YY ‘Seqrunt > 400 | Phyaleas, emord, c Conic = the “follocing- -seganeril fable Valhoct ase the physica addaess jor she ~falowoiing. Aagicel — aelelseesses 2 W 04380 uno Ci’) 2500 (ry) 3400 (44142, Fer the given wlepieal add” the first digit sufoa ty the, Segment — number(s) ushile semaine oli gets supe bo he offset value (4 ) to segrink oO hee im Uy 0430 the dint oligit ox ancl #30 safes to offset value “pr the degiat adel re#s 5 (o+30)- Alo He Se of segment 0. cont #9 0-verpoge be Offprenaie. tome 4s 600 as shown im given fable. Physical Addeess fos lepiok dlding OFB0UIL be =base ¢ offset (430) +219 4 4807 649 Dd FF mg addux “fon Nos 230014 loz 2310 Gi) Phypient Addu for, 2F00= 904 S00 > £90 bud “ct Sk fmnpassb since. Phe Segment size loo fo. tt 8 Magoct aos . (iv) Physik —acldsur fos 00+ tw Physio® addy tov 4i2= Athiged foun lae) < offset valur (1129. a 129} + 4002 1424 ods os he Se Of hecture - 32 oe n Segmentation with Forging | lad get propesclics Oty paging No extsinat fraqmenticteore — faster alloatore Exploiting geek propotia of cogmentecion —shasting — protection, Cost a smoth, peyfrmane Pouyin 4 foge Table feat Nie Gach erty of segenorcd ole Contain the faye Cratelseuss & size. of Page fable be weal ter mapping. of, sicledeol P94 Seypants - weblink! pouitisber form “4 Jain see Conepts Py Galvin fener bdge con. by comes Sal Fach Virtual add” fn tombined cysterm consis ofS tay, Segment 7p,(c) , page ~2-(p) & of fsed(d) Fr spent cote field she give 7h Aotedd 0. of Pages and thyufou, anaxirum page 7. jn that Sprent ss fiom O inskat af, the Sees of Seyret 8 discoyed « £4 Prenton cou from © t 4 So the Sit fietol Cortes porcting +b shu seq ae wv A Gmpul Systm has Acpmnented paging ach tecture whic mm ub in byte Addsugsadple ‘ree « Bot en od Praweok aaldnen ypaws Conant by tia cach. Viottal add®'y dlivideol mt 3 Mon- overlapped equat wit dele » enohe Size segments. The MING has a tye eae , erry of ahich Conairs the physio’ cal of page fobl fee Sepmunty PT as docd inn 2 Combeb of Q be PT enbouiy . Acura +thoib he shat op cach ree on Wnitignol powest 04 A Hon eshedt 4 Pre ve apt page size im byt fo Het page be ie it? Huguines od mork one. page & spot? i) | | | | | Uk, pho min page size 6 a bys foch seqnant “Kk size Ag = a? byta | So, Pramas at mim Space oe P by tu: Size No. of pages Im one cqrent = Te re) BM, sO ok a c 3 Given that, each corny In Page yaks & byba long tn the no. ef PT ennies in PT= z. Qg So, Ja a”! (ian) b-m-1 & 4 ein page Size wD Yl cad’ consist, of, 98. biti} o Vojaod, nk ne, din a paged “gyreonited Sys, 1 pi awe Pye? oll aplaconaend , ancl} bil vue peg ae, Cobeubntt” oh) Mars segreert Sze Of thie 12 bila as ey page enze. Gi) Mine m0. Of pagar — OY) Hav. 770 pre Cage size : a "Play, Sequnork Shee. * at 9 sie of lopital acel® Hap. 10- of pages — Size t each pene pay 2d a ve _ Sepenercl Lize Page cize. ) tine, of lagna aa” Sze, Of Tmax stoped No. of, pages Jen Ones #G prtl = Mar. mo, Of Seprerds git ~ ol 3 = & eo at \ Virtteat Hemera A Compute can address more ‘mpm than the amount Phypically. imejatted 07 she -syske Rig era mim is Actually Cath "Virtual meme} and wt a a aeeliow of a hard clitk that’s Set up to emadate The Computer's Ram The rmain visible aolvantage of this shame Ju that proguams Gn be danger than physical crnemori Viduat, ‘memooy— forves twor puxposes Fist, # attowe us b extend the Ute oF Phapicert ram by using. digk. Sotand , Lt allows us dlp Pave omfm protection, because each Visbeat colelurs as translated ‘to physical oddest Bate a space. whee Hasge programs an store themselves in -form of pages ushile thew execution & only the Seqpid pages os portions of process ote Loactedl foto she MM- cen suat Scenasiio, most proces NO mar a0 ~fheie pages ak ome, for" ‘placing, euasps" - or handling (ode du ot reacted tents that: eee esierol OCCU, Some af ushich Wa quite pat _ tesclain options & feetwas Of a Pregeem omay be uso! - Hany bobs wu agsierncol 4 fitec! amount of ROS Seis ae nie only Amat cumount of fable -s chatty Useol Anvantage of Virtuo. Memeng, ~ Loge programs “Can be wonitlen, O5 Ss huge: (ompasued to physica’ nfm: ~ less Tilo Hogquirsd , chacls Ao fortoe t aay sacgpping + froerses - Votual space Available - Move physica mm arcuilable, 03 qrogeas ane staf On virtual ami, So they occupy vey Las spree om actual Pp iat wm. ‘ Virtual memory as Comment iroplemerckea bg olemanal pagina. TL Can also be fnplemendteol lay Segmentation? be useol “D provi pyle Demand _spranteion 2 aa Nemand Paging ¢ Th Ss quite Similan bo paging, Syap- Oub eens CELE L y N 0 P & R $ T v Nv oe tooded ushich wll be megui mite only Hhae pegs UO Yaa la ee the process irnmectiatity 5 the snot -roovedk fate the 7A + ae TMAXKeA ay Pages rat cue frvaliol v7 thee Page + Por en tnvadil ety the Sut of the fable ts omply. - Ten cone of pags Het cua, Loaded ™ aa cmanked os valid clong with Page? abo phe memory i ut coh te fire the seoappeel ovet page: that is rot leaduet cohen phe proces Suqutres any of the oge . into tht mm, a P dap Js _triggueel & qolleieg. ae pope fous Map Sleps axe follewredd , © the mpm add® ushich & srequusteel ” checked ; ‘lo verify phe suquest Tale boy he pros. Ip be gyocetidl , the Proms qeuninaseal « bythe process Js fist Ory BB fours ' @ In we +h Dapeat by the pros +1 valid, pe fam ts Lotouka possibly. “from ao fru fame Usb, othe Sugar page wilt be amoved aan weve the b Lisp specified anon lo(eklon eohew @ A mew operation tis Ahuoubeol mecunony ge fom ash ©. shen the To opoeation ie completi y-Hre Protas’s page pe is updo! with the need fram 10° & Inverted prt 6 Changul tb veld @ Th thet (austol thes page fuel mud mero be shot from ge igre \ 3 | | fejoune Strin, _ | 7: 10/1,2,0/3,0, 4,2 ,3.0,3 and tww ae 3 fram Availate i the mm. Apply Ft Po stblatmint algo — to “fimel page fault: Getocly dnarwwly “4, ©) 1,2) 0,%, 0,452, 3, 0132, 1,2 90,1,4,9 3 T Keown string. |Z | oO [4 |2 fo [3 [0 [+] 2)3 [0 [3 | | Fram 4 elt le lo (2 fae) eee a ome © }0]o}ol/a]3{3 jo j2 | 7/2 Frame 4 [2[ala[ofo fo [a [a [2] ft 2 we * ee t EE AG 3 Ct Optumect Repla ument Algows thm, b ing Page Fautt: ee . Rhona Sting. 2 o([#[2[sfo ls Prose 4. [, 2 {2[3 [3 |+ [4/40 o Fray oe loo jofe|»fa [3 fa 3 |5|s Frome af" + |4 [4 fofo fo [2 fz [a ee Oy x ¥ y 2+ ‘ Pree weer = Ap. Bs Least Recently Usd Al gceiton 4 [Spoon grag Zlo [1 ]> ols oles emma leo 3] frome 2 #1 Ol;] 2]a]s [3 [3 2/2]? Io Barna, F]o]1 12 lelafafo], Rremug | Fie 2|°[olo Pals {3 9 ex FF Lg * x it F y fage Fawtl = q butt vate = Yip : a ff Bp eee in : ) ic Ow a lecture. 34 Fefounce ‘Shing 40190304 28 082 12 oe Oo) Physica frame size wu 02. (olewlad poge. foul ord Oplinal Hit: z Laing FIR page suplaumunt {po Releune, Store: £43014 37 Stsatt. G foge spout and oplemedt Hit Wing. FIfO ancl Opbrmas page: Replaurmert Alqo . enc Weblink : Com Be. 0S Gmeapr by Gavin | Kooolulge. Gort. by. archit Te . Pa:Hodinn OS by Tanenbaum | ~n — 1 \ Refesunee Sing 2 1,2,3, 9, 1,512 11,6,9,58/8.1/36 ig, fogs foutt ? wing fifo. Repevune Seg 2 0,2, 8,0, 44, 0/1,2,3,4 9 Fags wing Optimal page sucplecternart Al gonithm. Refouence Sing J ,2,3,9, 8,2 ,1,6,2 5, 6,214 6,1, 24,5 fage fle Lstong leagt cara Used pega St la torrent? Algorithm . (0S “These att (ages when 0 pages axe Loaded jis m/m iit» ge only, oad usher oleerandecl Hf the pres by genucatig page spouts This 4 alled ure Demarel gig: The majo digit with demand — paging A afte o mao foge 44 Loca the pyoceys slants execution fom phe te Advantage — Levige Virtual = rp = moet efficient cue 0 Taf - 70 url. om elegoue 4 mrulleprepearing- « Disachrern - 70. Of Febls 4+ amount of peceser Overhead {~~ hardlg page iniboupth ae guatey than jn he cue of simple. Pageel —mrgmt- fobmigus, Page Replacernent 3 Ww oS 4 : then 0. pro ase soyusls os rents Pugs @ 70 fees “4? vag okps Gn Pe us availabl to bin them io following dep © Unpor to deat. with this probly « put the pros in wait que j will ary Chhoe. procers finishes ay execudion used. fee fraras = or vernove Zorn. oft prow Completely fern the fra te fee fears » ~ OF , fined forma pruges thed cu mot being ued Sight now, more “tern bo te. diR b ga fe frum « This 1 catty Page Replaersrit Bebo qs. Algcrttrren Basic fage Replacernent © Pind the Socation ef “the clesired page or the dick D eho. in sua Spec. or im the “file ysten, © Pind fue “frame. ' © th two ab a ye fom use ct © Th ute mo pur spiarne ude & Poge~ seblaument alforth 4» zelecl an exding frame blo be sup laud, known a He 'ichan fone’. © writ the victiva fame to ith Change all sulateol page- Hable by ircliah thet phir page umo Longue jn mAn. ; joe P aan page 4 slo ibin frome Micah aoe sulockel page, and fmme tables to Imeticacte Hw charge O) Rathod Hae process thot? wos caoueding fo this rege ‘Refuence Sting. ; sdounes Calli pefounes shing » These Hee shin of mln oy au genvreced cueificably- o My dean a giver gptera A sucechg the adel® of each afm sufoona zy TR atlue choie, produc cx lavige, m0 6f dats, eahve, we at, “Woo things . - for a ger page cee ,we eed to comiolist only. lhe. fag > mumber mal the entoee adel”. - we have a supoure tb a page Py then any. feomuatodety “fellzco ing. supouncs te page P oi eevee aye a page feuutl « fager Prolaa be In ™m oftor athe fps Sufounts , the jammedialely. Gato efron wih nol foul + Bq say vf add™ _ 193,915, 600,12 94, 46,96 Fy tage sie 3 00, tran the sefoares phing 4 4.2/6, 1210,0 Neco of Page Replacement Ay Noks Life casi for OS Fmplemuntee guduce Hu mo. Of Page fauea Recluce the penalty for page fautlt colar, Hay cceet Minimize CPU +) of eyo, Fst Im Fast Oat (FIFO) a lgeattinn oklest page in mm ia the one which witk PE Select, for soveplacernorit ot tb implant, Kup « Web, seplace Paget prom Hu sail & add meco Pages at the heacl . Stefuunce shring » O81, 64) Oty OB, 1 2 Hicses. XXX KX x XxX > [eo | ra x ae aly» ea ited {4 +} © —_ 2 fy} > [ip = | 3 jel i fe] 2 6 6 3|"" [a] > i el c} ha. fs ! 4 Foutt ste = Yi = OFS d Optimal Page. Algorithm > An Optinad page suplaument algo hes Pre Lowes E page “Putt wo of a cg. An optimed page ~ supine Qljo extsts, anol has been @ttol OPT os MIN. > Replow. tre page. tho colt me] be esecl jor the. longat < peded — ef, ime. Ute the He shen ee page ts ty FE seo, A hackun- 3S ia) Pepouna Sheng 1 8,16, +,0,40,3,1 211 @ Nisses ° XRREKX x [2 | 5 4 ts [2 3 2| || ann ¢ : | Fouct ver = Ghio~ O5° wood be meedtal fer the donget St Replace the pag that? the futmee jot iN Least ‘Recerstly Ved CLRU) At cently. ge > foge which nas mot been yd foo the stongat Syme tm aM ie He Om hich wit Pe eoloctte] 4 seoplaoment € > Fay ko tmplrment, Keep 4 tek , vepley pags bq ooking back, inte Lore. « A Rephes. the Page tect hat mot been Seefewenced geste longs d Refrsane Shing ¢ 0,8)1, 6, 4,001, Or 3,12! efme Misses ra a xe xx * x x [o| fa A [>| 4 [2\ A-~H Bo {é| : 6 5 Re 0S Concepts by cul ai Aya > 964 Knowledge Gre by “carchit Tain Page Bef poring 95 2b get a pooy stat wich. Kap a pool of fe poms: 70% pay fault -celick a. page lo be suplacd . SUL Hh. nme page in the Plame of Pree pool, mask jhe page lable. & suslarce the proces. 2Now , wb the Shey Page out of disk ano Place He “flare. hoteling Puplaced poge ite ee Pook. a Liast: Fequanity. Useol ( LEU) Meo, = The Page with thy Smallest count i the One which wi be sxlecka 4p seeplaurant « >This algo aublou fom the Shao tm which a Pag 3 uel haat ly. clusung the Imital phese 64 @ prom, uty Hon te awve, — Mueol agaon. y Most Bequantty used (MFU) Algo, Ths algo a. Dard on the Qrtpumant that he fore voth He, Smabbst Coun was Probably. just trouget in & has yet bp be useol . ; AWrkiPEDIA Bare machine Treomputer science, bare machine (or hare metal) refers toa computer executing instructions direetly on logic hardware svithout an intervening, operating system, Modern oper ing, sys ms evolved through various stages, from elementary to the y services, After the development of programmable computers present day complex, highly sensitive systems incorporating rm (which did not require physical changes to run dif nt pro sequential instructions were executed on the computer hardware di ns) but prior to the development of operating systems, eclly usin machine language without any system software layer. This approach is termed the "bare machine" precursor to modern operating systems. Today itis mostly applicable to embeded systems and firmware generally with time-eril a! latency requirements, while conventional programs are run by a runtime system overlaid on an operating system, Contents Example 7 Embedded systems See also References Example ‘The PDP-11 machine allowed programmers to load a program, supplied in machine code, to RAM. The resulting operation of ‘the program could be monitored by lights, and output derived from mag tape, print devices, or storage Embedded systems Bare machine programming remains in common practice in embedded sys where microcontrollers or microprocessors often boot directly into monolithic, single-purpose software, without loading a separate operating system. Such embedded software can vary in structure, but the simplest form may consist of an infinite main Joop, calling subro checking for inputs, performing actions, and writing outputs. Ce See also 1es responsible for * Bare machine computing ‘+ Standalone program References + Siberschatz, A; Galvin, Peter; Gagne, Greg. Operating System Concepts. Retrieved from “hitps://en. wikipedia orgiwiindex. php iile=F ‘This page was last edited on 24 March 2018, at 18:37. Text is available under the Cr you agree to the Terms of non-profit organization. ive Commons Attrbution-ShareAlike License; additional terms may apply. By using ths site, ‘and Privacy Policy, Wikipedia® is a rogistorod trademark of the Wikimedia Found: Inc, “ching we vk pereeas cles not have the mo. cf fewer Xt mecas te dapper page in active tute, Th itl quick page potty at hie poimt , T] amusl seplace. Zome pages Land however, att ats pas ane In aciive we , th aut suplace a page Met olit be needed — agewa> TA quickly faut again, Suaplacing — peyes spe EE amust Patng. back iromeciahle This Its pagig cctivity Js calleel Hacasing - TE a poe cteu et have ‘enough’ paget pthe page Fautt wal veg hehe “Tix ads to = low CPU utilization csOt aiinky thal St nuads de Ineamac He cage Os onal tipsogtaming « > anothue putes addi % He system oub- > Tsaduig = Q proces “a ht seanp Png. pgs ancl = e * Haag CPU utiLization. > cage 4 mult begpenr Lototby of ffoare wabin braver a1 Pérncipe wf, Sotasiig jis 0 tun Pr —— , whith He fore vals, OF npelode| the phonon sro tw Hoy owls, ov fopelly aE, ospendung on Vy. won Gs poston » Ths ov. 9 besic yp 4 patios Jnosily of sufvunts Socalit4 - Nernpoo dS, a7 Jucasivg super Ah Ha ie of spechic date, 5 beanporlh ordhyr suscunw. , within 4 sulatirely. cath ome dusation n> Ls Spatias totality ufeu the un of deca claret within, pul hirely clase HEge Sacakon. Seuper pol Jowlity 4 speciok Cow cpadiol. Satake 7 oceuds wlen dede elrurd, mr Guna & acreseeed Airsarly JOO %, darwin, fre Ssreerhy ro + Daag. an »> 7 Letoity oH suds sufeu a plunomsnon whith o Compan Tepe eras te Geis corm pet ef= afin Seiko, Ae y phen % JP pti, fire. pudod This geopoly by nos 5 & cubroudin (ols in a, peep slo [i ee [

You might also like