0% found this document useful (0 votes)
26 views26 pages

OS Unit 2,3

The document discusses various aspects of operating systems, focusing on process management, scheduling, and inter-process communication. It outlines the states of processes, the role of the Process Control Block (PCB), and the types of schedulers used in operating systems. Additionally, it covers the creation, termination, and cooperation of processes, emphasizing the importance of resource allocation and communication between processes.

Uploaded by

yuvraj1513.an
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)
26 views26 pages

OS Unit 2,3

The document discusses various aspects of operating systems, focusing on process management, scheduling, and inter-process communication. It outlines the states of processes, the role of the Process Control Block (PCB), and the types of schedulers used in operating systems. Additionally, it covers the creation, termination, and cooperation of processes, emphasizing the importance of resource allocation and communication between processes.

Uploaded by

yuvraj1513.an
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/ 26
Unit ~ WY, YN Pao cess Fiera ~ +| Peocess description F couce pts 7 Ye destgn of os athhects the Te ee thot fF 13 qutended to meek and oe wl Os thar glugte te wiainh_ same thot can suppor . Sevetat thousands of use thor Oe buisy~ | aeound thus He mafoe 2rpuizonseuts Hook the OS cay, vaetk ts D jhe OS vinusr futealeave the 2xecur” a processes te mart. the the providing RLASLOUObLE Response ftime. i) the pc must allocate zesdurces ii) _ Jhe 0S must suppost Cuter process (OvMmunicaH g jhe enecution an indivisual peogr 7s ALberod 1@_@8 a pROCHS OL Q tagk dhe petnciple pine ef 2 peoressor 3s fe exewle machine tnst™ aesidivg Jhese tral” aac provided tn_ the forun of peogr emai wing seg oh Jhe 08 ablows @ peore to execute Lok & v Lined slice of Hae 2 is (uterrupted olich _p&svents wy Sixghe peocers fpaomr nou i Oe ess jt ud Hee Ars parolee PLOQ™ WOVE the pRocessog pion “S-——T oe pkoless to auorcer . e| An OS eeeotes a yew thing | queue Of hor gunfng processes pokick @ OUvdtict of dato blocks tm which cack poe Le prerstuss 4 el jhe Aspaktlts elects A peocess prom He queue {- bo _eneuske aster ad Uimeour comple on of 2 pRocess Aispatet Sel aid tess / Not | Running)» entr | eunntyy) \ ARONSON piagram , Queue >L ] | [ ]——> (reocessox enit os Buencing biagzam . og oe | ~ | 41 St process fu untadsH Peocey Staqu Een). ry 2 arepuChEe a ~. — - ° -_ Treads 5 keunntvgy oe Tren spe. a“ LA i a Peocess as 5S skage Za sf 1 When a peocess enecupes frieo Change state o fk may be tn_h of Hee followfng State :. el News Fhe procer fs bef ng cxvated ; Kuunirg : fhe peocess is being 0 xecuted : ( wailing : jhe process ts WIAIHUG $08 cone pi | event te OCCUL | g£eody : yhe process fs waitng 1 be avsigued i Wo peocesson. OQ Teewivatd : Process har gintshed Pts t execution PCB ( Process conteor Ptotk) 2 OS keeps gecoed of cack peocess wth the help of PCB oe TB (task conteot bbak) * PCB eepe fnfo- associaktd ta a specthte process SPB — kee pe a ee e tnred reoces! a stape process no- Pe [eru Kegisrer memory Chait} M-New, Leady , wainny é @\2 rogram counter 3 dt tndfartes Mee addeess of the next fuskeuction te be erncecuted for He's process Q@|_cev _Legicress > the segisters varie tu “0. @ type varyirg | Prdex eg. stack pofule @ geuceal Purpose reg. ples auy condition code fupo- AAONY wilh He program county Hal's when an interrupt DLW a OAL: cOMec My abtesmasds a : —o (PY stheduting tufo: —> Ids includes a peotess paioeity ¢ any otheg schedul’rg parameter Qin ~ O| memoxy management Evpo. ¢ Fhe wlue gf base g_ Ly + the page tables of Hie segmienr tables depending of the Systema usec by thee _ OS ° ¥ C= * fe $$: on ©\_Accouwkns, Tnpo- t dt includes, quiount Btoy ; used account ee Job pzocess , A > > = “al ajo arabs Tajo tt tnetudes ofsh of 17 a devices atlocated tO thar process , a fist & nen Process Scheduling + Fe The afm of wault peogcamusting fo hay Ouse pLOle sh almuiis ot alt Hues to paant watSe cep ult lly aK on Ol Job queue + Formed woken pepcess enter phe Bi syktm. a Q| ready queve t= rCB2 PCB, + PCB) P63 eS ey eT me A ©) 4 is made by prOcesses stcidfug tr_ main mer and Are soady , wait to _emecupe (kinked eit ‘pevice queue : ft fs @ Ofst ef pxeocess waiting jot a pachauar T/o_ devices. . ) H When A pROcess tesuetuaks fr js aeuovel qeom adh He quettes q have its pep & Q0sOUrtes oheabtocattd Sched ula + 3 types "4 = tome Sica Long fame he 0 por ng [RW 1I0P 9, Shoer teem, yee, Medium i sanpateeee geen OO CEO A_ process migrates bf vartous Sth dul? ug queue thkougout TB gipe Hime . The os Sip seleck fk phe proceser by the 2ppro priate echeduter Long HChur Schedurkn (Job Scheduter) 4} select, processes prom tee fob pookGrord — [Pa the Wardisk) ¢ loads Heim in main Mmeuroey p02 execution, a¢__Conteats Acgree of Willi peogcamming. Q@ | Shoet seem Gehedulee (CPU sche Sr sthects peocess from auibug He process Hat a0 ccady fo enecwe 2 allocate cpu 33 lt me & hem. © | medium tem scheduler time 3hoRtug systens often have no Long teu scheduber Hus ¢funpty put all Me process 7 fr Maln mens, mer | pi. | Peocess i —— : J bn) { 1 slew: ai peady queue |———(crv)———> < ng | tT ae TTT an | I «| ype Hue Sharing os tnteoduces futecmedfetc —j _hevel of Sthedusiug fe the medium tecuc — Scheduler. Diageau nxt Page> Suoappey [Pine sire] Kc Leapiced J hitd [par o—— ‘ Tene pork—a ipa encteuryxs 1 Lthd aif OR an Pigmabs iae | Tatert upt . content ewitchrug 2 Switching Me cpu f2om me process te another, goyuiess —» Em? eh caving fhe etate pom old peocess A Loading el the gaved state Bnew process Opsatons gn__peocess. t os peourdes Mebane tr. fOk__pROcess cxatton 2% deletim dynamically lo. peocess’ creation :°A PLOCRS mary cake everap wen processes trough a kyeat new ey Sten coll . Catapor fs pagent : which can be fr pester teeo ike steuctiny. + A process needs certark gesourtes fe actomplist iK{ Hark. » thax % + When @ - peocess creates a ¢ pb peoces« some AreecKhy peom Os & if mray be constraint oo a suloset at ae eres by ghanrng a ae = « Fds Ustefeproan 3 Chikd pLocess te a subst of Pareub aesoutecs PReveute any pro cess oom _overt@ad fg the system by exe o boku 2 _ process ceeaser a new process 2 osstbitily omtsty Pu teeun erection DP _ The pakent continues '@ exe Ue con CUurerbs pote is Chikdeom @Q_ The paeent waits Untik tome -A a of me chitdgen have temmi nated BID feocess tekmingtion $ Keasons :- Normal completion @ Hume Limit exceeded @ bound violation (mm. celoted Limits) @_peotechion exr10x__(Foebidden mem. Area) @ memoy unavattabte © _Asilbmete t204 Cdtvided by 0) @_time Overeun. ( process nas waited Lounger Fok. an event © occur) @ 1/0 gaihure (ex; unable to pod a pile) @ Luvalid tusteucttom ( Peocess attempt lf enccur a non-existent tust7) @ Peivitedged fusteucham © Operator 2 0S futeaveution [@_pazent peau uapes @ Pasouf gequest OS to teaminate - a i ye e i. pe a om a L. Be be [ peocess suspension : O_swappleg @ preameade IG rasent - Peocess gequesp \ H PROCESS Feemfralion takes pLace HOO fp flights exccubing [ts Osh Stareyment ge ash the 0S te debele Tt hy He pepaam Hee eit System cous & all tte serqusn os deallocakd fy os a H Lhe a process CQ0QHS A Kew chPld He [dently op utoty (erated process is payed to “the. pasprk +A mw i t 2 One of Pte “chi f0R 0 Vastely of 2tacous:- M The chtid Mas executed Pte Usaae of come Of the e0SOuRces ft 208 been allocakd OQ. the tase Bssigued Co oO chiftd is uo Longel __ heeded @ the pascout fs CHIH HS tus Os does net alow A child to continue th tts paccut tOoMinates TE Cheororab cs woopeatiug — peocessen_ i A_peocess fs tndepeudent tp ir comupt be afpec a be affected by the of hea processes L2HEAY i ee be appected fy He OFLEX processes LH CCU Fg fn ey stems K processes (hak Chare data wot yp othe | peocegses Qe catted Cooperating processes [ReAsous $0 Hee euvigoument that alloros | peocess coopecacttom oO) snforuatien Staging s 2x Shared piles @__lomputatenal Speedup + tH pe want to gun a L pn pacattel wit the oles. @_modulasity : Dividing the Syslem function Fuso |_geyerap PROCESSES. @/ convintence + gyex Qu tudivisual User may tLave lusduy task to work om at one true, tox i 2 ‘peoness is. cooperating ft cau be afpeck & pastewlas task um porsee we may break Ph. fk ¢ub fask. €ack oR whic wilt be £ XE Cura. lot A uset may be editing, petuting @ Coumpitiig, | fu _pasalter. | 2 IPC foutee Proves Communtcahton ) | Cooperating processes can commubicak fu a Lshosed maeuengy enuleokment which equikes [ehat Heese peoreeses shaee g common beekfes Lguin Me Code for furplementig he foebper be Lemplicihty weisten by Appticabion. pRogsquimer - | OR rel is pos the OS tw provide the means fog woperating peocesses bo Communicate ack | } othe, peheough a Puke procecs commuatca | | SEN ° 706 oe a Hac Se to allo pap pan les | to pomimunicate @ 3y A sy chsoul ges He eat ca och ons y an . aii ze | TPC is best peovided by y Stem : ym VASA ey a # | An “TP facility peovides, atleast tio ~ - operation. ; a gend i : a . i: gecieve j a Messages end by tee peocesses cau be etter pix er partable efge. : Hi Bin sige weg ti theie puysicat farple mento n re Stecctgdh poeward bup makes PRO graminis x V@Xiabli Sine meg : dt REQUIRE Wroge courplex a pluysica) Purple nme nt? but peogiawuuiug task ae cosy, a a Hi dp PO age 2 paocenes who wish be ce communicate Hee tHeeig pust be a : Co CommUbicatio Likk b/iy Hem . aa O_wuidizectimal Cink Sh eae processes comme kd te the etuk can either send 9 2ecievi ee opeahions.. ag a | Dizect / Endieecr COmim Un foam Peocesges that waut to Communi cate pal nave away TO 2h eack ofhex other — —~y|_Dizect Comm wnieaKon’s fath process Hat taut le communicate usust ex peicilty pame the Kecipvent te Sender the wtsg send (P, message ) 2 Stud a msg bo P xeureve le, message ) % Ketftve a mig prom P SYmmMetere Addresslig tA communtal kas Hee fotl. pa A tink established auromab'ally 2 tee processes need lo know ort each | 6. A Uvk is a%ociakd enacthy blo boo , PROce seg B)W Ach paig of processes there enich exouhy | fuk. Dink may be unidizecional but it is i usually Bidi P| 91 \__F | this eoibith @ symwmetey tn add Hat fs | | both the Stud a eeciever’s PkOCesses bas te pame eack othe ABBY mausekere AdALLSST hg 4 id} “is varlaut of symuetde 9 cheme WIKRE ohy the CdR uae the ecteped. = Hee gecipieut ts not Lequized te name — Hee evude . ~ Send (P, message) fend ane ssage @ Peeress P. Lecieve( Pid, msg ) Recieve & Message be whick id, Hs fet uA € fhe Peo vote whitch eae es oe taken pPkace Precas #| dteadvant agen dn bob Hee -scmeme fs tre tiurthed ~ modularity of Hue ae Gull process dept a fo ex: thanging ‘the wAuse of He peoeey may wecessiale examining att Deg peoce ss defination all 2eference to 4 name must be noapic to new nang *! Sudigech communteoltn | jhe msgs are send to wand LECIEVEA fem mail box er ‘porte. A mail box can be viewed abstrackty, 23- on obfect tubo whi, WASGS tau he placed by processee & pron voice yrsgs Che be eencoved Sack maid box bas a unique (dentibicate, Processes (an communicate with some ches paocess Egough a U0- of clifb» maid boxe 2 process Can commubfeare only th the process have Shared math box send ( A,msg) Redeve (A mesg Reteve a uisg prom mail box A dn this scheme the communicate ofub as forl+_paro blem + ‘ A Link ectablighed b/io.a pate op peoeit mdy ip they have a chared wail box @ A Uudk pray be associated with nog ta © tw peoceskes. B/D each paix H comm processes [hem WAay 2 WO" Bf dHipercwt pink <2 [A kink may be unidizecKonas of bidigecnoral ! rad CE=— wohlee PAC Lub borers poude to one waif box, ~ | | AMA box can be Wokd ef by the PL Ol =e “lleae by Os er dp the waif box ts owned Liken ft fs attacked to th dethr H |THE OWKER (On Only AUecieve msgs fleougy L [th mais Ljhe Use (an mity ¢eud msgs to tee mail | pox 3 phen A pocess that ows A mail box [terminates Pts nat box disappecas ard [Hus at! the Usuy aar wot pied te Sud Lyasy te this peail bor that tt no Longer Lenist ¢ | # Ub PLOLEKeL ph a pareut process can share Q@_ maid bon. - # | Mais poa that are owned by 0% os an Leniskence of tts wy they ‘azn tadependent. # wot attacked t@ auy process. #| when Qa maid box [se Ko Lounger accessible ley ony process en fh ts xeco sesod by OS though GAxbage codlecttan . Buppesiug Capacity of rink A_2iukY Mas some rapacihy thal determitg no. wigs thot can xeclede iu th beurporariry . Buppertug capagi a“ iy oo a 2ee0 Bounded Unbound eg a e| capact capaci cOback Z teed sjhe oe 2 gue at a hos sug bas pfrite Pupiuite pe a YWLOs capacity n e Any Ko. me, a e {the studlee o Sh He Riuk Con Lott tu jf a musk work (s full senda the cender ty oe uuht the wUst be dehayed never delays e Recipitut UnHe ghace tx A Lecieves Mme AVAikable ju La WASg queue, phe 2pLOcEM must be sunceoutged Q case DT) ExcepHans 3- t A process teemifuater 3 @FHe a cender or zeciever Ady feimintte before a WAS fs processed”, 2 COSL possible ghe gociever PLOCERK Ps pray wait fos He pee Process @ Hatt tem fe taken then Px ‘ploch ed forever. rps the Sys tenn at eitveo tegmfuak P aio nohpy that & has beamPuard. — coat Dprovess p wiust send a meq to a thar hos teami nate tn @ — 5 qn automatic btpper?iug seheme there fs "e— haw P wit? couttuue” to send tet th —— teekt KO bupfeeriig pf ic wating Je AvenowAtd gomeuk, ~~ TP paust be nolipted of ae berutnatton be texmirated flselp - oO Lost WAL SLAB E i Wwuen P Msg from P to oO gu__the uttwork Lune tS Lost then tere ase 3 methods fox Aealirg tne oveuts -- El ghe OS aust detects it A heat CPU bugst. Tp 2 processes have the same Leuatp oh we CPD burst FCFS Sve WA Ha, ig “used te breok tee te. Process ePU burst Py s Py ak Tt Tes Tava P3. 6 Pa 2 Awl = OF24+F413 _ 97 4 4 TAT = F+22+1342 14 Thus STP ig beber than Pers SF fs Most opttwat OLG- ORF Hen. - hoaiting Huei of the shoxt pores ALUALS VOR “than oft fucreages tre a waiting time of Long processes . sak 1s used Peg uewkly Tn Long tr : SuveduMig \ bi J Drawbacks :- 7 PatgieHon ef PU [purst ie Aippreuth te bboee ie 3 \ St fs the pxcamptive form of orf PROCES CPU burst Agsival Pt et oO Po HeX2 I Ps 4 2 Cy, x 3 Patoai ing. ee | Hees a pefority te associated with eo op peocess G the cPv fr allocated to ie peveess with the Miahest pdloethy. c| equal paiority peoress art Sched WLtal 5, “~— a eS ecrs a +l dt tam be oftite pecampttye ex AON besa, S. aoe Em PLO CPU bucst Priogipy b Pr as 3 P. t ! a e3 2 3 gh Pa ! 4 _ Ps $6 2 b - brant thaer i [Po Tes Te te] | e @ ' 6 18 q ~ Oot = ite + lo +ie+ t4 5 ‘A, Ss g A peLauebtive petalty Sceedutiig ww fAL peeampk es tee __cpv df the p2toaity of new ahived proces te higher tran the Pr BAM King Lore. : A_nou- peer mbtive hedullug algo, will — Simbly pur He new process at the bead % He Atady ques . : Prawbacks i- _yhe wa foe peobleen with pxfoxity scheduling LOCC epiinakety fos CPV (fn beavity Loaded system) Solulten fo this process ft Oging whieh te a_techuique of rare Incevastug the petority ef process tn the ey chem pox Long tHme. Round - Robin seu arts deeianed me ially for tune: - systems» st 1S ¢imitas ta PCPS plus prcaruttao is_there to switch between Peocesses. A smatt unit a Gme called a Hme quartyn oh Hime slice te Achkined. Ahe 2tady queue te izented 2 @ mating queue aud i g FCES queue new processes ase aoded at the tail of Queue. Ext Consider QU process Qtive_at time o Peolesy CPU buesh Ps 24 g =4ns Po 3 ‘ Ler Je2Lerf er J Py 3 aaa menor ao a awk = (10-4) + (Yr(a) = btat? o 9-6 ns 3 3 Moh \ 4h ton ROVE be non- _prcamptive, PP {5 ptt, aud Quonrum sige musk be WOtsinas a Ei q=10 [ees ] | {4 | cs e © 0 ver | iz © e qe Se t ! SAL eae Wd | to r ° 6 tg 7 2 fie ‘ [aie = Oe eh ee a ane 1G 3H fs suftable frog Situaten fr tohich pLOtesics Le 4 gex 2. coustder poreground (IuteracHve paoceses A background pxoeess (batch ’) both have AT freee k sth pouee Lume 4 Hus diff. Schedulipy needs 3 T rbera ctve process have priority over batch proves, this algo pagiiitms thee seocy queuc std several separate queue. — dhe processes Ate pRMAnenAy Assigue a_one queue gtnecally pased 0 [gore pkopaies of the peocewes such as peocess type, memory sige, peo cess patos! each gueie bas (Kh pwn s theduting § ipa igkees ht z a al sy Ses Pewee ss EO FCeS sf rutecadsve Feocester|—> RR | Batch Processes (> FCS a3] studtnt Procecses FCRS Lower —_ Patenttg a Si Me Queue has some peocesses Legt fu th no etree Lower queue CAN Run FHS PKLOCESS Ah ps0 cess of high es Liky OCcues BE Chtetsy ‘ os —— — ——___— = ¢@ ar rae MmAOWEnt Lower queue Las been peolessed hal fh te ipxeQubltve EI the the hiqner peiocity nsocess is enecubed picsh. Hz Level dba eS [Ate | sin mulhievel gecdback queue ¢chedultng, A process tc moved bri” queues. - eighe fata fe sepacate processes actosdtug & a Hreic difh cPv bucsr chasacteesshes ap He process wsts fee muth ef ¢PD Hime tt wilh be moved to a Lower priority S iqutue - + Eis scheme keeps T/o bounds 8 fnterachic piers. fu The higley -~pittrre pxipsily guewe - + sinitasily a peo cess Hat wails teo fong 5 th 2ower pefosiky Juene may be moved” eo ta the Ligher due te aging whisk peevente ctnuf. wil whic peeveuts chasuahm . > a evaluation o “algoxtHovad >) cpu__schedultug te seleded ace. to Hye parteuts [euskm | Hee. cadieeta euch as Mmax (Pv utitigahm \ _@Qmax 142.019 Wo UE [Se * Aueueing: M/ua mposailayat eat Qa COM puter sysheww >| eveey WG asa Zale & oat Hing _p20ce Bes. 3 | cPV ts a eave with: tt BLDG quene gn T/o systems have de 2 Kuno voi wg astivap sate @ we can compute 5 AVG qusit vids Leng avg: Wet Hing bane ete | gris acra of ehudy” "s called Gucuclg. N/Wd analysig - sQy in be te avg gueue geugrh (ent clude tre process wohion Ts being rovers w be avg woall na bme Do be the g aakt tn the queue Jp the S4sHm 78 Tr the ¢ready state than rhe WO. of processes Ctaving Me Jueue . naust be egual te He “no. oh process _ hat @xrived heer, Jhaus 3 2 z ~o n= wx ar Uitte Joamuta) MP dt fs valid 402 ate Sek ecluthig algo. / Limttabms TUeAe models are ofttu mty an Qppxorri - mabon not accurate. Be Process cey burst | Py 10 © fers Pr 249 @ siF P3 3 ® RR P4 q @ SRF (0,12, 34) Ps 12 LP ||P: [Pal] Ps | g2)0 0 md Slats 7 1034 4k hag PLES awh = OF lo+agtte2 +44 : = 2 28 [es | Pa [Pr fs | ps J SIF awt= O23

You might also like