资源描述:
《现代操作系统 习题答案》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、MODERNOPERATINGSYSTEMSSECONDEDITIONPROBLEMSOLUTIONSANDREWS.TANENBAUMVrijeUniversiteitAmsterdam,TheNetherlandsPRENTICEHALLUPPERSADDLERIVER,NJ07458SOLUTIONSTOCHAPTER1PROBLEMS1.Anoperatingsystemmustprovidetheuserswithanextended(i.e.,virtual)machine,anditmustmanagetheI/Odevicesandothersystemresource
2、s.2.MultiprogrammingistherapidswitchingoftheCPUbetweenmultipleprocessesinmemory.ItiscommonlyusedtokeeptheCPUbusywhileoneormoreprocessesaredoingI/O.3.Inputspoolingisthetechniqueofreadinginjobs,forexample,fromcards,ontothedisk,sothatwhenthecurrentlyexecutingprocessesarefinished,therewillbeworkwait
3、ingfortheCPU.Outputspoolingconsistsoffirstcopyingprintablefilestodiskbeforeprintingthem,ratherthanprintingdirectlyastheoutputisgenerated.Inputspoolingonapersonalcomputerisnotverylikely,butoutputspoolingis.4.TheprimereasonformultiprogrammingistogivetheCPUsomethingtodowhilewaitingforI/Otocomplete.
4、IfthereisnoDMA,theCPUisfullyoccupieddoingI/O,sothereisnothingtobegained(atleastintermsofCPUutilization)bymultiprogramming.NomatterhowmuchI/Oaprogramdoes,theCPUwillbe100percentbusy.Thisofcourseassumesthemajordelayisthewaitwhiledataarecopied.ACPUcoulddootherworkiftheI/Owereslowforotherreasons(arri
5、vingonaserialline,forinstance).5.Secondgenerationcomputersdidnothavethenecessaryhardwaretoprotecttheoperatingsystemfrommalicioususerprograms.6.Itisstillalive.Forexample,IntelmakesPentiumI,II,andIII,and4CPUswithavarietyofdifferentpropertiesincludingspeedandpowerconsumption.Allofthesemachinesarear
6、chitecturallycompatible.Theydifferonlyinpriceandperformance,whichistheessenceofthefamilyidea.7.A25×80charactermonochrometextscreenrequiresa2000-bytebuffer.The1024×768pixel24-bitcolorbitmaprequires2,359,296bytes.In1980thesetwooptionswouldhavecost$10and$11,520,respectively.Forcurrentprices,checkon
7、howmuchRAMcurrentlycosts,probablylessthan$1/MB.8.Choices(a),(c),and(d)shouldberestrictedtokernelmode.9.Personalcomputersystemsarealwaysinteractive,oftenwithonlyasingleuser.Mainframesystemsnearlyalwaysemphasizebatchortimeshar