版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
word格式-可編輯-感謝下載支持solutionstotheexercisesChapter11.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.Listwhatresourcesmustbemanagedcarefullyinthefollowingsettings:a.Mainframeorminicomputersystemsb.Workstationsconnectedtoserversc.HandheldcomputersAnswer:a.Mainframes:memoryandCPUresources,storage,networkbandwidth.b.Workstations:memoryandCPUresoucesc.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.TimesharingAnswer:Forreal-timesystems,theoperatingsystemneedstosupportvirtualmemoryandtimesharinginafairmanner.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.TheCPUisallowedtoexecuteotherprogramswhiletheDMAcontrolleristransferringdata.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.Thisisespeciallyaproblemonmultiprocessorsystemswheremorethanoneprocessmaybeaccessingadatum.Acomponentmaybeeliminatedbyanequal-sizedcache,butonlyif:(a)thecacheandthecomponenthaveequivalentstate-savingcapacity(thatis,ifthecomponentretainsitsdatawhenelectricityisremoved,thecachemustretaindataaswell),and(b)thecacheisaffordable,becausefasterstoragetendstobemoreexpensive.1.14Discuss,withexamples,howtheproblemofmaintainingcoherenceofcacheddatamanifestsitselfinthefollowingprocessingenvironments:a.Single-processorsystemsb.Multiprocessorsystemsc.DistributedsystemsAnswer:Insingle-processorsystems,thememoryneedstobeupdatedwhenaprocessorissuesupdatestocachedvalues.Theseupdatescanbeperformedimmediatelyorinalazymanner.Inamultiprocessorsystem,differentprocessorsmightbecachingthesamememorylocationinitslocalcaches.Whenupdatesaremade,theothercachedlocationsneedtobeinvalidatedorupdated.Indistributedsystems,consistencyofcachedmemoryvaluesisnotanissue.However,consistencyproblemsmightarisewhenaclientcachesfiledata.1.15Describeamechanismforenforcingmemoryprotectioninordertopreventaprogramfrommodifyingthememoryassociatedwithotherprograms.Answer:Theprocessorcouldkeeptrackofwhatlocationsareassociatedwitheachprocessandlimitaccesstolocationsthatareoutsideofaprogram’sextent.Informationregardingtheextentofaprogram’smemorycouldbemaintainedbyusingbaseandlimitsregistersandbyperformingacheckforeverymemoryaccess.1.16Whatnetworkconfigurationwouldbestsuitthefollowingenvironments?a.Adormitoryfloorb.Auniversitycampusc.Astated.AnationAnswer:a.Adormitoryfloor-ALAN.b.Auniversitycampus-ALAN,possibleaWANforverylargecampuses.c.Astate-AWAN.d.Anation-AWAN.1.17Definetheessentialpropertiesofthefollowingtypesofoperatingsystems:a.Batchb.Interactivec.Timesharingd.Realtimee.Networkf.Parallelg.Distributedh.Clusteredi.HandheldAnswer:a.Batch.Jobswithsimilarneedsarebatchedtogetherandrunthroughthecomputerasagroupbyanoperatororautomaticjobsequencer.PerformanceisincreasedbyattemptingtokeepCPUandI/Odevicesbusyatalltimesthroughbuffering,off-lineoperation,spooling,andmultiprogramming.Batchisgoodforexecutinglargejobsthatneedlittleinteraction;itcanbesubmittedandpickeduplater.b.Interactive.Thissystemiscomposedofmanyshorttransactionswheretheresultsofthenexttransactionmaybeunpredictable.Responsetimeneedstobeshort(seconds)sincetheusersubmitsandwaitsfortheresult.c.Timesharing.ThissystemsusesCPUschedulingandmultiprogrammingtoprovideeconomicalinteractiveuseofasystem.TheCPUswitchesrapidlyfromoneusertoanother.Insteadofhavingajobdefinedbyspooledcardimages,eachprogramreadsitsnextcontrolcardfromtheterminal,andoutputisnormallyprintedimmediatelytothescreen.d.Realtime.Oftenusedinadedicatedapplication,thissystemreadsinformationfromsensorsandmustrespondwithinafixedamountoftimetoensurecorrectperformance.e.Network.Providesoperatingsystemfeaturesacrossanetworksuchasfilesharing.f.SMP.UsedinsystemswheretherearemultipleCPU’seachrunningthesamecopyoftheoperatingsystem.Communicationtakesplaceacrossthesystembus.g.Distributed.Thissystemdistributescomputationamongseveralphysicalprocessors.Theprocessorsdonotsharememoryoraclock.Instead,eachprocessorhasitsownlocalmemory.Theycommunicatewitheachotherthroughvariouscommunicationlines,suchasahigh-speedbusorlocalareanetwork.h.Clustered.Aclusteredsystemcombinesmultiplecomputersintoasinglesystemtoperformcomputationaltaskdistributedacrossthecluster.i.Handheld.Asmallcomputersystemthatperformssimpletaskssuchascalendars,email,andwebbrowsing.Handheldsystemsdifferfromtraditionaldesktopsystemswithsmallermemoryanddisplayscreensandslowerprocessors.1.18Whatarethetradeoffsinherentinhandheldcomputers?Answer:HandheldcomputersaremuchsmallerthantraditionaldesktopPC’s.Thisresultsinsmallermemory,smallerscreens,andslowerprocessingcapabilitiesthanastandarddesktopPC.Becauseoftheselimitations,mosthandheldscurrentlycanperformonlybasictaskssuchascalendars,email,andsimplewordprocessing.However,duetotheirsmallsize,theyarequiteportableand,whentheyareequippedwithwirelessaccess,canprovideremoteaccesstoelectronicmailandtheworldwideweb.Chapter22.1Theservicesandfunctionsprovidedbyanoperatingsystemcanbedividedintotwomaincategories.Brieflydescribethetwocategoriesanddiscusshowtheydiffer.Answer:Oneclassofservicesprovidedbyanoperatingsystemistoenforceprotectionbetweendifferentprocessesrunningconcurrentlyinthesystem.Processesareallowedtoaccessonlythosememorylocationsthatareassociatedwiththeiraddressspaces.Also,processesarenotallowedtocorruptfilesassociatedwithotherusers.Aprocessisalsonotallowedtoaccessdevicesdirectlywithoutoperatingsystemntervention.Thesecondclassofservicesprovidedbyanoperatingsystemistoprovidenewfunctionalitythatisnotsupporteddirectlybytheunderlyinghardware.Virtualmemoryandfilesystemsaretwosuchexamplesofnewservicesprovidedbyanoperatingsystem.2.2Listfiveservicesprovidedbyanoperatingsystemthataredesignedtomakeitmoreconvenientforuserstousethecomputersystem.Inwhatcasesitwouldbeimpossibleforuser-levelprogramstoprovidetheseservices?Explain.Answer:?Programexecution.Theoperatingsystemloadsthecontents(orsections)ofafileintomemoryandbeginsitsexecution.Auser-levelprogramcouldnotbetrustedtoproperlyallocateCPUtime.?I/Ooperations.Disks,tapes,seriallines,andotherdevicesmustbecommunicatedwithataverylowlevel.Theuserneedonlyspecifythedeviceandtheoperationtoperformonit,whilethesystemconvertsthatrequestintodevice-orcontroller-specificcommands.User-levelprogramscannotbetrustedtoonlyaccessdevicestheyshouldhaveaccesstoandtoonlyaccessthemwhentheyareotherwiseunused.?File-systemmanipulation.Therearemanydetailsinfilecreation,deletion,allocation,andnamingthatusersshouldnothavetoperform.Blocksofdiskspaceareusedbyfilesandmustbetracked.Deletingafilerequiresremovingthenamefileinformationandfreeingtheallocatedblocks.Protectionsmustalsobecheckedtoassureproperfileaccess.Userprogramscouldneitherensureadherencetoprotectionmethodsnorbetrustedtoallocateonlyfreeblocksanddeallocateblocksonfiledeletion.?Communications.Messagepassingbetweensystemsrequiresmessagesbeturnedintopacketsofinformation,senttothenetworkcontroller,transmittedacrossacommunicationsmedium,andreassembledbythedestinationsystem.Packetorderinganddatacorrectionmusttakeplace.Again,userprogramsmightnotcoordinateaccesstothenetworkdevice,ortheymightreceivepacketsdestinedforotherprocesses.?Errordetection.Errordetectionoccursatboththehardwareandsoftwarelevels.Atthehardwarelevel,alldatatransfersmustbeinspectedtoensurethatdatahavenotbeencorruptedintransit.Alldataonmediamustbecheckedtobesuretheyhavenotchangedsincetheywerewrittentothemedia.Atthesoftwarelevel,mediamustbecheckedfordataconsistency;forinstance,dothenumberofallocatedand
unallocatedblocksofstoragematchthetotalnumberonthedevice.There,errorsarefrequentlyprocess-independent(forinstance,thecorruptionofdataonadisk),sotheremustbeaglobalprogram(theoperatingsystem)thathandlesalltypesoferrors.Also,byhavingerrorsprocessedbytheoperatingsystem,processesneednotcontaincodetocatchandcorrectalltheerrorspossibleonasystem.2.3Describethreegeneralmethodsforpassingparameterstotheoperatingsystem.Answer:a.Passparametersinregistersb.Registerspassstartingaddressesofblocksofparametersc.Parameterscanbeplaced,orpushed,ontothestackbytheprogram,andpoppedoffthestackbytheoperatingsystem.2.4Describehowyoucouldobtainastatisticalprofileoftheamountoftimespentbyaprogramexecutingdifferentsectionsofitscode.Discusstheimportanceofobtainingsuchastatisticalprofile.Answer:Onecouldissueperiodictimerinterruptsandmonitorwhatinstructionsorwhatsectionsofcodearecurrentlyexecutingwhentheinterruptsaredelivered.Astatisticalprofileofwhichpiecesofcodewereactiveshouldbeconsistentwiththetimespentbytheprogramindifferentsectionsofitscode.Oncesuchastatisticalprofilehasbeenobtained,theprogrammercouldoptimizethosesectionsofcodethatareconsumingmoreoftheCPUresources.2.5Whatarethefivemajoractivitiesofanoperatingsysteminregardtofilemanagement?Answer:?Thecreationanddeletionoffiles?Thecreationanddeletionofdirectories?Thesupportofprimitivesformanipulatingfilesanddirectories?Themappingoffilesontosecondarystorage?Thebackupoffilesonstable(nonvolatile)storagemedia2.6Whataretheadvantagesanddisadvantagesofusingthesamesystemcallinterfaceformanipulatingbothfilesanddevices?Answer:Eachdevicecanbeaccessedasthoughitwasafileinthefilesystem.Sincemostofthekerneldealswithdevicesthroughthisfileinterface,itisrelativelyeasytoaddanewdevicedriverbyimplementingthehardware-specificcodetosupportthisabstractfileinterface.Therefore,thisbenefitsthedevelopmentofbothuserprogramcode,whichcanbewrittentoaccessdevicesandfilesinthesamemanner,anddevicedrivercode,whichcanbewrittentosupportawell-definedAPI.ThedisadvantagewithusingthesameinterfaceisthatitmightbedifficulttocapturethefunctionalityofcertaindeviceswithinthecontextofthefileaccessAPI,therebyeitherresultinginalossoffunctionalityoralossofperformance.Someofthiscouldbeovercomebytheuseofioctloperationthatprovidesageneralpurposeinterfaceforprocessestoinvokeoperationsondevices.2.7Whatisthepurposeofthecommandinterpreter?Whyisitusuallyseparatefromthekernel?Woulditbepossiblefortheusertodevelopanewcommandinterpreterusingthesystem-callinterfaceprovidedbytheoperatingsystem?Answer:Itreadscommandsfromtheuserorfromafileofcommandsandexecutesthem,usuallybyturningthemintooneormoresystemcalls.Itisusuallynotpartofthekernelsincethecommandinterpreterissubjecttochanges.Anusershouldbeabletodevelopanewcommandinterpreterusingthesystem-callinterfaceprovidedbytheoperatingsystem.Thecommandinterpreterallowsanusertocreateandmanageprocessesandalsodeterminewaysbywhichtheycommunicate(suchasthroughpipesandfiles).Asallofthisfunctionalitycouldbeaccessedbyanuser-levelprogramusingthesystemcalls,itshouldbepossiblefortheusertodevelopanewcommand-lineinterpreter.2.8Whatarethetwomodelsofinterprocesscommunication?Whatarethestrengthsandweaknessesofthetwoapproaches?Answer:Thetwomodelsofinterprocesscommunicationaremessage-passingmodelandtheshared-memorymodel.2.9Whyistheseparationofmechanismandpolicydesirable?Answer:Mechanismandpolicymustbeseparatetoensurethatsystemsareeasytomodify.Notwosysteminstallationsarethesame,soeachinstallationmaywanttotunetheoperatingsystemtosuititsneeds.Withmechanismandpolicyseparate,thepolicymaybechangedatwillwhilethemechanismstaysunchanged.Thisarrangementprovidesamoreflexiblesystem.2.10WhydoesJavaprovidetheabilitytocallfromaJavaprogramnativemethodsthatarewrittenin,say,CorC++?Provideanexampleofasituationinwhichanativemethodisuseful.Answer:JavaprogramsareintendedtobeplatformI/Oindependent.Therefore,thelanguagedoesnotprovideaccesstomostspecificsystemresourcessuchasreadingfromI/Odevicesorports.ToperformasystemI/Ospecificoperation,youmustwriteitinalanguagethatsupportssuchfeatures(suchasCorC++.)KeepinmindthataJavaprogramthatcallsanativemethodwritteninanotherlanguagewillnolongerbearchitecture-neutral.2.11Itissometimesdifficulttoachievealayeredapproachiftwocomponentsoftheoperatingsystemaredependentoneachother.Identifyascenarioinwhichitisunclearhowtolayertwosystemcomponentsthatrequiretightcouplingoftheirfunctionalities.Answer:Thevirtualmemorysubsystemandthestoragesubsystemaretypicallytightly-coupledandrequirescarefuldesigninalayeredsystemduetothefollowinginteractions.Manysystemsallowfilestobemappedintothevirtualmemoryspaceofanexecutingprocess.Ontheotherhand,thevirtualmemorysubsystemtypicallyusesthestoragesystemtoprovidethebackingstoreforpagesthatdonotcurrentlyresideinmemory.Also,updatestothefilesystemaresometimesbufferedinphysicalmemorybeforeitisflushedtodisk,therebyrequiringcarefulcoordinationoftheusageofmemorybetweenthevirtualmemorysubsystemandthefilesystem.2.12Whatisthemainadvantageofthemicrokernelapproachtosystemdesign?Howdouserprogramsandsystemservicesinteractinamicrokernelarchitecture?Whatarethedisadvantagesofusingthemicrokernelapproach?Answer:Benefitstypicallyincludethefollowing(a)addinganewservicedoesnotrequiremodifyingthekernel,(b)itismoresecureasmoreoperationsaredoneinusermodethaninkernelmode,and(c)asimplerkerneldesignandfunctionalitytypicallyresultsinamorereliableoperatingsystem.Userprogramsandsystemservicesinteractinamicrokernelarchitecturebyusinginterprocesscommunicationmechanismssuchasmessaging.Thesemessagesareconveyedbytheoperatingsystem.Theprimarydisadvantageofthemicrokernelarchitecturearetheoverheadsassociatedwithinterprocesscommunicationandthefrequentuseoftheoperatingsystem’smessagingfunctionsinordertoenabletheuserprocessandthesystemservicetointeractwitheachother.2.13Inwhatwaysisthemodularkernelapproachsimilartothelayeredapproach?Inwhatwaysdoesitdifferfromthelayeredapproach?Answer:Themodularkernelapproachrequiressubsystemstointeractwitheachotherthroughcarefullyconstructedinterfacesthataretypicallynarrow(intermsofthefunctionalitythatisexposedtoexternalmodules).Thelayeredkernelapproachissimilarinthatrespect.However,thelayeredkernelimposesastrictorderingofsubsystemssuchthatsubsystemsatthelowerlayersarenotallowedtoinvokeoperationscorrespondingtotheupper-layersubsystems.Therearenosuchrestrictionsinthemodular-kernelapproach,whereinmodulesarefreetoinvokeeachotherwithoutanyconstraints.2.14Whatisthemainadvantageforanoperating-systemdesignerofusingavirtual-machinearchitecture?Whatisthemainadvantageforauser?Answer:Thesystemiseasytodebug,andsecurityproblemsareeasytosolve.Virtualmachinesalsoprovideagoodplatformforoperatingsystemresearchsincemanydifferentoperatingsystemsmayrunononephysicalsystem.2.15Whyisajust-in-timecompilerusefulforexecutingJavaprograms?Answer:Javaisaninterpretedlanguage.ThismeansthattheJVMinterpretsthebytecodeinstructionsoneatatime.Typically,mostinterpretedenvironmentsareslowerthanrunningnativebinaries,fortheinterpretationprocessrequiresconvertingeachinstructionintonativemachinecode.Ajust-in-time(JIT)compilercompilesthebytecodeforamethodintonativemachinecodethefirsttimethemethodisencountered.ThismeansthattheJavaprogramisessentiallyrunningasanativeapplication(ofcourse,theconversionprocessoftheJITtakestimeaswellbutnotasmuchasbytecodeinterpretation.)Furthermore,theJITcachescompiledcodesothatitmaybereusedthenexttimethemethodisencountered.AJavaprogramthatisrunbyaJITratherthanatraditionalinterpretertypicallyrunsmuchfaster.2.16WhatistherelationshipbetweenaguestoperatingsystemandahostoperatingsysteminasystemlikeVMware?Whatfactorsneedtobeconsideredinchoosingthehostoperatingsystem?Answer:Aguestoperatingsystemprovidesitsservicesbymappingthemontothefunctionalityprovidedbythehostoperatingsystem.Akeyissuethatneedstobeconsideredinchoosingthehostoperatingsystemiswhetheritissufficientlygeneralintermsofitssystem-callinterfaceinordertobeabletosupportthefunctionalityassociatedwiththeguestoperatingsystem.2.17TheexperimentalSynthesis
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 長寧個人廠房出租合同范本
- 《核電工程綠色施工評價規(guī)程》
- 管線探測合同范本
- 潤滑設備合同范本
- 教師工作匯報
- 買賣股票合同范本
- 糖尿病圍術期營養(yǎng)
- 2024年秋初中科學九年級下冊同步課件(浙教版)2.4.2 生態(tài)系統(tǒng)的結構和功能
- 書寫承攬合同范本
- 醫(yī)療設備買賣合同范本
- 人教部編版六年級語文上冊郝曉怡《盼》名師教學課件
- 2023年5月軟考中級系統(tǒng)集成項目管理工程師下午真題
- 人教版三年級語文上冊第三、四單元試卷(含答案)
- 歷史丨四川省南充市高2025屆高考適應性考試(南充一診)高三10月聯(lián)考歷史試卷及答案
- 農(nóng)村污水管網(wǎng)建設合同范本
- 五年級上冊解方程練習100題及答案
- 2024年中科院心理咨詢師官方備考試題庫-上(單選題)
- 設計變更控制程序
- 三年級硬筆書法課件
- 2024全球量子產(chǎn)業(yè)發(fā)展報告
- 滬科版(2024)八年級全一冊物理第一學期期末學業(yè)質(zhì)量測試卷 2套(含答案)
評論
0/150
提交評論