Operating System All Practical Assignment

You might also like

You are on page 1of 49
“gee. Mioeludecstdionh> 72 | 249 include < conio.n? _ men IE tore maxlto}Cio} »need Go}re) , alloeCe] Cie 10" owes i worked, Knish Co} , qCicl MAM ceh yh 5 : | vsid acest —ootaix Lint AC} cs ‘apo he ae 05 ics tee) sansa Eee a jose) . — a = sean “red”, € A CIGD; 7 4g 3 rie a 7 3 . ms - a void Aceeot Vector Coe ACV L = a peer f Rr Ci2 0) idm 5 i+) voy ee atass mens ACN 5 : fee 5 — SEeeeeeeasetsseun void _Find_need © Seneca dee — | Bio; iamyiaa) i fe : L } ae po Berl Oy yen eg) le so [is Didyma A an cea Eas Tooeed CGI = maxCiIG) - aboe cog, . enatt ("0 AMoevon s+ Ma wit eed tp *). for(izo y [ems it) QrCjeO, 4 oo jet) i pas ted, Vloo C1 1G); pant? Cre"); fr j=0; | O35 ja) print? “rid ~ max (IC); eprint? C~ \uNe ; for(j=o. 0 3 jax) prot Cuma yineeal CF), Print (MW “D> % Ret ASC a) a) 4 pint (“+ led ™ saves) Cy; pane \n Avoilohle - in” ) “ - print CE"): — a Se | —— Litt _aind) _—— ey Cw enter the 00 of f Sad wa gay esses D5, 7 Pie Cin Enter whe ne reson ye pe — ——00nf Cond 20). - : ao print? Coin Accept oecation t An. Rc cepts “Max: \n 8. Calculeke need \n be Accept . ——eveilable lq 5. Display wives In 6. frit); fit Ante Ser garcia Dp scan Onna *, e eee mea —————Switth(eh) 2 He —————case 1; ia Sree 7 _pat® Orn eotey allecertien enti: Ds ee ee accept — motix(alloe); | —byeak g--ir wees EERIE Ert inf (19 € atvix: “); occe pb _parbix (max); breaks _ 4 Tn ase eae Tie deere ete EHP NOG CO HEHE Ere re eee ee reer) ___ break) _ SCPE PEEP = Pose HSC ei Vassny poor bo | pritR (Ip Enxer avarbhle vector! “), ei wor (avai); Pee eee eee i eo eee eee SEE ReeebeEuEEeee, Seg Lt i i Display tgtoix (3 breaks _ z —————— | tindude Hincwde wobk gy flog = 15 a ie BEE if (Flog = = 0 ff finish Cil==0) fy _Gzo, 3605 pH) __spork Cj) += avail Gj), — [Es Rosh G1; _ —_— efley ety 5: ~ C ety 4 4 if-C pf s=p) 2 over = |> FE i return | — . BonkersC) sh a ee —t = sohety C2; [ es $08 — i: — a fee ee print (* \n Al gale-ty seanence 2 hes been derected | Ao i | BreC seo; bem 5,4) = | - pit CO Ped "sate OI); ; | prist® 1 Deodleck bys occured In); Lurid Resource-rea () = for Cir, iM 5144) iFCreaugst Ci rneedCpno) Ci1) . pratt CS error process exceeds tS Max demand"); exit) 5 3 for Liz 05 16005 i44) —— : | a7 itd “avail 0 =: : - — ae pain? (> “op Pyote: St it < a ee nS 1] aE eng) | ie = = a SS AG jem it) ~ Be ave) Ci = eval) « - . nay! aa r is ndude< ging. h> ~ \- ag. ince < cori h> te include < malloc? JT ee ee = af { - = dane ban i is char -Blenome Cv) ; A Ink stow 5 1s inten; tuk din’ Fnece fe 1% ri F 7 | stud a _vesBioke, sleet. xeemy 3 Int Bit Cod) on; ine ie ioe 1, 0M 5 a 7 Rr ({<0; igen 3 7 af > qurm_= rand O pL ee ft gix_G) = num?» aa ie cxf (20 Given Bie Arey is Dye fey ico E05 HYD L cant? Coed 2 BIRGIT procR Co yeS we thd VC Jed \nt 4 temp => Rename _, Lemp > start, tem, mena j TEMP =temp —s Next ; u Void _CreckePile () Z| a SE a | —_- Ant Poe ghrtetame g See on (oa De of Re pe Cizo, [as Start =i; Plog Kes keh 4 forCJ=0 5 3< 03h - UZ PLO OK] <0) : tis i [Please pg AMC LITT Ssaasasst Pag PEEEPEEEEEEPEEEP EE ae RRRRERRES eee eeeeeeeeeeeeeeeee pis ahi tats tee 3PUlg ey br cok 5 i aa) ce : q Z % ; ee E \P (atort >=0) =n L it a = aS ol= i 7 ; oes aS Qi CVAsO, = jae 5 tenia = Hite Ee ii / E ee. — Show BVE ()5 ( "a Q de = Cstvucts air *) wall ne wo re dir >; C Gy, gucpy (newtlode —> Filename Re, ___gewtede > hen ere a vnewiede, Josttede —> Qext = = Nevotoae. > = Jestdtode = lasx Node x > next; punt? Cin eile Sheston b Sask else —— print? C\o file Allocation Pailed \o"), Ca == POLL) - prot \n Bror—— ) Orecyy is Bmpty ia ee oe AF Latremp (oem olen, Rename >) | “semp l= = temp next) _ d= temp); a emp = NULL; — —_ a 5 : io - oo : else Q aes Pas : es, “ : = iP USeemp (terme —> next —> Penome ,-Mecarne)) : a : aus = ep Sect a X ese - — “tenel stamp next; — % sosoll = 7 a _gtave _=bempl —> start 5 a hen = ssemp) —>len» ee a a stars 5 oe On a { LD OVARE Cen, | oe fp Fe oo 6 _ aX _ —— ULL aes ees > (tee —£___ —o ore ae GD. shaw Wane es K start floge oge chy ae o ("\n Bote umber of Ble Bhodks jp in) Sconf CA mad, th) + —_Greneinte -8xVecor( 3 a — a print AG D an one BAVectop An 2 Creme plow File. od AN 3, shows eas : a \o_4. Delere 7 Ve. ..... pet 8 Bae * = — pin o AX \n Sotey your ehoien ) ieee ns ee 5 oo : a. —— = = EEL CLS tLe Cae te Gener Acar Pace Crentefile Cd 5 eet break; — case Bf sree A s hovodirectay Cl) : __ break 5 cope Ly > a pederePile D5 byenk » eas y while che 5); yesurn 0; Hindle < stdio b> i ilnclude ¢ ota Mb .h? fee BdeRne MAX 200 - + < gh > Hoo ae typedef stwuct. dir a g i a as choy frome C20); fieciis \nx_gta rts - si shuds diy Fnext 5 a 4 Nope 5 fi ce dope. a fise - sos; oe Pint nh bt CmAxT: I _lvord chaos. brtv ector ( ) 4 ee ‘gt 13 = Fort 0; jens itt) lil pink OSs d Y, bit GD); — pantf Oo‘): Tee oid_show dirt) —— LR P Renae, SSE SH Cred ti Stee FeuHe| BEE — i. ee a : —pimPOr Quip; P= P-s next); chav Shgmne C203 tHE HEEEE EH i pint Enter Rle come: Ds sean CY ses Poameds pAMLL® Borer oo, of blocks ") acank C* nd" & nob); if Lech > Pb> 4 printf (4 Failed to create File #5 \n” fname )5 7 yen 5 —— ; 7 a PEELE for liso 5 anyite Boas Fobie Gl] sh ann) wie _ break 5 ‘ = - | Crop eB ¥) pealloe | Csneok (rope); trey (p= sane pee ae p—>stort<1 pea ep Ne xb = "wali 9) Me ones SULA Heese _ Grex = Fgeee- ts ert 5 _ g Steet hit Cj D=-1; punk Ce 28 creaked queceseful, yr Frame)» y — lvid _delere > i pan chy fname fe): eit — R008 2H ; i f= Betis eeie hy ae Petane ( Cp -SPracme ve, Pane )2 byeak 5 Py p=P—->Nexr; \ a iF Ops sav aa Pile. oss pot found \n*, Frome J; posterity Bena = if C po nfs) fice _< First nex elec rf Cp=elast) — ee a lost =% 5 = lass = —> peak =NUL oe -— ay PCs a > ert 2 p> next} = [gree fp A print Fide ote deleted ach co ___ Ate aM — 07. Enome 13 xe mond? 4 ins arts Cover aptal 90. of dis® blog reer costed |EMD> } - eee gevector C ere oe C1) Seed ___—— ee ae \, shove pt vector _ a A Create new Ble er what, yy Beh). gwrish Cch) Anite cose \: show bitvector() ; break 5 cose 2: creare() ; . brea; cose 3: ‘ i stow dir C). L El break: z COSe_ jy > Mioclude Hireludec sid hib.h> 7 oo ined < stving n> He define moxsize loo aT sbuct PeLrby - 7 L i S File B Lint ditimosie) = od, is “Aer AreeSpace = maxsize sbuct fleentny Mes C3) 5 2 = [ait ot. Le Po Tae 8 2h jane Jr i [EC Ly Ci=9; | 1480: an Tt : Pee gee ans bots fles Cid.name 2 UL; te Biles Ci. blocks = NULL) ok insert file (char *Knomne iat_blecks) nt i,j -obloceased sO) soe stents =- 1) = = get! Slot :£ Cbloos > freeSpace) yen 5 re \n Pile cize -s0_ lay bo “), een pe : — eee Ales Cale), bloods _=.Cinvs *) malloc Col blocks # x z _ Files Cslot). came. malloc Co); tes (3 a ais Hes Glos. lengths blecks ; _ Poy (i= 05 ie maxsize 5 itt) PF Caisk Ci} = <0) a Po Asay Blea Clot) -bhocks Collocared} = iy Ges Gala) ats = stort; _ RreeSpoce _~ = blocks ; print? (sinserted oD; 1 vos delete PiteCchar name) i : : zg ‘ yore 909,15 (Coos. = searchfide (name) ===!) L prick Cn Pile not Round _\n yeturn 5 a & cn _Blico; ie Giles Cres] -length 5 i+) { ______ disk FRles Cres} _ blocks Ci) ] = 0 5 ati TE TM 7 gy Lico, % 303 i) Sac yaa | if CBlesCi I. nome J=nvtt #¢ sire Aesop nome,nome d= =O) _— rer, — 5 cet as i a eahicd vad displey Size (> LZ { praMP OG enn aa in-disk = ed", treeSpae )) aap ce a it ee ey Coe ee Bee eee eee RR cant 9 “Wak? HS a ws ~Bxlizoy yg SET Bein DG 2 ese _i it) a a z “at Sara i ee ee i eee * a — i a if Caie Sy = = ©) prikFO sha 0) Eels p— oe — pith Cond VED, Ste eat 9, See eee aid _displyPiles (> L tnt iy printh CS Fikes in disk: \n): grist (* ome vb stevt vb Leggth 10"); forC iso 3 ieS0; fa) WC Ales Ci}. name Le= ALL) prorth (ges Ve “Ud vt edd 1n 7, heSCsD nome Rles Ci .ssoyt_, files Cl bength 25 printf (* Blogs: PLje0 pels CO length 3 44) pritfl a> *, RlesCH) blocks C/I); coe i gantf > avur yo"); uae 3 key 5 Se Se ese we sneok la — =o i ie ciaeeak a Ble “23 | Pin Cio? ee o> lek Se or eS Ang, Exit to” NN iinet ele wen a ? ag py size 0); onrh? in Enter your choice! "); Tee seein gcaok Creed Y ct.ch ) 3 gash (ch) 2 4 7 cose \s i ~ enn C eorer fle comes" ). : gerehor (); ee ges(name ); pric ( Eorer aoober ae lacs: scont-s( “A”, Pplocks); __aasert file Crome oo _breoks ee eT esc prs’ Emer Ble name 4 ret ee r —setalsome; ae ea: decloy Mes C); “wredkk P cose S$: earl); ‘pasinenes® % So coelude ei Bincly de Yod jor) Lint front wear ; : vod _enau eulint 6, into. Cet 9 ete ete EP lveor== 0) suede ase print (% \o Queue is Pull "J; —; ES seks : ae LURont == -) * year ==7)) Root +4 5 { reor ++ 5 yy else 3 i ae ie year tts — yy @Lresr) svar, — 7 a a ae int a yore _ tin, dP inde jpdex, “TorslMead Moment “0, count®®s3 — ee a Ft Eee “eas AG = nivel, — (et sf Gmine aife ee = Te Remy ene Cine. 0-77 male adtfoment » inital tbs ee po sae ae oe ee ce - = oes : ——— og - : = pant Ln \n Given Request Guanes <5 ES ae CPeady Queue), oe — : — sate Cia. York athe onl at pos NG _sconf Xd * , tines); = —— oot eaten = sstf (Ready Guwene rey anit a _ pao? © \oln To heed Mmovernent 15. fod" Teme adMomen® ); - } { {| k ae SS | otf C0. roan reset queve 12 oe I scarf (*Yod “Foal; | prinePc™ Vo Eoter vend wonke head is Pointing +p which _eylinder number 9 # oD . I scant Cd”, Frwhead) 3 t int FCN i b a yequest is tp be s@wed inte request ayeue 79: %) For(i=0 isnora 5 i442 g scanf(" ed * dqueveCs)): SIASSMATE —_—s Date Page a a ECAR les ELEC FASE Ee HEEL i Plans <0) Re sumCj] = cueve Cin") -quevel); count +15 eke ae 2 om C7] = queue GJ-quaeG=!1, cCount++j a a S15 = - = : for( g i=; iscout iat) : x pint? Cored SE", s Cae Cie patterns = Assignment 4 slt-T a nchude estdio.0? Hincde print? (Wyed 7, need GIGD; 4 ‘ox iafeaservie Unt. pro) for =9; 4emyit4) iFloee dC pave G) <= Wor kG 1D — 4 fo ee cmt ++, 2 Cent =) ———.— yeryo |5 else ee a phe Cine. pro) ———_—___ i — - a wLy2 Os Joon; jek) | g oS a 8C eee | cottt; a + — a # Cont com) : . d yetyn \; eke : oe yet 0; Le : oe | : a itt cheaSafe() ic eo i: Selina. iensiat) a while (1) SPO RnishOrD oN ——— _ print? nn Trying for process hedSi D5 = 3 iefleasihde (i) oS : Se peer a 7 7 —_ print C Process Wad a. —~ rr—“=‘O—~i—C~stCSCSCaCaCSCidzsSCSC“CizM Qrontsed re sowed") - eee carers % hy e Ry (5=95 5 am ae) a alee work G Dalle cag} : printf Co So® eqyené 1's a5 ByC k= 0, k < cot; ktt> pent (oda 1 seesen 3) z else RorshCr Jeo 5 print? (* rleed of 5 process od canntt be sahsh sae ] a = - Bot : E iP Plog = = 0) 2 — __byeak 5 x) Sor ojee? a 03-5 as 7 eo work) + a SE EEE Eee =a ral yebirn Weed mn | else — LoshGI= 0 5 Ort Vo Trying tbr Esau a PP Lisdeos bles > peewee; 2 Plog =\5 _ i Princ Aq Provess “ed is printed “), sofeseq Cent +) ay i RnisbhCi d= by r= 05 j0 5 K — Flog = 1, prick CO Process lod fo : : Sronke 4 eae ° pe =e Re veaGn: eS — Boish CiD=) 5, — Cize sjcrn jet D sor KF}=2 V0 rKG 4 aleGIGI; : a —— . — J — print sofe seq 3), CIRO cents 5 et) SE ae Cte deen ge ae ve induce aieseee eae nine oe tindude ae ee Bindluidetcmphs | ee Hdne or ooo oe LO,sum=0, 1 dost | fol ay Sane i mer mer set ( dos argc, , dorgy> : = MPT Cosnmevank CmPt_co mim. WORLD, yan x); ~size (MPT _ Comm wokLD, Fach ince O. aes oe site i dota} = yond () es oor i : = Ei MPT cis eeey Cae Orlsize, MPL_TpT sdote., or bie, — a. MPL Trt 10 M Prom. WoRLD) | po orale ea as anes! = tase -sur t+ dot Ci); ls col Sum, a \, MPT Tnlr MOT sumo MPT _ Conn wwRwd))~ 2 ee -pniot® US cae 43 3 ‘fed “sued; yeorn O: & ~~ tlinchide < otadion > siemens induce ; ae i Hdehoe ay Joo ST a coain C int, Orge , choy. orl pO ok Moco) -ourn= 0, 20,1, — MPT Toit (Large od CSarge dey EMPL Common rf _ MPL Comm size (MPT. Cora wor iD sizes i iP Crank ==0 | : d aa SSEUEEEEET ENT can Poincar sed Ae yg elas See renter y Siete oe PPT Scotter Cobta ar hive, MPL LNT, dot ,— err car bize, MAT TAT {¢by usa Eiciaeei MPT eo Mp WORLDD; _ Be Geo, pease ; ited po ee oon bocal_sum deta C19 L Ee ee (4hol_sum sum Omer TNT, — meT_-SoM, OD ,MPT_ wrn™_vook Lp); iP Crank == 2 ye “cnes Finale veturn Os i

You might also like