Comp 314 - assign 1 PDF

Title Comp 314 - assign 1
Course Operating Systems
Institution Athabasca University
Pages 9
File Size 93.9 KB
File Type PDF
Total Downloads 72
Total Views 161

Summary

Actual assignment - please do not copy...


Description

Assignment 01 Part 1: Concepts and Principles 1. Bot hi nt er r upt sandt r apsar eevent st hatt akepl acedur i ngCPU oper at i onst hati nt er r upt sandr edi r ectt heCPU cur r entt asks.Forexampl e, whent heCPU r egi st er si nputf r om anI /O devi ce( l et ’ ssayt hemouse) ,i t i nt er r upt swhati ti sdoi ngandr esol vest heeventoft heusermovi ngt hemouse t hear ound. At r api sanexcept i onorer r ort hatoccur s.At r apmi ghtbe t r i gger edbyani l l egaldi vi si onbyzer oorani nval i dmemor yaccess. Tr apsar edesi gnedt opr eventer r or sf r om spr eadi ngf r om pr ogr am t o pr ogr am.Orputanot herway ,at r apat t empt st oi sol at eanexcept i onsot hat onepr ogr am cr ashi ngdoesn’ tcauset hewhol esyst em t ocr ash.I fIdesi gn somef aul t ysof t war et hatcausesani l l egalexcept i on,at r apwi l lcauset hat pr ogr am t ocr ash,butwi l lkeepmywhol ecomput erf r om cr ashi ng;Icanj ust f or cet heonepr ogr am t ocl ose. 2. ThevonNeumannar chi t ect ur ei nt r oducedt hei deaofst or edpr ogr am comput er s,wher epr ogr amswer el oadedi nt omemoryandexecut edf r om t her e. Acomput erusi ngt hevonNeumannar chi t ect ur efir stf et ches( r e t r i eves)an i nst r uct i onf r om memory( RAM)andst or est hati nst r uct i oni nt hei nst r uct i on r egi st er .TheCPU t hendecodesandr eadst heALU ( ar i t hme t i cl ogi cuni t )i nput sour ces.TheCPU t henexecut esanALU oper at i onandst or est her esul ti na r egi st er( f r om t heALU ormemory) .

3. Adevi cecont r ol l eri nani nt egr alpar tofacomput ersyst em t hatmanages andi nt erpr et st hesi gnal scomi ngi nt oandgoi ngoutoft heCPU.Tobet t er under st andwe’ l lconsi deranet wor kcar d.Anet wor kcar di spl uggedi nt ot he mot her boar d,gi vi ngt hecomput ert heabi l i t yt oconnectt oanet wor k.The devi cecont r ol l erf ort henet wor kcar dcommuni cat eswi t ht heCPU andser ves asabr i dgebet weent hedevi ceandt heoper at i ngsyst em. However ,t hedevi cecont r ol l erdoesnotwor kal one.Thecont r ol l erst or es t hedat ai tr ecei vesf r om t hedevi ce( t henet wor kcar df r om t heaboveexampl e) andst or est hatdat ai nal ocalr egi st er .Theni tcommuni cat est hatdat at ot he oper at i ngsyst em vi aadevi cedr i ver .Thedevi cedr i veri st hesof t war et hat under st andshow t hedevi cewor ksandcommuni cat est hatdat ai nal anguage t hecomput ercanunder st and. Thedevi cecont r ol l eri st hehar dwar ewhi l et hedevi cedr i veri st hesof t war e. 4. Cl ust er edcomput ersyst emsar ecomposedoft woormor esyst emsor nodeswhi char ej oi nedt oget her .Thesecomput er sar eexecut i ngpr ogr amsi n t andem,t aki ngadvant ageoft hecombi nepr ocessi ngpoweroft heal lt he connect edsyst ems.Theypr ovi deahi ghavai l abi l i t yservi cebecausepr ogr ams bei ngr unbyt hecl ust er edcomput er scancont i nuet ooper at eeveni foneoft he syst emscr ash.Forexampl e,per haps4comput er sar econnect edt oget hert o f or m acl ust er edsyst em,andcomput er3di es.Oneoft heot hernodest hatwas moni t or i ngt hatcomput erwi l lt hent akeoveri t soper at i ons.Theuser sand cl i ent soft heappl i cat i onbei ngr unwi l lonl ynot i ceasmal li nt er r upt i onas oper at i onswi l lcont i nuewor ki ng.

5. Anoper at i ngsyst em’ st womodesofoper at i onar et heKer nelModeandt he UserMode. I nKer nelmode,execut i ngcodehast ot alaccesst ot hesyst em’ s under l yi nghar dwar e.I nker nelmode,anyCPU i nst r uct i oncanbeexecut ed andr ef er encedf r om anymemor yaddr ess.Cr ashi ngi nker ne lmodei snot desi r abl eandhasse ver econsequencest hatwi l lhal tt hewhol ePC.Wi ndows wasf amousf ori t sbl uescr eensofdeat h,whi chi sanexampl eoft hi ssor tof cr ash. Usermodei st hemostc ommonwayi nwhi cht hecoder unni ngonaPC wi l l beexecut ed,becausei ti ssaf erandr es t r i c t saccess .I nusermode ,t he under l yi nghar dwar eorr e f er encememor yi spr ot ec t edf r om di r ectaccessand c odemus ti nt er ac twi t ht hesyst em’ sAPIi nor dert or un. 6. Cachei sahi ghs peedmemor ys t or i ngmechani sm usedi ncomput er s.I t canei t herbear eser v edsec t i onofmai nmemor yori tcanbeasepar at ehi ghs peedst or agedevi ce.Thei deaofcac hei st ost or ef r equent l yusedpr ogr ams i nt oi t ,t her e f or emaki ngt hem easi ert oac ces s.Whenyouopenupan appl i cat i ononyourcomput er ,Wor df orexampl e,t heCPU wi l lfir stc hec kt he cac hei st oseei ft hepr ogr am i sst or edt her e.I ft hepr ogr am i ss t or edt her e,i t wi l le xec ut emuc hqui ckert hanhavi ngt or e t r i ev et hepr ogr am f r om ast or age devi ceandt henl oadi ti nt ome mor y . Cachecoher encyi st hedi sci pl i net hatensur est hatval uesst or edacr oss mul t i pl el ocalcachesar econsi st ent .I ti spossi bl et ohavemul t i pl ecopi esofan i ns t r uct i ons t or ei nmanydi ffe r entcac hes ,andt hati nf or mat i onmus tbekept c ur r entandequalamongal lt hecaches.

7. DMAi saneffici entmechani sm f orper f or mi ngI /O becausei tenabl est he devi cet ot r ansf eranent i r ebl ockofdat adi r ect l yt omemor y ,wi t houtneedi ngt o got hr ought heCPU.Whi l et hedevi cecont r ol l eri susi ngDMAi st r ansmi t dat a,t heCPU canbeav ai l abl et oper f or m ot herac t i ons .TheCPU i sonl y i nt er r upt edonc eperbl ockofdat ar at hert hanbei ngi nt er r upt edbyeac hbyt e ofdat abei ngsentf r om t heI /O devi ce. 8. Mul t i cor epr ocessi ngi smor eeffici entt hanhavi ngmul t i pl esi ngl ecor es ont hei rownchi pspr i mar i l ybecauseonchi pcommuni cat i oni swayf as t er t hanbe t weenchi pcommuni cat i on.Fur t her mor e ,mul t i cor epr oc essi ng c onsumel esspowert hanhavi ngmul t i pl esi ngl ecor echi ps,whi c hr educest he c os tofbui l di ngandoper at i ngt hecomput er . 9. Theappl i cat i onpr ogr ammi ngi nt er f ace( API )i st hese toff unct i onst hat ar eavai l abl et obeusedbyanappl i cat i onpr ogr ammer .Thesys t em cal l i nt er f acei nt er pr e t sf unct i oncal l si nt heAPIandt heni nvokest henec essar y sys t em cal l swi t hi nt heoper at i ngsys t em.TheAPIoper at esi nUserModeand doesnothav et heabi l i t yt odi r ec t l ymakeasyst em cal l ,buti tusest hesys t em cal li nt er f acei nor dert odoso.Thesys t em cal li nt er f aceser v esasal ayerof abs t r ac t i onbe t weent heAPIcal l sandt heoper at i ngsys t em.

10. Des i gni nganoper at i ngi sahugeunder t aki ng,andr equi r esawe l l desi gnedpl ant obei npl acef ort hesys t em t obecr eat e deffect i v el y .Someof t hegoal st obeconsi der edwhendesi gni nganoper at i ngsys t em ar easf ol l ows:



Theser vi c est hatt hesys t em pr ovi des:Whenpl anni nganddesi gni ng, youhav et ohaveac l earpi c t ur eoft hedi ffe r entse rvi cest hatyour oper at i ngsyst em needst ooffer .Thi sr equi r est hi nki ngoft heov er al l t ar getaudi enc eandusageoft heoper at i ngsys t em.



Thei nt er f acet hatt heOSwi l luse:Youhav et ohaveapr eci sevi si onf or whatki ndofi nt er f acewi l lber equi r edf oruser sandpr ogr ammer st o i nt er ac twi t ht hesys t em.Thei nt er f acebe t weenWi ndows ,Macs,and Li nuxcomput er sar ever ydi ffer entandt hi sgoalmus tbese tdur i ngt he desi gnpr ocess.



Thec omponent sandt hei ri nt er c onnect i ons:Youneedt ohav eadet ai l ed pl anofhow t heoper at i ngsyst em i sgoi ngt obel ai doutandwhati mpact t hatwi l lhav ef ort hecommuni cat i onbe t weent hevar i ouscomponent wi t hi n.

11. Modul arker nelmi ghtbet hebestoft hec ur r entoper at i ngsyst em desi gn t echni quesbecausei tc ombi nest hebenefit sofker ne l l ev eldr i v er sandt hi r dpar tdr i ver s.Thepr i mar ybenefitofusi ngamodul arker neli spr ocessi ng s peedasi tdoesn’ tneedt ol oadev er yt hi ngatboott i me;i tcandynami c al l y c hangeasneeded.Thi sway ,dr i v er swi l lonl ybel oadedwhennec essar yand notbe f or e .Meani ngyourcomput erdoes n’ ts pendt i mel oadi ngt hesedevi ces t hatyoumayormaynotevenuse .I tal sohast headvant ageofbei ngsmal l er t hanot hernonmodul arker nel s. Ther ear ehowe versever aldi sadvant agest ousi ngamodul arker nel ,t he mai nonebei ngt her i s kofani ncr easeofsys t em cr ashesascor r uptmodul es havef ul lper mi ssi onandcani nt er ac twi t ht heunder l yi nghar dwar eand memor y .

12. Vi r t ual i z at i onusesahyper vi sor ,whi c hpr ovi desanat i v ehar dwar e abs t r ac t i onf oroper at i ng.Thi smeanst hatIcoul dr unavi r t ualc omput eron myPC t hatcanr unwi t ht hesameper f or manceasi fi twer er unni ngont he t ypeofsys t em i twasdesi gnedt or unon. Si mul at i on( oremul at i on)r unsasar unt i meemul at orofphysi cal har dwar e .Si mul at i oni sal otsl owe rt hanvi r t ual i z at i onandhasal otmor e c ompl i cat i ons . OnmyPC Ihadavi r t ualcomput eroni twi t hadi ffer entOSi ns t al l edsot hat Icoul dt es tsof t war ef ort hatOS.Thevi r t ualcomput erwor kedgr eatandI c oul dr unpr ogr amsf r om t hatvi r t ualcomput erandt heybe hav edj ustl i ket hey woul dhaveonast andal onecomput erusi ngt hatOS.Ial sohaveaNi nt endo emul at oronmyPC whi chr unsNi nt endo64games.Ev ent houghmycomput er i sf armor epowe r f ult hant heol dn64consol es,t heemul at orr unsr eal l ysl ow andi schoppybecausei tdoesn’ tdesi gnedt owor konmysys t em.

Part 2: Design Considerations 1. Comput eror gani z at i onfigur e:

Memory

Arithmetic Logic Unit

Control Unit

Input

Output

Memor y:Thec omput erwi l lhaveme mor yt hatcanhol dbot hdat aandal sot he pr ogr am pr oc essi ngt hatdat a. Cont r olUni t :Thecont r oluni tt akescar eofmovi ngdat aandpr ogr amsi nt o andoutofmemor y .I tal socar r i esoutpr ogr am i nst r uct i ons;oneatat i me. I nput–Out put :Thi si st hewayt hatt heuseri nt er ac t swi t ht hemac hi ne,bot h i nput t i ngi ns t r uc t i onsanddat a,andhavehavi ngt hemeanst or ecei v e i nf or mat i onbackf r om t hecomput er . Ar i t hme t i cLogi cUni t :TheALU uni ti sconcer nedwi t hcar r yi ngoutal lt he dat acal cul at i onst hatar er equi r ed.

2. Asys t em cal li st hemanneri nwhi c hapr ogr am r equest ssser vi cef r om t heoper at i ngsys t em’ sker nel .Byde f aul t ,t heoper at i ngsys t em f unct i onsi n UserMode,pr ot ect i ngt heunder l yi nghar dwar ef r om mani pul at i onbyt heuse r orbyot herpr ogr amst hatar er unni ngi nt andem.Whenasys t em cal li s per f or med,t heoper at i ngsys t em swi t c hesi nt oKer ne lmodei nor dert omake t henec essar ychangeorupdat eandt heni tgoesbac ki nt oUsermode . Ther ear esi xpr i mar ycat egor i esofsys t em cal l swhi c har ebr i eflydefined bel ow: 

Pr ocessCont r ol :Thepr oc esscont r olsys t em cal l senabl espr ogr amst o beabl et ohal tori nt er r uptt hei rownexecut i on.Anexampl eoft hi s c oul dbewhenapr ogr am r unsi nt oaner r orandneedst oexi ti t s oper at i oni nor dert opr ot ec tot hersyst ems.



Fi l eManagement :Thefil emani pul at i onsys t em cal l shast odowi t h cr eat i ngandde l et i ngfil es.Thi swi l lal soi nc l uder eadi ngandwr i t i ngt o fil es,aswe l lasmovi ngt hem ar oundandcopyi ngt hem.



Devi ceManagement :Devi cecal l sar eaboutmanagi ngwhi c hdevi ces haveaccesst owhi c hr es our ces( whi c hcoul di ncl udeot herdevi c es . )For exampl e,apr ogr am mi ghtmakear eques tt ouset heDVD dr i vef or bur ni ngamovi eont oabl ankDVD.Thebur ni ngsof t war ewi l lmakea sys t emscal lt oobt ai nappr ovaloft her esour cesi twi l lneedi nor dert o pr ocee d.



I nf or mat i onMai nt enance:I nf or mat i onsyst em cal l sexi stf ort hepur pose oft r ansf er r i ngi nf or mat i onbet weent heuserpr ogr am andt heoper at i ng sys t em.Anexampl eoft hi scoul dbet hemai nt enanceoft heaccur at e t i meanddat eoft hecomput erdi spl ayi ngi nt heOS.



Communi cat i ons:Thesecal l sar euse f ulf orexchangi ngsmal l eramount s ofdat abet we endevi cesi nt hecomput ert hatdon’ tnee dt ogot hr oughal l t heusualc hec ksandbal ancesast her ear enopot ent i alr i skofconfli ct s wi t ht heset ypesofmessages.



Pr ot ec t i on:Pr ot ect i onsys t em cal l sar ef orcont r ol l i ngaccesst ot he r esour cesi nt hecomput ersys t em andse t t i ngper mi ssi ons.

3. Vi r t ualmachi nesar eessent i al l yal ay erofabs t r act i onbe t weenasys t em’ s act ualhar dwar ecomponent sandt heVM.Thevi r t ualmachi neconsi der st he hostmachi ne’ scomponent s( CPU,memor y ,di skdr i v es ,ne t wor ki nt er f acecar ds andot herdevi ces)t obei ni t s( t heVM’ s)nat i v eenvi r onment .Al t hough obvi ousl yt hehos tcomput eri sr unni ngt heVM sof t war e,t heVM be l i ev est hat i ti sr unni ngi nanenvi r onmentt hati snat i v et oi t .TheVM wi l lal sohav ea User ModeandaKer ne lmode,al t houghi t sKer ne lmodei sst i l lr unni ngwi t hi n t hemai nsys t em’ sUse rmode,asi ti sapr ogr am t hatt heuseri sr unni ng.I n t hi swayt hemai nsys t em i sst i l lpr ot ec t edf r om ker nelt amper i ng.AVM wi l l nev err unassmoot hl yasi twoul datat r ul ynat i v esys t em becauseoft hel ay er ofabs t r ac t i onatt heext r awor kt hatmustbeper f or me dt ohave VM bei ngr un i navi r t ual i z edenvi r onme nt .

TheJavaVi r t ualMachi ne( JVM)hassi mi l ar i t i est oVMwar ei nt hei dea t hati tal sodefinesanabst r actmac hi ne,butt heyar eal sover ydi ffer ent .I nt he JVM,nohar dwar e( ot hert hant heCPU)i svi r t ual i z ed.Foral li nt ent sand pur posest heJVM i savi r t ual i z edCPU,notac ompl et evi r t ualmac hi ne. Vi r t ualmachi nes( asi nt hecaseofVMwar e)cr eat eavi r t ualenvi r onmentof t hei rnat i v esys t em;notonl yt heCPU,butt heyal soi ncl udedvi deocar ds , ne t wor kcar ds,andot herext er naldevi c esandhar dwar er egi s t er s) ....


Similar Free PDFs