操作系统概念课后答案.docx
- 文档编号:10319278
- 上传时间:2023-02-10
- 格式:DOCX
- 页数:18
- 大小:27.58KB
操作系统概念课后答案.docx
《操作系统概念课后答案.docx》由会员分享,可在线阅读,更多相关《操作系统概念课后答案.docx(18页珍藏版)》请在冰豆网上搜索。
操作系统概念课后答案
操作系统概念课后答案
【篇一:
操作系统概念第七版答案(含编程代码)】
>chapter1
1.1inamultiprogrammingandtime-sharingenvironment,severaluserssharethesystemsimultaneously.thissituationcanresultinvarioussecurityproblems.a.whataretwosuchproblems?
b.canweensurethesamedegreeofsecurityinatime-sharedmachineasinadedicatedmachine?
explainyouranswer.
answer:
a.stealingorcopyingone’sprogramsordata;usingsystemresources(cpu,memory,diskspace,peripherals)withoutproperaccounting.
b.probablynot,sinceanyprotectionschemedevisedbyhumanscaninevitablybebrokenbyahuman,andthemorecomplexthescheme,themoredifficultitistofeelconfidentofitscorrectimplementation.
1.2theissueofresourceutilizationshowsupindifferentformsindifferenttypesofoperatingsystems.listwhatresourcesmustbemanaged
carefullyinthefollowingsettings:
a.mainframeorminicomputersystemsb.workstationsconnectedtoserversc.handheldcomputers
answer:
a.mainframes:
memoryandcpuresources,storage,networkbandwidth.
b.workstations:
memoryandcpuresouces
c.handheldcomputers:
powerconsumption,memoryresources.
1.3underwhatcircumstanceswouldauserbebetteroffusingatimesharingsystemratherthanapcorsingle-userworkstation?
answer:
whentherearefewotherusers,thetaskislarge,andthehardwareisfast,time-sharingmakessense.thefullpowerofthesystemcanbebroughttobearontheuser’sproblem.theproblemcanbesolvedfasterthanonapersonalcomputer.anothercaseoccurswhenlotsofotherusersneedresourcesatthesametime.
apersonalcomputerisbestwhenthejobissmallenoughtobeexecutedreasonablyonitandwhenperformanceissufficienttoexecutetheprogramtotheuser’ssatisfaction.
1.4whichofthefunctionalitieslistedbelowneedtobesupportedbytheoperatingsystemforthefollowingtwosettings:
(a)handhelddevicesand(b)real-timesystems.a.batchprogrammingb.virtualmemoryc.timesharing
answer:
forreal-timesystems,theoperatingsystemneedstosupportvirtualmemory
andtimesharinginafairmanner.forhandheldsystems,theoperatingsystemneedstoprovidevirtualmemory,butdoesnotneedtoprovidetime-sharing.batchprogrammingisnotnecessaryinbothsettings.
1.5describethedifferencesbetweensymmetricandasymmetricmultiprocessing.whatarethreeadvantagesandonedisadvantageofmultiprocessorsystems?
answer:
symmetricmultiprocessingtreatsallprocessorsasequals,andi/ocanbeprocessedonanycpu.asymmetricmultiprocessinghasonemastercpuandtheremaindercpusareslaves.themasterdistributestasksamongtheslaves,andi/oisusuallydonebythemasteronly.
multiprocessorscansavemoneybynotduplicatingpowersupplies,housings,andperipherals.theycanexecuteprogramsmorequicklyandcanhaveincreasedreliability.theyarealsomorecomplexinbothhardwareandsoftwarethanuniprocessorsystems.
1.6howdoclusteredsystemsdifferfrommultiprocessorsystems?
whatisrequiredfortwomachinesbelongingtoaclustertocooperatetoprovideahighlyavailableservice?
answer:
clusteredsystemsaretypicallyconstructedbycombiningmultiplecomputersintoasinglesystemtoperformacomputationaltaskdistributedacrossthecluster.multiprocessorsystemsontheotherhandcouldbeasinglephysicalentitycomprisingofmultiplecpus.aclusteredsystemislesstightlycoupledthanamultiprocessorsystem.clusteredsystemscommunicateusingmessages,whileprocessorsinamultiprocessorsystemcouldcommunicateusingsharedmemory.
inorderfortwomachinestoprovideahighlyavailableservice,thestateonthetwomachinesshouldbereplicatedandshouldbeconsistentlyupdated.whenoneofthemachinesfail,theothercouldthentake-overthefunctionalityofthefailedmachine.
1.7distinguishbetweentheclient-serverandpeer-to-peermodelsofdistributedsystems.
answer:
theclient-servermodelfirmlydistinguishestherolesoftheclientandserver.underthismodel,theclientrequestsservicesthatareprovidedbytheserver.thepeer-to-peermodeldoesn’thavesuchstrictroles.infact,allnodesinthesystemareconsideredpeersandthusmayactaseitherclientsorservers-orboth.anodemayrequestaservicefromanotherpeer,orthenodemayinfactprovidesuchaservicetootherpeersinthesystem.
forexample,let’sconsiderasystemofnodesthatsharecookingrecipes.undertheclient-servermodel,allrecipesarestoredwiththeserver.ifaclientwishestoaccessarecipe,itmustrequesttherecipefromthespecifiedserver.usingthepeer-to-peermodel,apeernodecouldaskotherpeernodesforthespecifiedrecipe.
thenode(orperhapsnodes)withtherequestedrecipecouldprovideittotherequestingnode.noticehoweachpeermayactasbothaclient(i.e.itmayrequestrecipes)andasaserver(itmayproviderecipes.)
1.8consideracomputingclusterconsistingoftwonodesrunningadatabase.describetwowaysinwhichtheclustersoftwarecanmanageaccesstothedataonthedisk.discussthebenefitsanddisadvantagesofeach.
answer:
considerthefollowingtwoalternatives:
asymmetricclusteringandparallelclustering.withasymmetricclustering,onehostrunsthedatabaseapplicationwiththeotherhostsimplymonitoringit.iftheserverfails,themonitoringhostbecomestheactiveserver.thisisappropriateforprovidingredundancy.however,itdoesnotutilizethepotentialprocessingpowerofbothhosts.withparallelclustering,thedatabaseapplicationcanruninparallelonbothhosts.thedifficultyimplementingparallelclustersisprovidingsomeformofdistributedlockingmechanismforfilesontheshareddisk.
1.9howarenetworkcomputersdifferentfromtraditionalpersonalcomputers?
describesomeusagescenariosinwhichitisadvantageoustousenetworkcomputers.
answer:
anetworkcomputerreliesonacentralizedcomputerformostofitsservices.itcanthereforehaveaminimaloperatingsystemtomanageitsresources.apersonalcomputerontheotherhandhastobecapableofprovidingalloftherequiredfunctionalityinastandalonemannerwithoutrelyingonacentralizedmanner.scenarioswhereadministrativecostsarehighandwheresharingleadstomoreefficientuseofresourcesarepreciselythosesettingswherenetworkcomputersarepreferred.
1.10whatisthepurposeofinterrupts?
whatarethedifferencesbetweenatrapandaninterrupt?
cantrapsbegeneratedintentionallybyauserprogram?
ifso,forwhatpurpose?
answer:
aninterruptisahardware-generatedchange-of-flowwithinthesystem.aninterrupthandlerissummonedtodealwiththecauseoftheinterrupt;controlisthenreturnedtotheinterruptedcontextandinstruction.atrapisasoftware-generatedinterrupt.aninterruptcanbeusedtosignalthecompletionofani/otoobviatetheneedfordevicepolling.atrapcanbeusedtocalloperatingsystemroutinesortocatcharithmeticerrors.
1.11directmemoryaccessisusedforhigh-speedi/odevicesinordertoavoidincreasingthecpu′sexecutionload.
a.howdoesthecpuinterfacewiththedevicetocoordinatethetransfer?
b.howdoesthecpuknowwhenthememoryoperationsarecomplete?
c.thecpuisallowedtoexecuteotherprogramswhilethedmacontrolleris
transferringdata.doesthisprocessinterferewiththeexecutionoftheuserprograms?
ifso,describewhatformsofinterferencearecaused.
answer:
thecpucaninitiateadmaoperationbywritingvaluesintospecialregistersthatcanbeindependentlyaccessedbythedevice.thedeviceinitiatesthecorrespondingoperationonceitreceivesacommandfromthecpu.whenthedeviceisfinishedwithitsoperation,itinterruptsthecputoindicatethecompletionoftheoperation.
boththedeviceandthecpucanbeaccessingmemorysimultaneously.thememorycontrollerprovidesaccesstothememorybusinafairmannertothesetwoentities.
acpumightthereforebeunabletoissuememoryoperationsatpeakspeedssinceithastocompetewiththedeviceinordertoobtainaccesstothememorybus.
1.12somecomputersystemsdonotprovideaprivilegedmodeofoperationinhardware.isitpossibletoconstructasecureoperatingsystemforthesecomputersystems?
giveargumentsboththatitisandthatitisnotpossible.
answer:
anoperatingsystemforamachineofthistypewouldneedtoremainincontrol(ormonitormode)atalltimes.thiscouldbeaccomplishedbytwomethods:
a.softwareinterpretationofalluserprograms(likesomebasic,java,andlispsystems,forexample).thesoftwareinterpreterwouldprovide,insoftware,whatthehardwaredoesnotprovide.
b.requiremeantthatallprogramsbewritteninhigh-levellanguagessothatallobjectcodeiscompiler-produced.thecompilerwouldgenerate(eitherin-lineorbyfunctioncalls)theprotectionchecksthatthehardwareismissing.
1.13givetworeasonswhycachesareuseful.whatproblemsdotheysolve?
whatproblemsdotheycause?
ifacachecanbemadeaslargeasthedeviceforwhichitiscaching(forinstance,acacheaslargeasadisk),whynotmakeitthatlargeandeliminatethedevice?
answer:
cachesareusefulwhentwoormorecomponentsneedtoexchangedata,andthecomponentsperformtransfersatdifferingspeeds.cachessolvethetransferproblembyprovidingabufferofintermediatespeedbetweenthecomponents.ifthefastdevicefindsthedataitneedsinthecache,itneednotwaitfortheslowerdevice.thedatainthecachemustbekeptconsistentwiththedatainthecomponents.ifaomponenthasadatavaluechange,andthedatumisalsointhecache,thecachemustalsobeupdated.thisisespeciallyaproblemonmultiprocessorsystemswheremorethan
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 操作系统 概念 课后 答案