资源描述:
《现代操作系统(第三版)答案.pdf》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、MODERNOPERATINGSYSTEMSTHIRDEDITIONPROBLEMSOLUTIONSANDREWS.TANENBAUMVrijeUniversiteitAmsterdam,TheNetherlandsPRENTICEHALLUPPERSADDLERIVER,NJ07458CopyrightPearsonEducation,Inc.2008SOLUTIONSTOCHAPTER1PROBLEMS1.MultiprogrammingistherapidswitchingoftheCPUbe
2、tweenmultipleproc-essesinmemory.ItiscommonlyusedtokeeptheCPUbusywhileoneormoreprocessesaredoingI/O.2.Inputspoolingisthetechniqueofreadinginjobs,forexample,fromcards,ontothedisk,sothatwhenthecurrentlyexecutingprocessesarefinished,therewillbeworkwaitingfo
3、rtheCPU.Outputspoolingconsistsoffirstcopyingprintablefilestodiskbeforeprintingthem,ratherthanprintingdi-rectlyastheoutputisgenerated.Inputspoolingonapersonalcomputerisnotverylikely,butoutputspoolingis.3.TheprimereasonformultiprogrammingistogivetheCPUsome
4、thingtodowhilewaitingforI/Otocomplete.IfthereisnoDMA,theCPUisfullyoccu-pieddoingI/O,sothereisnothingtobegained(atleastintermsofCPUutili-zation)bymultiprogramming.NomatterhowmuchI/Oaprogramdoes,theCPUwillbe100%busy.Thisofcourseassumesthemajordelayisthew
5、aitwhiledataarecopied.ACPUcoulddootherworkiftheI/Owereslowforotherreasons(arrivingonaserialline,forinstance).4.Itisstillalive.Forexample,IntelmakesPentiumI,II,andIII,and4CPUswithavarietyofdifferentpropertiesincludingspeedandpowerconsumption.Allofthesem
6、achinesarearchitecturallycompatible.Theydifferonlyinpriceandperformance,whichistheessenceofthefamilyidea.5.A25×80charactermonochrometextscreenrequiresa2000-bytebuffer.The1024×768pixel24-bitcolorbitmaprequires2,359,296bytes.In1980thesetwooptionswouldhav
7、ecost$10and$11,520,respectively.Forcurrentprices,checkonhowmuchRAMcurrentlycosts,probablylessthan$1/MB.6.Considerfairnessandrealtime.Fairnessrequiresthateachprocessbeallo-cateditsresourcesinafairway,withnoprocessgettingmorethanitsfairshare.Ontheotherha
8、nd,realtimerequiresthatresourcesbeallocatedbasedonthetimeswhendifferentprocessesmustcompletetheirexecution.Areal-timeprocessmaygetadisproportionateshareoftheresources.7.Choices(a),(c),and(d)shouldberestrictedtokernelmode.8.Itmaytake20,2