完整word版操作系统概念第六版重点部分中文答案word文档良心出品.docx
《完整word版操作系统概念第六版重点部分中文答案word文档良心出品.docx》由会员分享,可在线阅读,更多相关《完整word版操作系统概念第六版重点部分中文答案word文档良心出品.docx(26页珍藏版)》请在冰豆网上搜索。
完整word版操作系统概念第六版重点部分中文答案word文档良心出品
1.1Whatarethethreemainpurposesofanoperatingsystem?
1Toprovideanenvironmentforacomputerusertoexecuteprogramsoncomputer
hardwareinaconvenientandefficientmanner.
2Toallocatetheseparateresourcesofthecomputerasneededtosolvetheproblem
given.Theallocationprocessshouldbeasfairandefficientaspossible.
3Asacontrolprogramitservestwomajorfunctions:
(1)supervisionoftheexecutionof
userprogramstopreventerrorsandimproperuseofthecomputer,and
(2)manage-
mentoftheoperationandcontrolofI/Odevices.
环境提供者,为计算机用户提供一个环境,使得能够在计算机硬件上方便、高效的执行程序
资源分配者,为解决问题按需分配计算机的资源,资源分配需尽可能公平、高效
控制程序
监控用户程序的执行,防止出错和对计算机的不正当使用
管理I/O设备的运行和控制
1.2Listthefourstepsthatarenecessarytorunaprogramonacompletelydedicatedmachine.
Answer:
Generally,operatingsystemsforbatchsystemshavesimplerrequirementsthanforpersonalcomputers.Batchsystemsdonothavetobeconcernedwithinteractingwithauserasmuchasapersonalcomputer.Asaresult,anoperatingsystemforaPCmustbeconcernedwithresponsetimeforaninteractiveuser.Batchsystemsdonothavesuchrequirements.Apurebatchsystemalsomayhavenottohandletimesharing,whereasanoperatingsystemmustswitchrapidlybetweendifferentjobs.
木有找到中文答案
1.6Definetheessentialpropertiesofthefollowingtypesofoperatingsystems:
a.Batch
b.Interactive
c.Timesharing
d.Realtime
e.Network
f.Distributed
a.Batch.Jobswithsimilarneedsarebatchedtogetherandrunthroughthecomputer
asagroupbyanoperatororautomaticjobsequencer.Performanceisincreasedby
attemptingtokeepCPUandI/Odevicesbusyatalltimesthroughbuffering,off-line
operation,spooling,andmultiprogramming.Batchisgoodforexecutinglargejobs
thatneedlittleinteraction;itcanbesubmittedandpickeduplater.
b.Interactive.Thissystemiscomposedofmanyshorttransactionswheretheresultsof
thenexttransactionmaybeunpredictable.Responsetimeneedstobeshort(seconds)
sincetheusersubmitsandwaitsfortheresult.
c.Timesharing.ThissystemsusesCPUschedulingandmultiprogrammingtoprovide
economicalinteractiveuseofasystem.TheCPUswitchesrapidlyfromoneuserto
another.Insteadofhavingajobdefinedbyspooledcardimages,eachprogramreadsitsnextcontrolcardfromtheterminal,andoutputisnormallyprintedimmediately
tothescreen.
d.Realtime.Oftenusedinadedicatedapplication,thissystemreadsinformationfrom
sensorsandmustrespondwithinafixedamountoftimetoensurecorrectperfor-
mance.
e.Network.
f.Distributed.Thissystemdistributescomputationamongseveralphysicalprocessors.
Theprocessorsdonotsharememoryoraclock.Instead,eachprocessorhasitsown
localmemory.Theycommunicatewitheachotherthroughvariouscommunication
lines,suchasahigh-speedbusortelephoneline.
a.Batch
相似需求的Job分批、成组的在计算机上执行,Job由操作员或自动Job程序装置装载;
可以通过采用buffering,off-lineoperation,spooling,multiprogramming等技术使CPU和I/O不停忙来提高性能
批处理适合于需要极少用户交互的Job。
b.Interactive
由许多短交易组成,下一次交易的结果可能不可预知
需要响应时间短
c.Timesharing
使用CPU调度和多道程序提供对系统的经济交互式使用,CPU快速地在用户之间切换
一般从终端读取控制,输出立即打印到屏幕
d.Realtime
在专门系统中使用,从传感器读取信息,必须在规定时间内作出响应以确保正确的执行
e.Network
在通用OS上添加
联网、通信功能
远程过程调用
文件共享
f.Distributed
具有联网、通信功能
提供远程过程调用
提供多处理机的统一调度调度
统一的存储管理
分布式文件系统
1.7Wehavestressedtheneedforanoperatingsystemtomakeefficientuseofthecomputing
hardware.Whenisitappropriatefortheoperatingsystemtoforsakethisprincipleandto“waste”resources?
Whyissuchasystemnotreallywasteful?
Wehavestressedtheneedforanoperatingsystemtomakeefficientuseofthecomputing
hardware.Whenisitappropriatefortheoperatingsystemtoforsakethisprincipleandto“waste”resources?
Whyissuchasystemnotreallywasteful?
Answer:
Single-usersystemsshouldmaximizeuseofthesystemfortheuser.AGUI
might“waste”CPUcycles,butitoptimizestheuser’sinteractionwiththesystem.
木有中文答案
2.2Howdoesthedistinctionbetweenmonitormodeandusermodefunctionasarudimentary
formofprotection(security)system?
Answer:
Byestablishingasetofprivilegedinstructionsthatcanbeexecutedonlywhen
inthemonitormode,theoperatingsystemisassuredofcontrollingtheentiresystematallTimes.
通过建立一组只能在monitormode才能执行的特权指令集,OS能够确保总是能控制整个系统。
2.3Whatarethedifferencesbetweenatrapandaninterrupt?
Whatistheuseofeachfunction?
Answer:
Aninterruptisahardware-generatedchange-of-flowwithinthesystem.An
interrupthandlerissummonedtodealwiththecauseoftheinterrupt;controlisthenre-turnedtotheinterruptedcontextandinstruction.Atrapisasoftware-generatedinterrupt
AninterruptcanbeusedtosignalthecompletionofanI/Otoobviatetheneedfordevice
polling.Atrapcanbeusedtocalloperatingsystemroutinesortocatcharithmeticerrors.
Aninterrupt是硬件产生的系统内的流的改变
Atrap是软件产生的“中断”。
interrupt可以被I/O用来产生完成的信号,从而避免CPU对设备的轮询
Atrap可以用来调用OS的例程或者捕获算术错误
2.5Whichofthefollowinginstructionsshouldbeprivileged?
a.Setvalueoftimer.
b.Readtheclock.
c.Clearmemory.
d.Turnoffinterrupts.
e.Switchfromusertomonitormode.
Answer:
Thefollowinginstructionsshouldbeprivileged:
a.Setvalueoftimer.
b.Clearmemory.
c.Turnoffinterrupts.
d.Switchfromusertomonitormode.
2.8Protectingtheoperatingsystemiscrucialtoensuringthatthecomputersystemoperates
correctly.Provisionofthisprotectionisthereasonbehinddual-modeoperation,memory
protection,andthetimer.Toallowmaximumflexibility,however,wewouldalsoliketo
placeminimalconstraintsontheuser.
Thefollowingisalistofoperationsthatarenormallyprotected.Whatistheminimalset
ofinstructionsthatmustbeprotected?
a.Changetousermode.
b.Changetomonitormode.
c.Readfrommonitormemory.
d.Writeintomonitormemory.
e.Fetchaninstructionfrommonitormemory.
f.Turnontimerinterrupt.
g.Turnofftimerinterrupt.
Answer:
Theminimalsetofinstructionsthatmustbeprotectedare:
a.Changetomonitormode.
b.Readfrommonitormemory.
c.Writeintomonitormemory.
d.Turnofftimerinterrupt.
3.6Listfiveservicesprovidedbyanoperatingsystem.Explainhoweachprovidesconveniencetotheusers.Explainalsoinwhichcasesitwouldbeimpossibleforuser-levelprogramstoprovidetheseservices.
Answer:
Programexecution.Theoperatingsystemloadsthecontents(orsections)ofafile
intomemoryandbeginsitsexecution.Auser-levelprogramcouldnotbetrustedto
properlyallocateCPUtime.
I/Ooperations.Disks,tapes,seriallines,andotherdevicesmustbecommunicated
withataverylowlevel.Theuserneedonlyspecifythedeviceandtheoperationto
performonit,whilethesystemconvertsthatrequestintodevice-orcontroller-specic
commands.User-levelprogramscannotbetrustedtoonlyaccessdevicestheyshould
haveaccesstoandtoonlyaccessthemwhentheyareotherwiseunused.
File-systemmanipulation.Therearemanydetailsinfilecreation,deletion,allocation,
andnamingthatusersshouldnothavetoperform.Blocksofdiskspaceareusedby
filesandmustbetracked.Deletingafilerequiresremovingthenamefileinformation
andfreeingtheallocatedblocks.Protectionsmustalsobecheckedtoassureproperfile
access.Userprogramscouldneitherensureadherencetoprotectionmethodsnorbe
trustedtoallocateonlyfreeblocksanddeallocateblocksonfiledeletion.
Communications.Messagepassingbetweensystemsrequiresmessagesbeturned
intopacketsofinformation,senttothenetworkcontroller,transmittedacrossacom-
municationsmedium,andreassembledbythedestinationsystem.Packetordering
anddatacorrectionmusttakeplace.Again,userprogramsmightnotcoordinateac-
cesstothenetworkdevice,ortheymightreceivepacketsdestinedforotherprocesses.
Errordetection.Errordetectionoccursatboththehardwareandsoftwarelevels.At
thehardwarelevel,alldatatransfersmustbeinspectedtoensurethatdatahavenot
beencorruptedintransit.Alldataonmediamustbecheckedtobesuretheyhavenot
changedsincetheywerewrittentothemedia.Atthesoftwarelevel,mediamustbe
checkedfordataconsistency;forinstance,dothenumberofallocatedandunallocated
blocksofstoragematchthetotalnumberonthedevice.There,errorsarefrequently
process-independent(forinstance,thecorruptionofdataonadisk),sotheremustbea
globalprogram(theoperatingsystem)thathandlesalltypesoferrors.Also,byhaving
errorsprocessedbytheoperatingsystem,processesneednotcontaincodetocatchand
correctalltheerrorspossibleonasystem.
3.7Whatisthepurposeofsystemcalls?
Answer:
Systemcallsallowuser-levelprocessestorequestservicesoftheoperatingsys-
Tem.
让用户级进程可以请求操作系统所提供的服务
3.10Whatisthepurposeofsystemprograms?
Answer:
Systemprogramscanbethoughtofasbundlesofusefulsystemcalls.They
providebasicfunctionalitytousersandsousersdonotneedtowritetheirownprograms
tosolvecommonproblems.
为程序开发和运行提供了方便的环境
给用户提供基本的公共功能函数,为用户在不用自己写代码的情况下解决公用问题
4.1MS-DOSprovidednomeansofconcurrentprocessing.Discussthreemajorcomplications
thatconcurrentprocessingaddstoanoperatingsystem.
Answer:
Amethodoftimesharingmustbeimplementedtoalloweachofseveralprocessesto
haveaccesstothesystem.Thismethodinvolvesthepreemptionofprocessesthatdo
notvoluntarilygiveuptheCPU(byusingasystemcall,forinstance)andthekernel
beingreentrant(somorethanoneprocessmaybeexecutingkernelcodeconcurrently).
Processesandsystemresourcesmusthaveprotectionsandmustbeprotectedfrom
eachother.An