操作系统习地的题目.docx

上传人:b****8 文档编号:10229730 上传时间:2023-02-09 格式:DOCX 页数:87 大小:59.50KB
下载 相关 举报
操作系统习地的题目.docx_第1页
第1页 / 共87页
操作系统习地的题目.docx_第2页
第2页 / 共87页
操作系统习地的题目.docx_第3页
第3页 / 共87页
操作系统习地的题目.docx_第4页
第4页 / 共87页
操作系统习地的题目.docx_第5页
第5页 / 共87页
点击查看更多>>
下载资源
资源描述

操作系统习地的题目.docx

《操作系统习地的题目.docx》由会员分享,可在线阅读,更多相关《操作系统习地的题目.docx(87页珍藏版)》请在冰豆网上搜索。

操作系统习地的题目.docx

操作系统习地的题目

1.1Whatarethethreemainpurposesofanoperatingsystem?

Answer:

•Toprovideanenvironmentforacomputerusertoexecuteprogramsoncomputerhardwareinaconvenientandefficientmanner.

•Toallocatetheseparateresourcesofthecomputerasneededtosolvetheproblemgiven.Theallocationprocessshouldbeasfairandefficientaspossible.

•Asacontrolprogramitservestwomajorfunctions:

(1)supervisionoftheexecutionofuserprogramstopreventerrorsandimproperuseofthecomputer,and

(2)managementoftheoperationandcontrolofI/Odevices.

1.2Whatarethemaindifferencesbetweenoperatingsystemsformainframecomputersandpersonalcomputers?

Answer:

Generally,operatingsystemsforbatchsystemshavesimplerrequirementsthanforpersonalcomputers.Batchsystemsdonothavetobeconcernedwithinteractingwithauserasmuchasapersonalcomputer.Asaresult,anoperatingsystemforaPCmustbeconcernedwithresponsetimeforaninteractiveuser.Batchsystemsdonothavesuchrequirements.Apurebatchsystemalsomayhavenottohandle

timesharing,whereasanoperatingsystemmustswitchrapidlybetweendifferentjobs.

1.3Listthefourstepsthatarenecessarytorunaprogramonacompletelydedicatedmachine.

Answer:

a.Reservemachinetime.

b.Manuallyloadprogramintomemory.

c.Loadstartingaddressandbeginexecution.

d.Monitorandcontrolexecutionofprogramfromconsole.

1.4Wehavestressedtheneedforanoperatingsystemtomakeefficientuseofthecomputinghardware.Whenisitappropriatefortheoperatingsystemtoforsakethisprincipleandto“waste”resources?

Whyissuchasystemnotreallywasteful?

Answer:

Single-usersystemsshouldmaximizeuseofthesystemfortheuser.AGUImight“waste”CPUcycles,butitoptimizestheuser’sinteractionwiththesystem.

1.5Whatisthemaindifficultythataprogrammermustovercomeinwritinganoperatingsystemforareal-timeenvironment?

Answer:

Themaindifficultyiskeepingtheoperatingsystemwithinthefixedtimeconstraintsofareal-timesystem.Ifthesystemdoesnotcompleteataskinacertaintimeframe,itmaycauseabreakdownoftheentiresystemitisrunning.Thereforewhenwritinganoperatingsystemforareal-timesystem,thewritermustbesurethathisschedulingschemesdon’tallowresponsetimetoexceedthetimeconstraint.

1.6Considerthevariousdefinitionsofoperatingsystem.ConsiderwhethertheoperatingsystemshouldincludeapplicationssuchasWebbrowsersAndmailprograms.Argueboththatitshouldandthatitshouldnot,andsupportyouranswer.

Answer:

Point.Applicationssuchaswebbrowsersandemailtoolsareperforminganincreasinglyimportantroleinmoderndesktopcomputersystems.Tofulfillthisrole,theyshouldbeincorporatedaspartoftheoperatingsystem.Bydoingso,theycanprovidebetterperformanceandbetterintegrationwiththerestofthesystem.Inaddition,these

importantapplicationscanhavethesamelook-and-feelastheoperatingsystemsoftware.

Counterpoint.ThefundamentalroleoftheoperatingsystemistomanagesystemresourcessuchastheCPU,memory,I/Odevices,etc.Inaddition,it’sroleistorunsoftwareapplicationssuchaswebbrowsersandemailapplications.Byincorporatingsuchapplicationsintotheoperatingsystem,weburdentheoperatingsystemwithadditionalfunctionality.Suchaburdenmayresultintheoperatingsystemperformingaless-thansatisfactoryjobatmanagingsystemresources.Inaddition,weincreasethesizeoftheoperatingsystemtherebyincreasingthelikelihoodofsystemcrashesandsecurityviolations.

1.7Howdoesthedistinctionbetweenkernelmodeandusermodefunctionasarudimentaryformofprotection(security)system?

Answer:

Thedistinctionbetweenkernelmodeandusermodeprovidesarudimentaryformofprotectioninthefollowingmanner.CertaininstructionscouldbeexecutedonlywhentheCPUisinkernelmode.Similarly,hardwaredevicescouldbeaccessedonlywhentheprogram

isexecutinginkernelmode.ControloverwheninterruptscouldbeenabledordisabledisalsopossibleonlywhentheCPUisinkernelmode.Consequently,theCPUhasverylimitedcapabilitywhenexecutinginusermode,therebyenforcingprotectionofcriticalresources.

1.8Whichofthefollowinginstructionsshouldbeprivileged?

a.Setvalueoftimer.

b.Readtheclock.

c.Clearmemory.

d.Issueatrapinstruction.

e.Turnoffinterrupts.

f.Modifyentriesindevice-statustable.

g.Switchfromusertokernelmode.

h.AccessI/Odevice.

Answer:

Thefollowingoperationsneedtobeprivileged:

Setvalueoftimer,clearmemory,turnoffinterrupts,modifyentriesindevice-statustable,accessI/Odevice.Therestcanbeperformedinusermode.

1.9Someearlycomputersprotectedtheoperatingsystembyplacingitinamemorypartitionthatcouldnotbemodifiedbyeithertheuserjobortheoperatingsystemitself.Describetwodifficultiesthatyouthinkcouldarisewithsuchascheme.

Answer:

Thedatarequiredbytheoperatingsystem(passwords,accesscontrols,accountinginformation,andsoon)wouldhavetobestoredinorpassedthroughunprotectedmemoryandthusbeaccessibletounauthorizedusers.

1.10SomeCPUprovideformorethantwomodesofoperation.Whataretwopossibleusesofthesemultiplemodes?

Answer:

Althoughmostsystemsonlydistinguishbetweenuserandkernelmodes,someCPUshavesupportedmultiplemodes.Multiplemodescouldbeusedtoprovideafiner-grainedsecuritypolicy.Forexample,ratherthandistinguishingbetweenjustuserandkernel-mode,

youcoulddistinguishbetweendifferenttypesofusermode.Perhapsusersbelongingtothesamegroupcouldexecuteeachother’scode.Themachinewouldgointoaspecifiedmodewhenoneoftheseuserswasrunningcode.Whenthemachinewasinthismode,amemberofthe

groupcouldruncodebelongingtoanyoneelseinthegroup.Anotherpossibilitywouldbetoprovidedifferentdistinctionswithinkernelcode.Forexample,aspecificmodecouldallowUSBdevicedriverstorun.ThiswouldmeanthatUSBdevicescouldbeservicedwithout

havingtoswitchtokernelmode,therebyessentiallyallowingUSBdevicedriverstoruninaquasi-user/kernelmode.

1.11Timerscouldbeusedtocomputethecurrenttime.Provideashortdescription

ofhowthiscouldbeaccomplished.

Answer:

Aprogramcouldusethefollowingapproachtocomputethecurrenttimeusingtimerinterrupts.Theprogramcouldsetatimerforsometimeinthefutureandgotosleep.Whenitisawakenedbytheinterrupt,itcouldupdateitslocalstate,whichitisusingtokeeptrackofthenumberofinterruptsithasreceivedthusfar.Itcouldthenrepeatthisprocessofcontinuallysettingtimerinterruptsandupdatingitslocalstatewhentheinterruptsareactuallyraised.

1.12IstheInternetaLANoraWAN?

Answer:

TheInternetisaWANasthevariouscomputersarelocatedatgeographicallydifferentplacesandareconnectedbylong-distancenetworklinks.

2.1Whatisthepurposeofsystemcalls?

Answer:

Systemcallsallowuser-levelprocessestorequestservicesoftheoperatingsystem.

2.2Whatarethefivemajoractivitiesofanoperatingsysteminregardtoprocessmanagement?

Answer:

a.Thecreationanddeletionofbothuserandsystemprocesses

b.Thesuspensionandresumptionofprocesses

c.Theprovisionofmechanismsforprocesssynchronization

d.Theprovisionofmechanismsforprocesscommunication

e.Theprovisionofmechanismsfordeadlockhandling

2.3Whatarethethreemajoractivitiesofanoperatingsysteminregardtomemorymanagement?

Answer:

a.Keeptrackofwhichpartsofmemoryarecurrentlybeingused

andbywhom.

b.Decidewhichprocessesaretobeloadedintomemorywhenmemory

spacebecomesavailable.

c.Allocateanddeallocatememoryspaceasneeded.

2.4Whatarethethreemajoractivitiesofanoperatingsysteminregardtosecondary-storagemanagement?

Answer:

•Free-spacemanagement.

•Storageallocation.

•Diskscheduling.

2.5Whatisthepurposeofthecommandinterpreter?

Whyisitusuallyseparatefromthekernel?

Answer:

Itreadscommandsfromtheuserorfromafileofcommandsandexecutesthem,usuallybyturningthemintooneormoresystemcalls.Itisusuallynotpartofthekernelsincethecommandinterpreterissubjecttochanges.

2.6Whatsystemcallshavetobeexecutedbyacommandinterpreterorshell

inordertostartanewprocess?

Answer:

InUnixsystems,aforksystemcallfollowedbyanexecsystem

callneedtobeperformedtostartanewprocess.Theforkcallclonesthe

currentlyexecutingprocess,whiletheexeccalloverlaysanewprocess

basedonadifferentexecutableoverthecallingprocess.

2.7Whatisthepurposeofsystemprograms?

Answer:

Systemprogramscanbethoughtofasbundlesofuseful

systemcalls.Theyprovidebasicfunctionalitytouserssothatusersdo

notneedtowritetheirownprogramstosolvecommonproblems.

2.8Whatisthemainadvantageofthelayeredapproachtosystemdesign?

Whatarethedisadvantagesofusingthelayeredapproach?

Answer:

Asinallcasesofmodulardesign,designinganoperating

systeminamodularwayhasseveraladvantages.Thesystemiseasier

todebugandmodifybecausechangesaffectonlylimitedsectionsof

thesystemratherthantouchingallsectionsoftheoperatingsystem.

Informationiskeptonlywhereitisneededandisaccessibleonlywithin

adefinedandrestrictedarea,soanybugsaffectingthatdatamustbe

limitedtoaspecificmoduleorlayer.

2.9Listfiveservicesprovidedbyanoperatingsystem.Explainhoweach

providesconveniencetotheusers.Explainalsoinwhichcasesitwould

beimpossibleforuser-levelprogramstoprovidetheseservi

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 求职职场 > 简历

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1