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

Unit 1 Operating System Notes

Os unit 1

Uploaded by

Ex Maheshwari
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)
33 views

Unit 1 Operating System Notes

Os unit 1

Uploaded by

Ex Maheshwari
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/ 20
—~ —Operading § Cite ra) ( furl erp. fainadion {ees : i Ontt =1 a |__| he omg Sl} | a Lobqectve of umit : a, ee = [Jubak ts operat Sygtem om Lac] Functions of Op Peete Siem. _ +e 3 Clousitication [yp 23 ~Dperasing 8 i TS & Reak- aie os a 1 > Time shaving OS | 47] Mutt: Proqvomming 8 Multt Processing Grd L thety differences. ~~ Bape Ls} Mutt: Programming 2 Multi “Threading Pig |_ difference. 7 | 63 Spookirg and tts advantages . ert a7 Badeh” Processing Sy System uk Mut? = oo | mir Sustem. ad J gtuctuve [Architecture of Opera nq | System. ia 73 Components of operat System , Sewte — | provided by operating System’ a fol kem@ond Hs pervttion. and aso [Kerra types i 11) Systerh Com 4 42.) ered approach of designing the og.) 28 Process Switch and mabe swrtch . = | gs ot a Letig begin = PS G-1]_ what & operating Syston 1 write PAIS Major function - > Operadins . — | Ee 1 Syster i user —. 2 Operating System works os a bridge bekveen uses ond Computes -haydware . +> Operating System is ar softwose application that contyots “whale working of computer thordwiave. =P Usey con we and access the Ahardnaxe components of System. wing opesating J system. Examp Qi. windowe, Linux, Apple's Mac Cs... Euncttons - 1. Booting C) this foo ptocess where operating System is Joaded and staxt- working. = a Formocting format ald processes works from RAM. go “hock they ean Stove New data. | 3. Managing Gmputer Resources Hib ts In We Ahorsification Ay Operoting System | eT “SR l ard age system Simitds Nsks axe grouped together ond 7) executed S { Less interaction blw wer & system while eveceetion of tak | SG epu is tdhe. EE i | [2 Mere than ene i “Lean CPU choasey oe andl erecutes tt Others ave wat ra a a = Programas} G epo never become {vee ff we have task3 - tr main Memon, { : proqiamms can verde sezit cal fe th Main memory. Time. shaving + + Here muttipte proqrame ean be easel Sinuldeonsouy, > Tme-stot is assiqned to every prog yout, %, Real-time OS- 5 “These 0$ axe wed im emesgenty yequitements on the erecu- ton of Sproagrdame. i) _Nowdays most of the operating Systems ave Real- Tithe Operating Systems. au | inDetafh * | > In Real-time OS each and every | thing ts ina fixed fovmat. J} = _ J for example Medica frnaging systens,| industyfal contvoL systems _ wekpah Sistoms, | J vobotsS etc. Diffevence blw Hard yeah time 2 Sott Teak time 0S - | Tick RpossSe DE | chavacterste Hard vent me Soft 1eok tine! j 14. Response Time | Havd veguiied Soft destved | 2. Peak 2oad Predictabse Degraded performance 3. Contras of Enutvonment Computey, pace = 4.Safery atten evttiear Non exited 5. Sige of data | Saal | medium Large fie8 a Ic. Redundancy Active Checkpoint type Tecove#iy 5. Dasa Tyeegirty| Shott tern torg tet, ‘Tab rtor derectin| Autonomous user assi¢ted 3) Properties of ume -shori'ng , Yead- time ond diservbaked operating “system. a (ee t } 4 dime. shoving os 2 See ee * we CPU scheduling and multt-pyro = mming to we system on SERA ante Yt “The Cpt _can Swttch blu pYoqvams~ fast because tt 13 shored blu mutt Users. > Real-time 68> * Those are ussecatay deditated av embed Syste. vee hey _we muadtipie sensors a3 tip 2 o/e devicesz % The system ensuve that the output witt be genevated in a fk span of time. | + Distributed OS - &_Cmputaton ame mare than ane | physieat “pyocestox8. Each processoy_has Tt's own memory, iis x No chock Sharing. i * Tommunicatiot” fakes place hyo { Pe gh communteation Liner — _ e = ae I 7 —— *\__ Mutt. Progvomming System and Malt J Ptocessox_ system. J Wy Mult Programming Sugtemn 4 See Qno- 2 } 7 Mutat = Procassox System > * Rese moxe thon one processors ave cormmunt coding te each other. a Thou shove nekooik , tp ofp devices ig Somed ines memMovh. * Te is possfhle od +00 plocosors yun ~Simmbaandounty [ pavagver . oe Mutt: Processov Systern Za Summetiic ASummekv te Tu -Pyo. — mUtat-PYo. } 5 Aree v : yas Tderetfenct * eve each Pee lo diffeven Speer * Tt Fallows MoRey- « Alithe cpu shared Stove velationship. the camrron mernory 5] Muss thveoding = 7 FE enabies she ideo of mubt’-toaking Tn applioakton) Softoore a Dates} ——— Page: a > “Threads can Tun porasier. > Threads hove thay own tifenote. 3 “Threads _wotkd on the ex cotrdept of fotity quent priotity qv ie — 63 Difference b/w mwlkt-procasing g mutt - programming Operating Systems Ff HTT a. Tk Yefers to the [Mukti Proqvamming —— Mutt- Procexst ng q m | Qeerkk keeps Sevevay procerxing of murkiple CPus ak atime. progvams fn main memory at same Um = and execute then Conauvenkdy, ao g b, Tt wes murtipte CPu. 6. Tk wes one Cpu.) Ce Te wbtows pavatler Cc. Switehing beko processing i programe takes pracel| d. Move "me taki d._ tess me taking, d e. Usuattey MOVE expens.| T ve. 2. Legs expewive. J = i hy TU ° pe Youtube (a) Smast Engineer Babu. i ae Pose | 4.4 Summetitc TUK procexer vis | Asyvhmerie auth?! procexting = Pavormetey | Symmettto Asymmetric. TF 1 Aychitectuve | ALi procecove ave | Asymmor Te th sy mmetste manner ie moter. present Some. Architeckive AMeya proce- Ssore Different Architec tue) Communicarion | Bu shaved Processors memory don't Need ws 40 cond yadled Ostthey ave undesmasiey| processoy. | GD Fouthere process faisure Ho masta! Yeduces compa. péocesco¥ capacity of system. | fetta, ‘ on Shave 5 Processor ‘Decomeys MASKLY > Ease —Compaex y Simpye pate] Page: moastey- glove Computing s |] Ht ts r | Fh Se 4 Vy chor AHL tle Lf Todo: Difference biw batch pieces 9. Gf system and mutt - programming sla UW Gmetioned eontfeW in Q-27 = examples batch processing OS > autoexec. bat_ files“ exeattore i “thig te a bosch | fete. mutt — proqva mm ng Systern > tanning | ; autube and Suhadsapp ot ~@ sayrie time. 8. SPOOLING? 8 7 Tris acxonyrh fot S$ fmudsaneous, Peripheral Operations Online . sats Spoating ts O pLoeess, of putt { 03k [-fobs 7 no special oxea of emo So that OPO ean access them when a fs f1ee. peace aa ——__ -—_ a = hey — = Cord Memory | FV printer ———— tt Readey Hy chrink Spoekionge ~ Tt fs wets because device access data_tn diffevent Yares. 3 Most cormmon exarpse 1 tp tive Spoating! J | Advantages of spoesing, ave ¥ out evieng t | | a. - the spooting uses a dick as avery Sarge butter J b. Te is capabke of overiappina I/p and o/p epevations of differen? fobs. Operating Sugtern Stvuctude -o¥- Loyeved ‘Tstrackuré of om opevecting System. > Stiuclure of operating aystertt ~ > Simple Hructure + layered eappvoach. 3 Micio- kernels + Modules a Csnort engineet bobue * + Date:}———, SS Page: eae 1. Simple Structuye — > _MS-Des fe one of the examples of Simpse St¥uctuve DMS -pos js wrttten to piovide the most functonality tn the east space. Here the axchtlectuve & rot divided tro modules , > Tt follows Minear exeakon. apptication proqvam Lresidert sustem program J. [™s-n08 device drivers ROM BIOS device drivers a layered approach In _this oppYoach -7_The operating system i§ divided tito quumber of SouyeyeZ 3 These Jays ean abo be tefetred as Leveb. > The bottom Sauer Qevek—o)-te the Hovdware and the top-Sanjey Leveal- Nj VT ig the usey- indevioce. Page 4 See Pee — Lee t {| Hardware J | : 3. Micro- Keynes © > These Kind of stiuctuves axe used fox message -pancing blw wert and Systern © pe ee Ee re $. Modutey 2 > __Heve whole sustem fs divided fnto diffevent- diffevert qadulles. > Fach and every modute ro Tee ow task to do. >This is an _extemion of KerneW , heve Kerner contol vortous cove ComnponentS Gnd et Dinix (n_addittonal servicer. 2 This roach alow: certain featuyes 40 be tmplemertied dynamieotty, > hts f the mast efftdient strddiwve of OS. 2 Macos. £4 % xe loach t Advantages ‘of Joe d apptoach de The main advantage of Jauerved approach fs stmpiiety of eorBtructton ord debugging. ' 2. Simpafes debugging as system vevificatte, + Re SAS 2. Easy +o implement % Cost effecttue. Disadvantages of, Jayered approach 3 ak ploming Yequived -for defink Sanyers. oe 2 They ave Jers etticient than other ‘ype of gt¥uctures. >_B This approach fave Jess func tonatéties cthon otheY appyoaches « fo} Components of: Speroting System « Components Tricks MPD E [2 Memowy Monagement ag Ly Process Marogemert ly Device Management Fike Monagement TS Ay Memay Management : > Keep acts of use of main memory. > Has much memory. te allocated which . FOCUS. 2 > “Adtocate 3 deaWo cate meray, 27 Processor Managements 3 Keep racks of procexsoy ond status of pvocesgove > Adlocation of CPU to a pYocess . 2 | 3 Deatlocaton of CPU. CATR | Contiaiiley | 83 Device Monagemend = 7 _ keep aE of alt devices. 3 To comttatley manages ak Device . > ALlocate & deattocateVdeviess. 4.J Fite management ¢ > Tacks Infovmadton, Location of FAG. 3 Filo known ow. fle system: Allocate, 8 de-alloedtes the oOUT, | H | ] Ee —— lo - Smoxt Engineey Babu | Date: |-——-—] page ~~ en HY Sesutces proutded by the operatirg Syston, : U Setuicoes See oa 2 fe pe DT Prog tan Ete system Exvor execution | - mantpulation detection Jv Llo operations Cormmunicakion 4 a Resource allocation Protection ‘and Soourity 7 TRICKS PIF CE RP tiPEe AX 19.) Kernel - ~ Tt is the ymafn Component of most of the operating. system. > Tt works cba bridge p/w appro ons and actual processing ak Alu. pgp if Appiicadon ) rhordiwave wy Kesnel. fig} —— Page: ar} > Heart of am 08. > Tt provide the lowat devel abstiacten | dayer. wf J Operations p evfesmed by the keyned aye - > _Gontwots the state of the process. > Provide mernovy for the process warming, | = Adlocate; B de-allocatel processes. 7 > Tt maintains a time table .so thot Cpu scheduling can be done. | > Manages oremovy working. Co J u “Types & a | = _%e-entiant_keyneby | > Morotithic kernels > _MicYo-Kexned = te- entiont Kernels: “This kernet fe wre one where many processes / threads con exewte | at one time without affecting each other. J % Tt one process ie ercoting operading | guste proqyans then othey proces J don't Pretevrupt and Aave to walt > Moyotitue _kevned ¢ + kernel _sige is faige x 0S is complex Wdaign. | ® Gntain3s all geviceVot 08. dae }——— i Page} | a Fast Respo we time. = a Message passing oF context Swttcht: TS_mot ‘#quitted. = i | eg ag Ee + Miclo- Kesneh > ri i Smatt kexned ste | Easy +o datan OS ony Tee afd dow evel services provided Qo Wer Respore dime than monolithic ; Kernd. & “They yequive peetsage. passing and : Contest strtehh | | | ; 28:] System Cail? i 3 These ave function calls that ave done 5 1 te perform Some +task- i > These are maferty Written m ¢? and C+t ot any othey system designing Sarquow, > “These system calls provide} gevuices to Appticators while they cabked. How tt & made in fown of @ pYoqyoun Po. SKS Say A progyam fn c+ for adding two Ynumbere fs, E 4 4 include ¢ fostveam > Using namespace std § fat maint) f —— a fret bY cind> 7 bt Cout << O+b} vekuin 0 5 $ System] functton call be wike, main)! Exampae of System calls ¢ 7 forkOg create new proces exec)? execute a new proqvam in pYecess walt? walt KU execution of process ext: exit from a process erection get MOE get process Mentifer of euvient p Yo. get pid) s get pavent procas identifier. “ior Os _ increase (decrease sige of a process 44. Diffevence ‘brew si atk_ond Kerner Sheth Kevnad o vuns quit after o Th fw of a operating system deat piog tom, pvo@asses — e wel <— kernel o ey hlw <~ wer + CHUT of KeYNOh « B progam trot ~ | tkevaet wstth hi wo Note? tohal ave the advantages of the [ever app¥oach foche design of opevasti SySten Wa ra © absgody discussed im Q-9 i 48.) what is the vewon beRind duok mode operation of pv¥ocessars 9 =oR= a whether tt tg possible to eonstyuct a seouse — 0S without having dual made _eperaston fathe— Sy Stem 2 3 Ti duak mode operation, two separode modes ave wed -for wortkrg of operoxing system. Ur & User mode eS e Monier mode. i; > Mode bit ts used i vepYent mode | of the system oO ou OX Y 6 monitoY mode — a aes 1 _wei mode — 3 this mode bit helps us to differentae! the taste, Like T { emputer boot 08 Loaded mentor mode 3 TT semade } < > the watiedged imsitvucttons ate ated only wa_ fn 4Ke manhtot made, ae eviupt | Foult Conitor wer ea — made 8ek we#t ymade 16) Procers Switch and Mode switch Pracers Satteh Mode Switch > Ttoecurxs when the > _ Tt oceuts when processor switches from mode ig switched blu ONE process to another. user & Kernel. > wher ptocas switchi, 3 Ttcon be done nT oceteys then using system cal. eortert of old pracess “Mhists U_spectad gets save in its PCB iystvuat ton thot Sond then new gets the system state process Sood, 40_kerneMmmode. > Fromphe: Ttany _ problem occurs then > Eample? Ta wer process Needs to the system gave access things contYo- quartet process context| Med by Kerma, te fg and excentes New, necessary +o pevform_. made switching. Seed We

You might also like