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

Operating System Note

Uploaded by

AG
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
31 views

Operating System Note

Uploaded by

AG
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 103
[sa heplication sell. ° eat heicalios Be lots = | wie spoten seen : oe ee em ~ epee nn 1B} Openoting shen sePoume —indudes eu Te cprnatng ston iS @ preg ental abana . rn 2 rey betnen 4 on of | ” rgens tamper aed. wine emputen bene | # Mimony ‘™monagen ? (apr ating lew oPtame is Jha memony ‘manager chutes re alist, P auth mit “Pom nnemeny spate. end 1 tg Poss tion of the ; ; ; ep a legal request, FH allocates a pewtion of ex at of the tleiee memory thet isnt ally in use . Th 0° mula enicormmert ue rimony Aociogm Sele up a to keep Fratk who Ts ufing. tabith sathion oP A Rate srusponsibility of the ‘memory mengn is to Protech the sfore fn main memony otuupied by —the operating. system Pi 7 re system Half. Albcade. ‘and dsallouste mana spate as needed Certs eve) ng time. Oooo stem and hoe - Thshon! Each Si usen sends @ commend , Rootessow Monagamon: the openating system must make sume He The protegcon” monagee darideg ha 40 alloente the sammend seth on neh 5 Hh “he caminal Pmeeesings “unit Cord): Kreps Hack, alias he tao « of ho Status oP oath, poets E+ -monitons 98 Blane 9 emp lwhethem the CPD Tg exmeating- a Presets 07 wolting. fan a REND ep WRITE Command “to | Fish “extention. Because, tH Vnandls the prseat | Feansitions Rom oma stake. eB execution to ansliew Like a —tnafe. cmtrlen 4o allecccle_all is devices, Peinke, ports, disk drive, se on based on & sthedaling. pl Hong. the es FF obs contnalg che ore lead ty + wens in wer migieh have ke Big 1S omea, tees tam wand ony sa chm, oulhoty ab entele and onshe Operating s7Stens with Internet op nehvennt capability 5 allel Whe Netwonk manager providy a Convenient wey fin wins to Shame vgsuneas while canboling. uses? acess fo hem These rescues jnede Warduare. ond sePhuomg Fy ig —tho portion ef tha openating. system that usens Snlonact with clinectly 1:48 tommy Iyped_on a keybiandl and disgleed on a. monien also mest system alla useng clo) thse, a ment option Frm a list The Pret memory allocation scheme worked hue this ach progam te be pressed wos leadad th Hs enlinely ink mamony rd alkeated as rmth eamliquius spare cles) for lange and Bat abla “memory spore, i. ead. Ba Oncresoem Py inmemeny ot ade ob gn gh User Gekemy fr a. novmehienked eninonmert taenk isaac eases acl Alama e for oxth vo ond sobs tha °F pawttiion is ‘ fre Lage 5 coasted Fhe oy “FR a job dues “net otcupy the Online pani sion y-tha Unused memory in the ‘panlstion ide, 4 en oto a each Powtition Is alehied 4e will Pemain Canth-Sbex g3 job because by Tha phenomenam is atte on job internal ~feagmenlaton © Dyngwke Pawlins < Wrth dynamic, Partitions, available. memom, 5 sii kept tm cmtiguous bleks but pes ave gee on 88 ‘much memory aa ty reystst whan -the ame tvaded for preening. flthough this 4e a] significant Gmprovemen} over Fixed partitions Hicause memory Isr wasted within “tye purl “tim, tt dace’) entinely Climinacte. problem “Tha joe allocation of His dine Cam, Fist “sepve alleesstion method “the Fmemomy wast % Comparatively small (anmel- be aero, = bebween smomeny This pestle { foagmeniadion . No, ts of site omg dade iy suatlable {greater than om cay - “H sexnthes “lhe enline. st of portions Sind the Staller poredition she size fe the see ab the prseug Ber Ihextion’ Wie beat At alleation method keys tho! fel bry Viste in omden by siz, o% Smallurt to Longest fA Allocation: Tn this method, the_ n Is alloeted which is -the inst cient blo Prom the ep of Main memowy. FE Stang . memony From the, beginning and choose the finst available Week that is selon s F 12 mmelhed of wéloaeing- memory space ware Faxter in memony allseation is called decleeation : ; in sel When the job 15 campeted: she Memory SA, mack saan phen ‘managen “resels the Status oP he mameny pb was stoned “lo Faget bhue where the Mny-eede ~ fore example inany values with 0 ‘indicating. free and 4 indicating. busy — may’ bo” used A dynamic partition Complex algortim -bacawe he algoritn trieg ef memany- wherever namie, Rertlion system 5 sydem uses a. mane to combing fnee armaas Mssible « Tanefone, “he system must be prepa ~€h) Beattie aetheetaay : I otning thee ooo, blocks 4 stating, > Te dealfeexted memowy space fe behwcen lek two Pree memory Locks the addness of the— => Using “he deallocation algertthen te. ssn of the job Peach lesnng fret ha, gngmony so dealleeebed Hk” between two. free” "memony size changes to sho res —> ree 2 y Bayningig| BORE” [ets Rear ph | eel] taka e emcee ef ase | 24 I ea | | a6 | [10250 qx0 | Rowe 5 [Fel + Deallocsting- on jsslated block: This alternative fs when the spare te be. decliscated tg Teolated fem all ethon Fore ares Ws Using tie a ay algorithm, the Using. tha deatloatin algerithom, tha system long Teen |e ak memory ty be that ke memony block 4 be neleased lenok Ment B70 oo fue memory Adjacant tg any fee bela of memeny , inslend Bley F) Racalable Dynamic Paotiiong: Memony Managem relocaber programs te gehen all empty blieks and exmpact them te malce 4 momony bloek compaction ( garbage callection ;deboagm ) perbbmmed by 0S +7 reclaim Fragment sections ©P ‘memony space + Memony” mandgee optimizes Wie oP memony and Improves hve pet by compacting | releating ~ | |] Relocate every prosgmm tn omamepy sa ty ay | hairs Adjust every addness, and every veFeroncel | fe an' addreg,” within eath progeam to account ms new loeation In memory om poagoamis “> * Must leave alone all othen vahiey sith} prgtam Pogtsize » = = ize , i When “the Pregram fs Tnitially prepaned -C,, hoading, His“ Pages’ ame tn lopiead. aquence | fs based on the Paged memmy alloent ‘ oe Me dnfdiny ch Troneity estat the Frost pages! “denkin “the Frost nstructig ty ph f ‘J of the pragam and the last page hes ; Ye lost! | tnstructions x I =P page size, mamony , bleere 2 Te swmks wall if page size, memory | 2s fase Sel reach te es Eee ire ae shop, bleck) ave all equal. Ps 2kB B ae The wet see 15 usualy detnmined bythe fy = 2B ese disk's seeln size. One seelom ill hold (a) aaa rr i page ef job fnstmuehions and fy By ine “one page Prame of or see? frome of -memeny Ter g0m 1 echee sesng «prepa, the. ies] ym sige *B my Manager prepares Tk by + Me Srome sietsto Nea | fomas sizeea ey ME minben F page iy | | Page size = 26 oe | No © gagofpme ees ing enugh emp pa E | ° tin memeay Bt Py Page Frames Fn = Pon 3- Leading” all of -ty a Leading’ all of -the preqmants pasa, Tre trom o at € A) “Three lables Lm ~tnatking Peg Ju Tae 30) Pap Table (PMT) » Maroy Map Table. CMMT) , e web and wonory beaten were Hs PMT fs page frame monony address * Manny Map T Be combed e: Combains leeeton fe tach pose Feame and face | busy Stalag 7 a eh ig) addres > TELE) Tai Tae Phystedd address > [TT] > Prame Fearn ofPhet | sige Physical address «12. bis, y-Hhan Physical Pddnass Spare. > 2% 2 4006-sSondy Legion dcldnegs.= 13 bits, Légieal Addwas space = 24 > a2 “Bge cize = Frame sie tie sande (amp) Hurdben 62 frames » Physical address space | Foame| » Ae shart . LogicL adalwers spore / Page. Number eo pasos Pages 2 3 ‘weed 2 eke > 8 2 Fpotess, sige ABEL Memony Feta im Sono of Pages» —F5— 2B-A oo, Hoame sine = 28 \ += & Wf frog ! ~ Heeb 8 aa wanls bike no al ys. Mememyy 3] Geir) fof tne. Fretens epee sent 2408 > we kre, seal edness space by Dee patentee MB of embies in PT, = No Of Pages in Prag KB» Wile What is NO 5 oe of te eb Frama 2 NE * 4 > size of cae page lable ble = he of entries tn Page table x Bay rome 0 let x 4) pet iniaal baal Gre HORE B { » $y Nimben ef Pammes «, ~ eS 2 Oy Map Table + hiinse J albeaish Ta necentiquass roms Mey memory Sista mae efit Locaye an emnly rage feama om be wed any page of amr ok T anent. job can FY in Hha- memowy thay ovenhend Prom addres rasslefa = STolemnah fragmentation in lost page + tut store entied Feb in memory herlion Tra. prveces“eP! laabhiy Pye. THe memey en demand Cwheneien page “Rut oeti) 'tg roan 08 demand“ paging Vit demand paging , jobs amas divided. ‘lo eppally sized Pages that in'-hally puide’ In seemdary Stage - Wher tre” ~job being ty eun, THs pages ame brouple firkg manery only ay they ane need IH OU try te rebar a page thet tc Cumpenty not available tn tha main. marr Inkeonupt indicating emeny Os pul the Tntermupted protuy Letking. state + Faw 4 fo prected Ha 0S mut repsinecl page @ execution bring. ing. Yok he tune” suxnch “Pom he gcThe 08 will Esieeetl poge tm Whe, logical, adenas space 4. The ropuined page ul be bovugiy Prom LAS.) to PAS algenithem ame used for Ha decision malin PAs. The page replacement of maplating. He page tn 5. he page “ble will updated areondingly & Tha signal will be semk to the CP 40 Cantina “pragram exéeahion 1A Memeny Managen regyines hme tables + + Jeb. table + Page Map stable mee mm elds “5H requested page is aleeady ir memeny > TP page cambents have. been modified FTP page has been referenced wecertyy Fe delemmines whieh page Tenens in smemony cand wich fs swapped out mery Map table « fay faults Fetlune to Find Pogo. in memen Fault —heneien—3—Brfermine tf a fb | Atthsugh demand paging is a silutin to inebfieiemb —memony etiliemtion ik te map foco Of preéblame. When +thene Is an extenive| aimumt ef page Swapping, belween main meno, ane) seesndany Homage >4h8 operation becemes Leeda ear] Ly sto SF elfen’. Thic Phenomenon Ts called. mx mene 1 age» Tithing agers Th? page te disk Cif 2. WEE dan occur atenow Jobs ) hen a. lange i and then iweitting « | ‘umber oF jobs ane vying fim a. riety: me Poge imto “he emply page frame» wo mnumben oP free pages 8: TH can happen wethin a job — example, im Maps Het erase faje. boendent | Advanlage, | * Momd iprrcoicy ry. be Painted Is Min Me + AEH ates Tomafhipmognanening. levels tein Pay °) yniomieal "Main foun fae Cists detuls abiet orth seq ymend) Map “Table Ahenbne, rmedule that contains relates) Funedions @ paya From having. a. $0g mere pages mumbered ata) is gonomaled + comlains he. sigmn)-nonens ngihy, teers Tights, Stelus and HG "sH in memony Main memony am lomlen divided Into Mmemony is ald ety seyments using Table, Segment Map 4 p0 Mmm = STi teal = sda Submstine 9) triggers tHe ST 7° cap ids leadion cA Prcemeiaion® 1s vanovea Sigmon Matas FYEMYTEHE 3 rleonal Fragment ae Safest analy + Picea peels {Memory aleated dynamic - ee ||) vorighle ~ length forage - alkeaton £dieme in whch -mmowy honed | dynamical she return of exerrul fragman — scheme. a embrmation +P seymentaten | td demond gun and tt offers Igial ben hie & wel 95 plysca binefty of “HY ng repines 4 dobles + SL every Jasin + tht abel eh cage 1 dit ae #007 Page sti, “ha ont of & Meese fig ow tee job ble, Soyment- Map Table , Fase Map'Table, Main memony Inteneth im a segmant/ Paging seheme 7* Fase Mop Table mony Ma Ta 7 Ae fre se races of dhe se S ‘exterms| ong mentation ond hea handling) ane emaved because “th Fes aie et ep cath, ‘6 Thc aleeation - slipal Segment as angus subdivides + mip pages oP “equa most Seqmenis. and mee than Whole “Segments |, en ly mani Lege infant mer Seq tack “The major iakeambages of hts memo py Allocation stheme~ ame the éverrhend wpuinal fem the estima obles and the time. Mepine to reference the Segment table ard Ho page table : TT rinimize the umber of vreferenee, man, Soke we ageciative amemony cp 56) he Precees peg El Virtual. Maman 3 Vinluwl. amenony allows stonecl pregnamn exatuiion ever ip ast But Ht managen andl 1 enlgly I re mrepsives Caopenation Lekate macnn, protescon hardadne Aclvorleges + ms A. Job size net vastnieteel te size of min | 2. Memory usecl mone efficiemy. ss 7 3: Alkws an eabtmeted amour of -mattipleas my 4, Etiwinatss exteonal fragmentation and minim intonal Pragmentation S.A “Stalsing of ode and date, Facilitate . dynamic Unking of pregeaim sagen: Thentane deed beelomeces 2 TTheeased overhead fin bundling. poging— intemaaply 3. Cnerasecl soPhuame Complexity to prev} Hashing Fp TB is a small high sped trbeomediate Ht Make PMT ‘memony ump amount of 5 lawk Ben than min meme ny _[eere) | __ [rain Tren] | {rs | a) wing. 6a | mamkpir and _disphearent| Roquinas SMT les -expmsive memeny 7 Poagyh ale fagrnental “the Ea raereikentesh ele el amen oe am Berea Tie ston Himes laren shan Smet ee Jy maken he speed oF —welerd se cathe 15 small tn Size) Thomuse” frequently used data 0” inghwuetion ame showed i Cathe memony, “memony ares ne 0 can eseuwle tashouclion -Pastem. Has Pai sing nd odball’Cretctitance BP ve tea cor ba’ flag Sen "ehs Peay and te ty 7 Tn on opprating systen, het wes Paging Fon momony menagenoml a. page replacment algorithm 1s macd4es) to decile “whieh page aneide to be voflacedl iahen eo page comes A poge Pau rappans cohen ‘umfing Poogmam acceiser a memory Page. hack a, ei Gnto “ho ~hrlual addlnegs space foge Soult : | but met loaded in physioal memory . Fase froma a |* Page frame 2 | Tage Frome 9 pissy Gromer! DiPherort agents wget differ decide whiole ry te eplace - The target oP all op Dealer ram teee Anemaly : Belasly’s amomaly proves that rege wil) Toomey a my gy ull or ts posithle o have mone page Soulls shan he pages that have been fA “memiony cs Yreveasing he numba oP page ~Frrames utile using lgat 7 = - v the FIFO - algorithm. “That rans ; ™mone™ memony “onshlns chesnet lead lo betten perfrmance i fay Fag 7 plimal, age Roplacerant Ta hts algetllin, pags foe [Teed] ie are replaced which would + vet be used Lin te fogen -| 6x os Heged longest duation of time. tm the Relune fe i... © Least Recon! d (LRU) s Th his Algontthm , page will bo replaced whiok) ie least racer used . age Reed] x) [1 [8 ]013 0/4 2|9/0)8 3]zjif2 3/33) 3/3/3/3)313 ‘0/0 Olofelo Page Frames! Fz | 51% fage Frame2| |°|° 0/0] ae EOD ATO RO Vfago froma | [23/28] 3/R 1242/42] 2 OF FR TRE RUC HT Rts Rue Bur =o ERGY damn ndery i ft GR ct ineatdure aa fago bit =!2 | om same mumben of alonpiy 2) Shgily beam hen pe 3: Daosnod experioneg FARO onematy rl Pa process thas, enn 05 CPO 18 Aye that perkioms the } | @ Myitjeme -Haehnologies fr dual-erme, quad C20, 07 then! mulhi-cong tp has mone than ant proteason Laisa cated a coe) on the computer chip Matfycane enginsening- was driven by she poh caused by Tane- sized ransistons ond their, ihe etoge -Platememt on a. exmputen chip Tn: it, a single lange pmetesiow win two hatf-sized processor om foun quenten-cizey provesseot Tie design allowed “he same steed thip to produce loss ert and ynultrple Clatatons may ottum sTrmaHanenuhy ea comprsite _ Spb scheduler aq bigher Inet seleets nesming peg fn process an job: Trbichio ¢oFenjy sa efile b sy Shem tunes To eampucteetion interact on system esmporien boty most oP the te - Lowen- level Sehedulen Shomt feom’) . TH deh ) leleominey job 2 Win ad Ine (oy try neon Ol Peides Tmtermaph ee Jo eominnyn, "G+ Determines Je skomination ond quiuy Pw fon wemert dunin “ J ng theeudion fea job moves through the system cage nt ent eh wee x thie ae ‘ 7» Reming, Fins shed Thess are called process taku om Job ales Wold, Ready, Wabhing Cl he KES * Neu! Hold ; Tig, process fs being created * Runing 2 Fnshouetions are being executed “Waiting : The process ts waiting foe somo over to eeu * Ready 5, The process {3 wsiting 4o ba omignacl to" a. processor + Finished 3 ia process has finished exoeutfon ily Sg rales wing PRA ng PS wftates ung pri | feviien Ready; PS fninkes accoveng — inet on then extterion iting 2 © Ready. £P5° ley fates by Instruction ty Sat gin’ bt ob Sy Pt TO See batch [internet egy 7 Rb aecepled + Fick om HoLp and pheed in quae Changed fom HOLD -ts READY Tinie, for CPU ges from REMY 43 RUNNING + for CPU and oaeessing fe charges Foti RUNNIG to WAITING $ unavattls Pesouimees # “heb Stole oy mes fo FINISHED Ssh dimpled (_Sueershaty om lansuasese ly) len (PS) Ey Proves Comlncl Blox: (pe Each “pr0tess Yn ha system TS repmeteiad by a dain euchane called a Process Contne| also called Task Contnsl ‘Bleek (TCE) that parforms tha same Rarclion asa avs rtp! Sniie" te ‘Ce Re dias the jb, Tndleding what TE 8, thane ibe - how much of TES protessing has bten com b/s Stored , and ow ‘much i hep isites eae Frees Tdonifection | : Protess stelue 3: Pris es | Cone ous Slag ‘ Registoo cantnig | th jobs Wain memory” | Pate. Guba esnines ee toon ele + Pecauinting sb is unigea, ar * Each 7} y Hdentified by the user's Tdenlifien an a “Tis Indicales “the CUM Menk Ietus HoLp, READY, RUNNING, wart FR comlains, frowees Fah, p arias information we ng proposes and panfinimaneg nd what Kind of contents, My Jeb utd and Be bois Peo is cristel shen te jab accepts he ob and is From Ihe job Progrens erd of is exocurion | | | Queues use PCBs to Foatk obs the game wry thrtome oFBeida tue prsponls fo track tolebnational visitows "Tha Pe contains al) the eta about he sb sealed by he 9PemAINg SySheM to ony the procadting oF tha pbs As Ihe ole am Hhnough the System, Hs pryypars ts meted in the PER “Whe “PUBS nok “the pbs” are inked to Prom fre queqes + Momaye queues Uuing process Schodltirg politics and: algorithe Wadler (Gt Teo wa | {ieee oe ged process sthedaling. + Maximize -Hamcughrak 3fen 2 00 + Minize mesparce Hine Mam avsun d Inienaetive “pepurty + Minima ancand time 5 mere entine Jeb Tn and bef Sho, py e warting. Hime, <3 Teves Fh gud queue ely + marimize CPU. effeieney + Ensue Fainness fon al) jobs Give ery Job eal CV ond Jo time Jeb chime erp kn eieny try. time. before Ao mequerd Reued. « : => Although He Tob Schtdalem siecle obs to eure hat the Rody and lo queues remain Hameed -y here ome. Tistaneas then. 0 -vony long request. TF Satisfed build), up oul he nate eptable job clams “the Cty Bs 8 Hime, belove Tesuig. om 70 Ho: hts se rhe READY. quent sO ues, whit in, “the, repesis ane being of ery wil while ettensive emply hh creates amd imbalance Ans wes ‘mlermupts pred eleromined When thal al) system TS solve periodical then a exproad Sapna problem, the Process sehad- ler a Hining mechanism and running processes shee of Hime has happens , the on tho eb wmrent Ho Trto the ene 5 aomtinued later. “The pw allocated to another sph that rans umbiy ome oF thmea. thing sehedulen aclivily woschedulag be noua and READY will ig. now happens ; the lima ges oFP, the Geb 3 ‘an I/O temmand > Iosuee ' 1s intshed tne ob roves TO the Renpy queue, He WAIT quene 9 07 the Firiched queue , respectively An 1/0 Pequaky is called 2 nahunal wath fm “multiprs gmam| * a as Gaunt | Process fo be allousled to ancthaw ~ob. prowsing of 0 Seb (20 ob enehhen pb Pecemplve sthedating tued im ine Sham + enon -preamphve ‘ohith -Rnelions yoithoud (. inkenn! ehodting pal iey ehHeonal lon hy bol That Jeb) onthe Gob + Teomanound -Hme + | + Waitin vas been wating im He ready queue once @ ob caphunes, the ancl begin ehaeution , YH reming protosso” in “be RUNNING State unintewpupted iniif! Ho issues an 1/0 request (rola! om until is Finished (Witty expec ihe Loops. wfeng excepHions “made for im which ame fnbermupledl” by beth pr cemplive ive policies ) ard -ronpreem + CPU Uilization + possible weep the Cpu o1 busy at + Troupe + 4p oP processes hee complete | Heir exeechion pen Hime 4 emit oomount of -Hime +o exeuie. a particular process * ‘time 1 amourt oP ima a prows *Response -Hme < Amomt of Hime Th Fakes from when a woguést Ws Sub, cmnitted until © the fins redpomse ig Produced mot otped ( fer time Shey envinonme lion + max CPD et + max Hrnoushpuct + min turnaround + min firme. watting Hime response time i i A : > 4 & | i cont be | Seheduling amet SIF, et; Spe oP sehachling prormpiive, Scheduling. 4. Posemptve seheduling p= ured When a protess, -Sutehes «Prom raysog state -o raedy site oP hom wwattins Oye do eady. State! fh e seheduing aye + Rosnd Robt ‘eosiam) Noo Preemp! 1m based on ire + SRIF, Priowy (Rosenly Bho . Non preemptive . 3 When a process terminates om a process switthas from pom to warti state Dlgowitims based om hig Peionity (nom - posemplin used version TB) Sn, a mutlipregpamming envinorment, Hove are. Usually mame jobs| fo be executed thon Cul poreibly be mun at one time Ope Syshom Rot Scheduling. tate: Befone Bet tes cP oan hem, 1 needs to resolve. S| Vimiotions of the. system * dees, Pins Ts there. ame a nite: mamien oP resources (dist, 2. Sma sresources once. ty Ore alneated earth be Sos Ss Cone) i Sores taomensy megane oteser Inkmorttonet Frovee: nd eval fe) r > oF ' fea aenprecraptve | sehadeliigolgpiliny thet hanileg pbs axteedng'-f8 til oral Fema: tka eanlien “Buy awpiver “toa. lorem They ore semed fk 2 5 TT Ts ae 0, x24, fh223 A 584, f2t ROD z is tt Simple algorithm lo implonen been £E5 a ges a FEFO quene © Ths algowidnm is E57 | Bee be mort boleh system > bol He Bir unaeepleble for Inkepactive syslams besaurd E22) intemaslive vneos expect quitk response times 32l\ 1) Beh ( unpeditane eonaround) -tns)) 2 Be) pisochomlonas t 3 Pvevage lurmanound Hime vamies Seldom 322) nian mined a TP the pb i pretestig & Iegity 210 3 Foe, build cp could be cyele, ha TIO quees quithly te and he siping. ‘le SHuadion resolved when JO’ bound foo finishes Hs TO Yeles Shag moving and the Foom tha batleneek pi ates sR Ea pee Ae meaaen, PRRs fs leas eaclive. algorithon ig ovenhually the queues System can weeevem femte na a shokst Jeb Rosh, heleh envinon — ‘Oas0tiede—seith—Cachprapecss No inkermapts unl epg eyeies em ahimal watt ofeuns ieee a Sysem adminisinatan om Rocescon jp mcgen se sileenonanetady oe egrin : one THty Pe liodeina a nompreemplive scheculiny ajenitm one of vthe mosh common selecl ng in bate. system 9 e847 hoagie may give Slowen ~homanounel bo som 4 . wows Et allous the pragrams with hha geet priority “to, be pracened Sng TP hoo ow. mone obs with equal prionity aime prosert In the READY gutus, Ha processor is Alloceted Hs) #42)" one— shay conve’ iogt ( Finst ~ deme, Piret seme witin polar Th Shewlést” Remaining Time of the TH ie the preamplive version SIN algpritien The precessor is allocated fo the job closart to camaction ~ but eum the job ven be procmphd if a ‘user | jpb~ im the READY “gies? hay a line 4 completion tarts Showken OT “Wie dentin cant be implemented F inom Interactive system because i} royimas dohanee nowledya of che (0 ime saqpined to Anish exe Spo Th fs eB wed in bakeh enviponments, when i+ is desirable do preference to shon} Joos, oH involves Opveling beeaue3TSjsiem monitors py time Pin FEADY quince > Perfo ord ovesbtad hen S9N+ Comer swHehing Poe tho Jes being saopred a prebbphon Hime TO Ser is Pastem lien Sons recuse GB Confer — sue i Stitching ig Pagiimed by all Preemlive alison «Whey typ a Prremptids ll oP Hs pmnegest a ation Must be sod iy gpd Mor mie Pes te chem | eps un when “bb Al's and Tye Conlems of treeution ig to be yee BE cavtinued PER are leaded ito tho appropriate vogistens so en & centers stent mamring ageing hig is swith: Later, when job & % axsignad to tha proeason , Switeh Ts porfommed information ‘fron ha — Job is stored in Hs PeB, Gontenls of job A'S PER ene Into the appropriate registers « once agein nots contest This +Hme, the prempted andthe bodes is designed + be performas ne mater how fast 1 ts Fakes valuable CPU time. $0 althagh? SIT orpems tp be fasten , monk Sperating envimonmet i+ adlvantayes oP 2 diminished by tha -Hme sper jn cement The suithehing eAFicienty,, but onl comparison oP aE Suitehi 7 jndlude Hy A precise wuld have +o de the and SUN Hime requived coment NS Fe) Rounel Robin = TH ft 0 promptive process Schedulin Wjopithin Het is weed) extonsively im inberactive systme. TH is based on . GP time Eee oe ig called time algon' predetermined — slfee The time _ sliee quantum © TR job CPU cycle > Hime quartum > Job preempleal and plared af and oP Ready queue > Inbrmation saved in PCB ¢ TR eb CPO Cycle Z time quarrtums - D> Dh Fished 5 allocated rasounces meleased and job charmed ie ge > “Tntewwupted by lO TaMst 5 torn Pee on eB T ond) Winkel “WO queue Later, when he lO rapes bas been aadisfed Hig 8 meburmed fo the ond oF the Korea, READY quae ta await allocation of te CPO has Viren avenagt. “koma + Typieally ‘ wy SIF, but beer raperde ound hen The efBieieney of round robin cep Ho. Hime quark relakion ago CPU tycle + TE the quantum ig bo langer thar most CPU tyelag — han the algorithm reduees to the FCS Scheme TE he quanti 13 leo small » then He amount of cemlext suitithing Slows down the exeution of -the and the amount of overhead dramattealy ineneased The cmoust oP omntext Suite tng inenemses os the time quantum dermease “tn stzo OE A —> Tea pehen 33 | CC a inna Fino Querlum of 5 _—— © Tine perhom Fig: Gmlert ‘soiteling for ime difPerant- tim e quanhoms. Im ©) JobP Liohith waquirer & Cycles Completion) Finishes befome the Hime. " © » the sme te pln ob ijurien suuletlyespineg ive ied quanlum —expines Finct. Inkerrupting, the Jobs S © an tg ego, “Petra “is mo eantext- ) nme (Pu Gale swilehing Cand ne ovepherd) gt f fhe Jina pert Olea od fo this job ig 70 Sevag ends befone the eb mang ch ermpletion twith tits ime quamharn, thee behoen — 4+he round robin algorithm and Fre ayenithon ‘(ee rr qwarrhum ) ch ease, the “Hime Oa Ms te onion fF 8 ane 8 . 5 tg prtenpled one stehneg “the ob 1s F mn when x. Hime qyantum expires Tena fe some overland far conderch suing and “theme ould be 9 delayed tumamwnd based on tha Tumben of oher obs in tha system © nm Ac case, Wah a time quonkn 2, tere stwikthes because hore og 10 6 the pb % posempted —eveny timate Hine qumhon €xpives,, overhead be comes tasty and turnenound time sufPens whol ig “the best Ame | quan £ v => Ht depends om the system . IF i's am Intenachive @mvinomment, the System *S expacted to mesponc ately Jo He wer , especially when they take simple “requests. HHS & batch ole] smesponse time 3 net a orton ¢ honenanl is) -and overhead becomes ven Imponlnt Yene ame “hoo general rules fore Selecting prover ime quamhurn : Ly iv 10 tong enough fo allow 1, Th Should be tong enevg) 80 peweent of the CPU cycles fo mm to camplabion g Yt should be at least Joo Hay, longen hon the Hime meqeived te penPed one context sich, Kose ‘wiles ane ued in seme s75Hem, but Hayy anew “tnflextble » a os oT 40 intemrupts are READ issued when tmmand fe issued wrire * temand 1S edntennal inkewpupk, 9% synehpons’ a direct Tnternupts 9 oceur Os sesalt of tne aeHHhmelfe Openat‘on on joo instmuelion tamnenily being. proces - anitimelic. operation intemnupte ame = ley dividing. by Zero, bad 4 lacing — poin aperatio irenatim overflow on tindeofleas fied poimt addition on subtnaction Phat causes 29 attire + Page inlewmupts that ‘memony mmanagere issued to aecommodrle je rogues 'me quantum expination ti v ipination Imtennuphs cecums then de me quambun exps yam expiney peated) From Wve omting Jeb end lett se anghuen and Me procesiom is dea “Mogeh Job trtnuctions + Dihempting interrpupls ave sto ates protected 07 nonexistent Stenaye kection + PHempts: cdo + Dprrats Openaking + Ddtempls Such as quant am to use an undefined openatisr fon Twvalid date fo ‘make system change changing the size oP the tne Al syskem of pesour Desllotk can anise foun tenditions hold een er simultaneously ¢ The resources may be partitioned into a Mutual 2i@lusion ¢ Oly one process od a Several ype. classe: hy tongs: . i » 4 ime can US2 "eSOuRCE oF some number of Tdentiadl names sone + Hold ond woth ¢ A pmeten bolding. at Fils, Elo devtees IP leat one resource 1s wotting to aequine CPUs, Hen resource type addnional resounees held by other proceae- nchaneas Resouces crt ‘bo peeompleds had ts, +e prtemplion +B resoumee cam be released nay ubilize a resource only Volurleotly by he process holding. 1h, afte that process has cemplehed i4s table e proeess is Hea pesunte + Cimeidem wait: A sth {RRs of aati peveal arr) oper Protess musk extst such the PTs. wailing Tesournee a Yor a resource held by Pa , Py is wating 2 releases dhe fm a mesoumee Wed by Pao y Pag & 's waiting for a resounee hold by fm, and fy ig wating. for o resounee held by ¢ H+ Dewdlucks tm otcun via system calls, locking rae mone preees ame wailing on ippeniry of some OVER 5, whith never: ng, then we 4Y Deadlocks an be deseribed moma pre sely , 4 tnwolved tn deadlock, tn devms of a dinacled graph called a aan gysiem resounce allocation qnaph then thet state 13 called doadloele « 4) en ee ; This! geoph nails as Vembieas bee Yond set of eda E a Sag Tha set of vente ¥ KHioned nto oe fuo differant aypos of {rah ee the Set consisting of all the athive Protends Tn the system “and R= 18, R Rm} , “the Here Allcusted in fa» Procers Dab Set cansisting ef all resoumce types tn tee fh poten ts mequerting” Ri. Re is system : . Aljeested in fe Fe reaqyaiop. for Ra ok edge s & alimecked oa . Jo, thenc ig 0 thant Process fF; thay “mequested an instance of - ounce ‘typo Ry and 8 commen tty walling ener 5 Gomes © c+ mesounse ren} edge: A dimeled edge, Py-v Ps, Ahect “signifies that an tmskmee oP Pesoterce_ tre thay been alocsied to Pretess Pi © process > States + Resource type with 4 instaness + LOO] , Poocess Pa is holding an stance of

Process, fe 3 holding on Trstance of Ra and” instance of Ry and ts waiting ” x oC 2 for an Tnstanea 3 fig: Resource ~ allocation. > Pooeeis Pa ig balding. an Snstamee of Ra on a0 Li) THE the, graph combing ne eles then 0 Here " Process jn the. System is claad locked « SF othe sels, PR ad EE jhe’ graph , tartaing « ¢yele, Then a deadlock > Pe Titi) “rey ex R= {R..,Rs,Pyt © TP each resouncer type hes exactly one instance, then ¢ ¢ycle Tmples haba > E={hoR,?, i ? he * Usa) ae the gyele Tmolves Rave Rory > . oad onke 1) ae 2 jock hay oxen re ts Ro Py | omy a set oP resources, typas, each of + Rasounce sions + Whigh thas ofly a single Tnslance, then a > One inde of ettourte ype Ry dedlock obey oxeunmed 3 Te instance of resource 2 One clone ot Pisoumee gE RL = Tose te ae ee Waa + Fath process fnvolved im | ie dea! loekeo! * 2283 sty this case, & eyele 1” the. graph =n Ahi b both & nocemany and Ow suPPevent condition fow the existence | of — deadloek - + TR ath vegourse type yah Noevae Instances, then a cyele doesn’). Necessary a that a desdloek hos oeeun ea) cin his case, a ¢ R ‘ , e) 0. «nice ag ae EO hgh condition fan the 9x5 ma 'stenee! oR doadloek. 7 mererreny re r Ree terse 2 H 1 ° a ae = L a mn | So, Hene nSvailability of redourees, (eee are and 4. Mech means a \q All “he procesges*Eempleed hate execatin * = ie | Pd hone “tg -na > deallock, Fro, singe. Hpstance / deadlock wopert of any oP | io eae if Go, this system ig daedloele id pests Hs. te inslanee of abit | Request, Pai, Dad st | RR Re Ri Re hte at ' ° care ° ——- Oa ot tae Sea | 8 cae V1 as : 06 (Reyun of © 0 ta % resounee, iP 4htwel A T © Vise single Inston Pad P+] Man Tat | RRR, Rp mn 5 + 2 OF ai irc nt + Unigene ——— Orns nna OneO, 3 ory fhera is 10 deadfotle | Hh summary, JP a RAG dees, no} bine tyele > then the system is neh Tn dedlock state. TP there is a tyele, Hen | ne system may on ray mot be tn @ pissin Regal 2 pba Rs te By dedlork, state. (OMICS a icici taf -8)aso fg ane Fale so hie Stanyation Deadlock » aa [ste yous aad tn ig sand and fe he diaiae prmeblem fe this thre ios | Pretend --therel 3368 rah pmcten) alla) tocol -fe prevent We om use 2 p ' dedleeks, ensuring. -thel- the dead lock, State Hhis method of selving probiern is, falled este alyositnan | Wis soleton is weed by most Ofencting | stem, Tneluding Linux amd Windows never enten a Ks mesen oeeur she_| ethen a deadlock, pre - dedioeck avoidance scheme. | nap ee cthe system tb enter o | We Know, deadlock cam anise if foun detect Hand neeavem, | tendons” hold by “the, system» ¢0 5 wis tam preven} dudlock by Awinling any of these foun emditions © We can ignore ~the problem attogethen and phelend that deadotks never> “ceeuin 2 Mutual Exclusion : The tmitual eselsion trondition must held- Tip ] 8. at leapt ome mesoumee mut be ron - This is the most wed sytem fo hel | | Showable » clesdtoees- In hit, we have -fo Set gnome | |. Shorable resoumsee, ae net vequina mutual ‘Me problem and preiond that “deadlocks Stlusive ateogs amd thus “Carmo be tng even ottun tn “he system. in cleadlleck- $y Read-only flag - THs iy We Ortoieh cbynition swith ig Bt, Thon shenele._tesoiores._ ul Gaal pomet | desdloeks by deyying Monatual @tlion condition Ex: prinien, in the system ‘ conden SIa) oeaneimnt ey nstaL ora os we, mas} even ottuns Tn he guarantee hot, he prnesss request a protest “M0 it docs eid any othe essun ces.» Tere a hin uoys ot Riles 4 rasountes to the stant of THs exeuston Yad to low Be: TP process rayives printen at a tater -Hme and we have poinien before the Stat of Hs exetain Printen will wemain blotked fil H> hay campleted 6 enteution Be The process will make @ mew: ropuerd for resounees aflen tawnent set of nesounees © “This Solution Slavetion olensing. the “may lead to Breau, emeeds Several popula "resouney process the indefinitely « may bane 46 tacit semplior To ensure that wis cendtion dresnot hold» wt cam use the fellewtnn protoee| y SIR a proeass 1s holding Some musouneg and meyers amaten esoumee at cmnet be Immediately alloeested te tt ket is, the proces mush wait)» thon al mesounees the process 1s cummenlly preemphed» “In otten tomds, Tmpily welaed added to elding ae these Pesounees ane rrasouneas ae +The preempled Ake isk of vesouness fem whith the process is wath sThe prowess wil be when TE ean Pepin HS as well og tha “new ones Mec His. Pogueting restemted only old esourees we Gam -mapyine het a proce Texpeding on Tnstmee oP mo0s0e 5 S0UME pe Neonatal, condijion never the feltowing of peaeuree dy, Wo ensure “thet this | hold we cam tonsidor ‘rule Impose a folah eroeeng Broek process. om aypert Jn an Yneneasing onder Ry mut have welensed ary hesouneg Ri su is nena Capac ailel Eq aCED alate rpesourea ,omly | 2 ae | also that if sevenal Tnstmees of the Same Pesounte type ame needed ja Single repent fer all of them mat be Feswed ~enation, Tet tet a process can Txfiially reeque mesouree type - — | et any number TRY Doadlowe “ie warious . lgpoitns that we this aynithe approach dfn in te amount and of Information. requived - The simplect era rere sate ides sper Tht, the proceeds 65m hoquer | tnsimeas ef -pesounee type Ry if amd Jomly fF Fer) > FUR)” | 4ype |ron and ‘mest wsefab vpeaines Huet nth proea deslane lhe maximum memben of resouncess | oP exch type Hhacl HE may reed | Given dais a priow! nfemmation , Hr is fe tects) fo ett te | possible to emnstruct am algpsitim het she system ill never oni example, Lely (4ape abvive) = 4 Ft F (pei to use the -bpe dnive ond printer ad ensre’s thet Hog sam ime, fh mat ot -nequert ato fa chad bee sicte- A daslloeke - oveidanee toga Arne end Hen ake pointer “ew algorithm cnamically examines he by all Wee}, wth 527 _ . Toestion slate “to ensue thet = af esounee ~ alloeelion a ; ty ee a Ginealaw wart cndition never Oxirh So je is doling oat ans a } Tom “We wesnmee—alloontion state etned | = edately ocala, en feo tah by the number of available all 5 have Finished sunces and | maximum demic | proress equals am avilable. allocated + When wy have friched y:F exn obtain $ the processe. all of THs needed resources, exeudle , tue will naw ste two -dexdloek avoidaned. meh alloested Pesounces , and terminate. ites | + When f} terminates, Pry) Can obinin ihe . meeded rosousee and 0 on ba | “TPR no suth Seqyence existe , Hen the Tresounee , system must decide TP terme. Bes 4 gysiem State 1s Said to be tmsole late location leaves the System tn sole state | aan BP x system te in safe state =) System is in safe state, TP thom i va citer Ong ‘ro clea looks a sepenee 2 Fits iy of all ty a4 processes in the systems such, anil leny te a System Ts Th unsafe ste => for ch fe, tho rescues “that fe poittly of «deadlock « 3 still yest cn be satisfied by tupnehh Th on uniofe state, the opmating. system conilabde mesoumees plus 4he thosdumege aA tarot prevent proeesses from -voquesting— rujounees in uth & way Haat wh dardbe setsoas + + I: ma ayaiem with, “Wwelve Magnetie Powesy f, wequives ten “ape dives, Pa, | trey Bur ape ants. ord Fa my Paced ep citlbanind) tapas done ser at meh, process f. 1s. Widing Jape anives) process Pi is Welding. two | tape dives and Py hobling. 2. age dive, (iy here ane thee frue age dives) | mum needs _Lucoments needs ) lier | NlmnstunnG ¥ “ : ts ; : DM time ty, the system st a gee Sete. TM Seenee Zt t.t, —setishey the selety condition» pil sp He process tm gt “hain davined tape drives, ES ’~S Bul, @ system een 4 pan unsafe stato Suppose heb, at Hime 4a, Py roperts amd te alloexted one mare ape system is no dvive + The state + A hs ptm, ony, be alloested all He shpe | lenge in sete process p,m choives speheons them When + Will have only four anailable ape drives Ne syst Since Process P is alloted Five tape bet has a maximum of ten , th | nay meuest Bue move -lape drives, Tf. dvives iF dees 50, fH will have to wait , beaye Yh ane emavailable + Again, BR fe may male tiape: ceiver nd uve dead look mayuest six ack {ts wait) resulting Tn 2 Qu anfstake ans Tn granting the oper from fe for one mone tape. dni. If we had made Th wakh unit thers oP dhe othen precesses bad Arnished and. moleored Hs pesounges , then wee cul baw. awvined . deadlock . whether poceeas thet iS umnenit, dendlorved ging Mb Single instance oP & -nesounee type Use a rasouee allocelfon graph HE Maltiple Inctmeas ef 2 PesouMee ype > Use a the bankeric algonitien © Resounes - Allocation Ginaph Alasrtltnm Gaim ‘edge: A clit edge f —>R; Indices chet “protess fy may “reyuest pemunee Rj at some Hime in fulune TH 18 represented nthe, graph by & dashed line then Frocess fi requests Pasounce Py , tthe Clim edge ig canvewted to a moqvet edge Ginienly, when a "Pesounea Rj IS elased by Py stho amignment sto a chim edge edge Re> Fis wocemerhed hor; ; BeBe process Pe Starts executing» al its Claten edges mart olmendy appene im

You might also like