操作系统概念第七版答案Word格式.docx

上传人:b****5 文档编号:20443065 上传时间:2023-01-23 格式:DOCX 页数:14 大小:29.17KB
下载 相关 举报
操作系统概念第七版答案Word格式.docx_第1页
第1页 / 共14页
操作系统概念第七版答案Word格式.docx_第2页
第2页 / 共14页
操作系统概念第七版答案Word格式.docx_第3页
第3页 / 共14页
操作系统概念第七版答案Word格式.docx_第4页
第4页 / 共14页
操作系统概念第七版答案Word格式.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

操作系统概念第七版答案Word格式.docx

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

操作系统概念第七版答案Word格式.docx

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

a.mainframes:

memoryandcpuresources,storage,networkbandwidth.

b.workstations:

memoryandcpuresouces

c.handheldcomputers:

powerconsumption,memoryresources.

1.3underwhatcircumstanceswouldauserbebetteroffusingatimesharingsystemratherthanapcorsingle-userworkstation?

whentherearefewotherusers,thetaskislarge,andthehardwareisfast,time-sharingmakessense.thefullpowerofthesystemcanbebroughttobearontheuser’sproblem.theproblemcanbesolvedfasterthanonapersonalcomputer.anothercaseoccurswhenlotsofotherusersneedresourcesatthesametime.

apersonalcomputerisbestwhenthejobissmallenoughtobeexecutedreasonablyonitandwhenperformanceissufficienttoexecutetheprogramtotheuser’ssatisfaction.

1.4whichofthefunctionalitieslistedbelowneedtobesupportedbytheoperatingsystemforthefollowingtwosettings:

(a)handhelddevicesand(b)real-timesystems.a.batchprogrammingb.virtualmemoryc.timesharing

forreal-timesystems,theoperatingsystemneedstosupportvirtualmemory

andtimesharinginafairmanner.forhandheldsystems,theoperatingsystemneedstoprovidevirtualmemory,butdoesnotneedtoprovidetime-sharing.batchprogrammingisnotnecessaryinbothsettings.

1.5describethedifferencesbetweensymmetricandasymmetricmultiprocessing.whatarethreeadvantagesandonedisadvantageofmultiprocessorsystems?

symmetricmultiprocessingtreatsallprocessorsasequals,andi/ocanbeprocessedonanycpu.asymmetricmultiprocessinghasonemastercpuandtheremaindercpusareslaves.themasterdistributestasksamongtheslaves,andi/oisusuallydonebythemasteronly.

multiprocessorscansavemoneybynotduplicatingpowersupplies,housings,andperipherals.theycanexecuteprogramsmorequicklyandcanhaveincreasedreliability.theyarealsomorecomplexinbothhardwareandsoftwarethanuniprocessorsystems.

1.6howdoclusteredsystemsdifferfrommultiprocessorsystems?

whatisrequiredfortwomachinesbelongingtoaclustertocooperatetoprovideahighlyavailableservice?

clusteredsystemsaretypicallyconstructedbycombiningmultiplecomputersintoasinglesystemtoperformacomputationaltaskdistributedacrossthecluster.multiprocessorsystemsontheotherhandcouldbeasinglephysicalentitycomprisingofmultiplecpus.aclusteredsystemislesstightlycoupledthanamultiprocessorsystem.clusteredsystemscommunicateusingmessages,whileprocessorsinamultiprocessorsystemcouldcommunicateusingsharedmemory.

inorderfortwomachinestoprovideahighlyavailableservice,thestateonthetwomachinesshouldbereplicatedandshouldbeconsistentlyupdated.whenoneofthemachinesfail,theothercouldthentake-overthefunctionalityofthefailedmachine.

1.7distinguishbetweentheclient-serverandpeer-to-peermodelsofdistributedsystems.

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.

considerthefollowingtwoalternatives:

asymmetricclusteringandparallelclustering.withasymmetricclustering,onehostrunsthedatabaseapplicationwiththeotherhostsimplymonitoringit.iftheserverfails,themonitoringhostbecomestheactiveserver.thisisappropriateforprovidingredundancy.however,itdoesnotutilizethepotentialprocessingpowerofbothhosts.withparallelclustering,thedatabaseapplicationcanruninparallelonbothhosts.thedifficultyimplementingparallelclustersisprovidingsomeformofdistributedlockingmechanismforfilesontheshareddisk.

1.9howarenetworkcomputersdifferentfromtraditionalpersonalcomputers?

describesomeusagescenariosinwhichitisadvantageoustousenetworkcomputers.

anetworkcomputerreliesonacentralizedcomputerformostofitsservices.itcanthereforehaveaminimaloperatingsystemtomanageitsresources.apersonalcomputerontheotherhandhastobecapableofprovidingalloftherequiredfunctionalityinastandalonemannerwithoutrelyingonacentralizedmanner.scenarioswhereadministrativecostsarehighandwheresharingleadstomoreefficientuseofresourcesarepreciselythosesettingswherenetworkcomputersarepreferred.

1.10whatisthepurposeofinterrupts?

whatarethedifferencesbetweenatrapandaninterrupt?

cantrapsbegeneratedintentionallybyauserprogram?

ifso,forwhatpurpose?

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.

thecpucaninitiateadmaoperationbywritingvaluesintospecialregistersthatcanbeindependentlyaccessedbythedevice.thedeviceinitiatesthecorrespondingoperationonceitreceivesacommandfromthecpu.whenthedeviceisfinishedwithitsoperation,itinterruptsthecputoindicatethecompletionoftheoperation.

boththedeviceandthecpucanbeaccessingmemorysimultaneously.thememorycontrollerprovidesaccesstothememorybusinafairmannertothesetwoentities.

acpumightthereforebeunabletoissuememoryoperationsatpeakspeedssinceithastocompetewiththedeviceinordertoobtainaccesstothememorybus.

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?

cachesareusefulwhentwoormorecomponentsneedtoexchangedata,andthecomponentsperformtransfersatdifferingspeeds.cachessolvethetransferproblembyprovidingabufferofintermediatespeedbetweenthecomponents.ifthefastdevicefindsthedataitneedsinthecache,itneednotwaitfortheslowerdevice.thedatainthecachemustbekeptconsistentwiththedatainthecomponents.ifaomponenthasadatavaluechange,andthedatumisalsointhecache,thecachemustalsobeupdated.thisisespeciallyaproblemonmultiprocessorsystemswheremorethanoneprocessmaybeaccessingadatum.acomponentmaybeeliminatedbyanequal-sizedcache,butonlyif:

(a)thecacheandthecomponenthaveequivalentstate-savingcapacity(thatis,ifthecomponentretainsitsdatawhenelect

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

当前位置:首页 > 总结汇报 > 其它

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

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