资源描述:
《modern_operation_system_answers》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、MODERNOPERATINGSYSTEMSSECONDEDITIONPROBLEMSOLUTIONSANDREWS.TANENBAUMVrijeUniversiteitAmsterdam,TheNetherlandsPRENTICEHALLUPPERSADDLERIVER,NJ07458SOLUTIONSTOCHAPTER1PROBLEMS1.Anoperatingsystemmustprovidetheuserswithanextended(i.e.,virtual)machine,anditmustmanagetheI/Odevicesandothersystemresource
2、s.2.MultiprogrammingistherapidswitchingoftheCPUbetweenmultipleprocessesinmemory.ItiscommonlyusedtokeeptheCPUbusywhileoneormoreprocessesaredoingI/O.3.Inputspoolingisthetechniqueofreadinginjobs,forexample,fromcards,ontothedisk,sothatwhenthecurrentlyexecutingprocessesarefinished,therewillbeworkwaiti
3、ngfortheCPU.Outputspoolingconsistsoffirstcopyingprintablefilestodiskbeforeprintingthem,ratherthanprintingdirectlyastheoutputisgenerated.Inputspoolingonapersonalcomputerisnotverylikely,butoutputspoolingis.4.TheprimereasonformultiprogrammingistogivetheCPUsomethingtodowhilewaitingforI/Otocomplete.Ift
4、hereisnoDMA,theCPUisfullyoccu-pieddoingI/O,sothereisnothingtobegained(atleastintermsofCPUutili-zation)bymultiprogramming.NomatterhowmuchI/Oaprogramdoes,theCPUwillbe100percentbusy.Thisofcourseassumesthemajordelayisthewaitwhiledataarecopied.ACPUcoulddootherworkiftheI/Owereslowforotherreasons(arriv
5、ingonaserialline,forinstance).5.Secondgenerationcomputersdidnothavethenecessaryhardwaretoprotecttheoperatingsystemfrommalicioususerprograms.6.Itisstillalive.Forexample,IntelmakesPentiumI,II,andIII,and4CPUswithavarietyofdifferentpropertiesincludingspeedandpowerconsumption.Allofthesemachinesarearc
6、hitecturallycompatible.Theydifferonlyinpriceandperformance,whichistheessenceofthefamilyidea.7.A25´80charactermonochrometextscreenrequiresa2000-bytebuffer.The1024´768pixel24-bitcolorbitmaprequires2,359,296bytes.In1980thesetwooptionswouldhavecost$10and$11,520,respectively.Forcurrentprices,checkonh
7、owmuchRAMcurrentlycosts,probablylessthan$1/MB.8.Choices(a),(c),and(d)shouldberestrictedtokernelmode.9.Personalcomputersystemsarealwaysinteractive,oftenwithonlyasingleuser.Mainframesystemsnearlyalwaysemphasizebatchortimeshari