操作系统概念课后答案.docx

上传人:b****7 文档编号:10319278 上传时间:2023-02-10 格式:DOCX 页数:18 大小:27.58KB
下载 相关 举报
操作系统概念课后答案.docx_第1页
第1页 / 共18页
操作系统概念课后答案.docx_第2页
第2页 / 共18页
操作系统概念课后答案.docx_第3页
第3页 / 共18页
操作系统概念课后答案.docx_第4页
第4页 / 共18页
操作系统概念课后答案.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

操作系统概念课后答案.docx

《操作系统概念课后答案.docx》由会员分享,可在线阅读,更多相关《操作系统概念课后答案.docx(18页珍藏版)》请在冰豆网上搜索。

操作系统概念课后答案.docx

操作系统概念课后答案

操作系统概念课后答案

【篇一:

操作系统概念第七版答案(含编程代码)】

>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模板 > 动物植物

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

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