操作系统全英文期中考试题带答案doc.docx
- 文档编号:9040260
- 上传时间:2023-05-16
- 格式:DOCX
- 页数:14
- 大小:22.70KB
操作系统全英文期中考试题带答案doc.docx
《操作系统全英文期中考试题带答案doc.docx》由会员分享,可在线阅读,更多相关《操作系统全英文期中考试题带答案doc.docx(14页珍藏版)》请在冰点文库上搜索。
操作系统全英文期中考试题带答案doc
XX大学2011——2012学年第一学期
《操作系统》期中考试试题(A)
考试注-Vr.
事项
考试
课程
操作系统
考试时间
120分钟
年月
日
题号
—•
二
三
四
总分
满分
20
20
30
30
得分
阅卷教师
一、选择(每题1分,共20分)
1.Whichfunctiondoestheoperatingsystemcannotcompletedirectlyofthefollowingfouroptions?
(b)
A.Managingcomputer'sharddrive
B.Compiletheprogram
C.Virtualmemory
D.Deletefiles
2.Consideringthefunctionoftheoperatingsystem,(b)mustgivetimelyresponsefortheexternalrequestwithinthespecifiedtime.
A.multiusertimesharingsystem
B.real-timeoperatingsystem
C.batchoperatingsystem
D.networkoperatingsystem
3.Aprocesscantransformfromwaitingstatetoreadystaterelyingon(d)
A.programmercommand
B.systemservice
C.waitingforthenexttimeslice
D.wake-upofthe'cooperation'process
4.Asweallknow,theprocesscanbethoughtofasaprograminexecution.Wecandealwiththetheproblemabout(b)easierafterimportingtheconceptofprocess.
A.exclusiveresources
B.sharedresources
C.executinginorder
D.easytoexecute
5.CPU-schedulingdecisionsmaytakeplaceunderthefollowingcircumstancesexceptwhichone?
(D)
A.Whenaprocessswitchesfromtherunningstatetothewaitingstate
B.WhenaprocessswitchesfromtherunningstatetothereadystateC・WhenaprocessswitchesfromthewaitingstatetothereadystateD.Whenaprocessswitchesfromthereadystatetothewaitingstate
6.InthefourcommonCPUschedulingalgorithm,Whichoneisthebestchoice
forthetime-sharingsystemingeneral?
(C)
A.FCFSschedulingalgorithm
B.Priorityschedulingalgorithm
C.Round-robinschedulingalgorithm
D.Shortest-job-firstschedulingalgorithm
7.IftheinitialvalueofsemaphoreSis2inawait()andsignal()operation,itscurrentvalueis-ljhatmeansthereare(B)processesarewaitingo
A.O
B.l
C.2
D.3
8.Generallyspeaking,wecandealwithdeadlockprobleminthreeways.Deadlockpreventionisbasedon(c)
A.allocateenoughsystemresources
B.makeareasonableprocess
C.oneofthedestructionofthefournecessaryconditions
D.preventthesystemgointoastateofinsecurity.
9.Intheoperatingsystem,wait()andsignal()operationisakindof(d)
A.machineinstruction
B.systemcalls
C.jobcontrolscommand
DJow-levelprocesscommunicationprimitives
lO.Inthejobschedulingalgorithms,ifalljobscomeatthesametime,whichalgorithmhastheshortestaveragewaitingtime?
(d)
A.FCFSschedulingalgorithm
B.Priorityschedulingalgorithm
C.Round-robinschedulingalgorithm
D.Shortest-job-firstschedulingalgorithm
11.Whichofthefollowingschedulingalgorithmscouldresultinstarvation?
(d)
A.First-come,first-served
B.Multilevelqueuescheduling
C.Roundrobin
D.Priority
12.Datainthecriticalareacanbeusedforonlyoneprocessinthesametimeonce,oneprincipleofoperatingsystemcallforthecriticalareais(a)
A.whennoprocessisincriticalarea
B.whenthereisaprocessincriticalarea
C.whentheprocessisinthereadystate
D.whentheprocessiscreating
13.ThereareNprocessesinthesystem,thenhowmanyprocessesarethereinthereadyqueueatmost?
(a)
A.N
B・N・1
C.N-2
D.N-3
14・TwotravelagenciesAandBaregoingtobookingairlineticketsinaairlinecompany,thenexclusiveresourcesis(a)。
A.airlinetickets
B.travelagency
C.airlinecompany
D.bothtravelagencyandairlinecompany
15.Ifthesystemhasfiveplotter,andtherearetwomoreprocessesareneededtousetwoplottei;everyprocesscanapplyoneplottereachtime,thenhowmanyprocesseswecanallowtoparticipateinthecompetitionatmostandwillnotdeadlock?
(d)
A.5
B.2
C.3
D.4
16.Primitiveisaspecialsystemcall,itsfeatureis(a)
A.cannotbeinterruptedwhenexecuting
B.itcallsitself
C.canbecalledbytheouter
D.strongfunction
17.Ifthetimesliceisfixedinatimesharingsystem.then(a),thelongertheresponsetimeis.
A.themorethenumberofusers
B.thelessthenumberofusers
C.themorememory
D.thelessmemory
18.Therearemanyreasonscancausethedeadlockofasystem,andtherootcauseofsystemdeadlockis(c)
AJmproperjobscheduling
B.toomanyprocessesinsystem
C.exclusiveresources
D.resourcemanagementandprocesspromotion
19・Usuallywedonotusethewayof(d)toremovethedeadlock.
A.Endingadeadlockprocess
B.Endingallthedeadlockprocesses
C.Grabbingresourcesfromthedeadlockprocess
D.Grabbingresourcesfromthenon-deadlockprocess
2O.Whenprocessesarerunningintheprocessor,(c).
A.Processesareindependent,thesystemisclosed.
B.Processesareinteractive,concurrent,andthearebothinterdependentandconstrained
C.processesmayhavecontacts,andmaynotbe.
D.abovearewrong
二、填空(每空1分,共20分)
l.Amoderngeneral-purposecomputersystemconsistsofoneormoreCPUsandanumberofdevicecontrollersconnectedthroughacommonbusthatprovidesaccesstosharedmemory.(p6J.2丄LI)
2・Mainmemoryistheonlylargestorageareathattheprocessorcanaccessdirectly.(p&1.2.2,L2andP34,1.13,L6)
3.Oneofthemostimportantaspectsofoperatingsystemsistheabilitytomultiprogram,Asingleusercannotjngeneral5keepeithertheCPUortheI/Odevicesbusyallthetime.(pl5,1.4,L7)
4.1nmodernoperatingsystems,resourceallocationunitisprocess,processorschedulingunitisthread/p127,4.1,L1)
5.Fromaviewofstaticstate,theprocessofaoperatingsystemconsistsofprogramblock,dataandPCB(进程控制块).
6.ThetwobasicfeaturesofmodernoperatingsystemareconcuiTentandshared•
7.AsocketisdefinedasanendpointforcommunicationatisidentifiedbyanIPaddressconcatenatedwithaportnumber.(plO&3.6.1,L1)
S.Thegeneralideabehindathreadpoolistocreateanumberofthreadsatprocessstartupandplacethemintoapond,wheretheysitandwaitforwork.(pl41,44.4,L12)
9.Therearemanyresourcescanonlyallowoneprocesstouse,ifmorethanoneprocessusetheseresources,itmaycauseconfusioninthesystem,theseresourcesarecalledCriticalresource・(pl936・2.L4)
10.Whentheprocessexecutiontimeslicerunsout,theprocessconvertfromrunningstatetoreadystate.(p83)
11.Amajorproblemwithpriorityschedulingalgorithmsisindefiniteblocking(starvation).(p163,paragraph4,Ll)
12.Processsynchronizationisakindofrelationshipbetweenprocessesrestrictingeachotherlogically.(p193,paragraph3,paragraph4)
13.Theintervalfromthetimeofsubmissionofaprocesstothetimeofcompletionisthetumaroundtime•(pl57.52Tuman)undtime)
14.CPUschedulingisthetaskofselectingawaitingprocessfromthereadyqueueandallocatingtheCPUtoit.TheCPUisallocatedtotheselectedprocessbythedispatcher.®185,5.8丄1)
15.Astateissafeifthesystemcanallocateresourcestoeachprocessinsomeorderandstillavoidadeadlock.Moreformally,asystemisinasafestateonlyifthereexistsasafesequenceXp256.7<5<1,L1)
16.Twoormoreprocessesarewaitingindefinitelyforaneventthatcanbecausedonlybyoneofthewaitingprocesses,theseprocessesaresaidtobedeadlocked.(p245.L3)
17.Eachtimethewait()operation,thevalueofsemaphoreSreduce1.IfS>0,thentheprocesscontinue,ifSvO,theprocesswait<
1&Therearetwowaystoavoiddeadlock:
staticanddynamic,deadlockavoidancebelongstodynamic,
19.InRRschedulingalgorithm,ifthetimesliceistoolarge,RRschedulingdegeneratestoFCFSscheduling;ifthetimesliceistoosmall,schedulingoverloadintheformofcontex卜switchtimebecomesexcessive.(p186,L6)ZOeDeadlockavoidancerequiresthattheoperatingsystembegiveninadvanceadditionalinformationconcerningwhichresourcesaprocesswillrequestanduseduringitslifetime.(p252,paragraph45Ll)
三、简答(每题5分,共30分)
1.DefinethetermOperatingsystem1.WhatbasicfunctionsdoesanOSperform?
开放题,解释操作系统概念,操作系统可以实现哪些基本功能?
关键词:
乩管理系统资源,控制程序运行,改善人机界面,为其他应用软件提供支持。
b.基木功能:
进程与处理机管理、作业管理、存储管理、设备管理、文件管理。
2.Giveasimpledescriptionof'deadlockavoidance'and'deadlockprevention'死锁预防:
通过设置某些限制条件,去破坏产生死锁的四个必要条件屮的一个或者几个条件,來防止死锁发生。
死锁避免:
不需事先采用各种限制措施去破坏产生死锁的必要条件,而是在资源的动态分配过程中,用某种方式去防止系统进入不安全状态,从而避免发生死锁。
3.Whatdoyouthinkarethemainpowerstopromotethedevelopmentofoperatingsystem?
Listatleastthreereasons.
开放题,有道理即可。
女口:
(1)不断提高计算机资源利用率
(2)方便用户
(3)硬件不断史新换代
(4)计算机体系结构的不断发展等。
4.Whatisthedifferencebetweenaprogramandaprocess?
(1)程序是静态的指令序列,进程是动态的程序执行过程;
(2)程序是永久性软件资源,进程是动态生存的暂存性资源;
(3)进程具有并行特征,而程序没有;
(4)进程是竞争计算机资源的基本单位;
(5)不同的进程可以包含同一个程序,只要该程序对应的数据集不同。
5.Whatarethereasonsthatcausethedeadlock?
Whatarethenecessaryconditionswhenthedeadlockoccur?
1)a.系统资源不足,分配不当
b.进程推进顺序不合理
2)产生死锁的4个必要条件:
(1)互斥条件:
一个资源每次只能被一个进程使用。
(2)请求与保持条件:
一个进程因请求资源而阻塞时,对已获得的资源保持不放。
(3)不剥夺条件:
进程己获得的资源,在末使用完之前,不能强行剥夺。
(4)循环等待条件:
若干进程Z间形成一种头尾相接的循环等待资源关系。
6.Explainthefollowingterms:
1)Multiprocessorsystem
2)Systemcalls
3)Thread
1)多处理器系统是指包含两台或多台功能相近的处理器,处理器之间彼此可以交换数据,所有处理器共享内存,I/O设备,控制器,及外部设备,整个硬件系统由统一的操作系统控制。
2)系统调用提供了应用程序和操作系统的接口。
系统调用把应用程序的请求传给内核,调用相应的的内核函数完成所需的处理,将处理结果返回给应用程序。
3)线程是处理机调度的基本单位,包括线程ID,当前指令指针,寄存器集合和对战组成。
一个进程可以包含多个线程,并且他们可以并发执行。
四、解答题(每题10分,共计30分)
1.ThereisawarehousecanstoretwoproductsAandB,butitrequires:
1)youcanonlystoreonekindofproduct(AorB)
2)-N NandMisapositiveintege匚PleasedescribetheprocessofAandB'sstoragewithwait()andsignal()operation. 信号量的定义如下: Varmutex,SA,SB: semphore=l,M-l,N-l;M,N为题目中给出的整数值。 这里mutex用来作为互斥的信号量,保证每次只能存放一种产品(A或B);SA用來保证A产品数量・B产品数量 对这两个信号量的具休操作是,每当放入一个A产品,SA的值减1,SB的值就加1;每当放入一个B产品,SA的值加1,SB减1;当然这些操作都是rtiPV完成的。 具体程序如下: Begin PA: Begin Repeat P(SA) P(mutex) 放入一个A产品 V(mutex) V(SB) Unt
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 操作系统 英文 期中 考试题 答案 doc