重庆大学操作系统全英文期末考试题(带答案)
2022年重庆大学英语考试真题卷精选全文

精选全文完整版(可编辑修改)2022年重庆大学英语考试真题卷(本卷共分为2大题50小题,作答时间为180分钟,总分100分,60分及格。
)单位:姓名:考号:一、单项选择题(共48题,每题2分。
每题的备选项中,只有一个最符合题意)1.What does "He wisely refused to spend his money" meanA.It was wise of him to refuse to spend his money.B.He refused to spend his money in a wise manner.C.He was short of money and didn't want to buy anything.D.He refused, in a wise manner, to spend his money.2.The following are all correct responses to "Who told the news to the teacher " EXCEPT ______ .A.Jim did this.B.Jim did so.C.Jim did that.D.Jim did.3.Quality is ______ counts most.A.whichB.thatC.whatD.where4.In his plays Shakespeare ______ his characters live through their language.A.would makeB.had madeC.madeD.makes5.The square itself is five hundred yards wide, five times ______ the size of St. Peter's in Rome.A./B.that ofC.which isD.of6.Which of the following sentences expresses "probability"A.You must leave immediately.B.You must be feeling rather tired.C.You must be here by eight o'clock.D.You must complete the reading assignment on time.7.When he first started in university, he really felt at ______ with his major--economics.A.shoreB.bankC.oceanD.sea8.On the road motorists should be aware of cyclists and be ______ towards them.A.considerableB.consideringC.considerateD.considered9.The company has capitalized ______ the error of judgment made by its business competitor.A.inB.overC.withD.on10.Sally was a bit shy, but the teacher found her quite ______ discussinga recent film with others.A.at homeB.at mostC.at houseD.at heart11.Tim has failed three courses this semester, so he will have to ______ them next semester.A.remakeB.repeatC.reapplyD.revise12.Keep this reference book; it may come in ______ one day.A.handyB.usefulC.convenientD.helpful13.The questions that the speaker raised were well ______ the average adult.A.pastB.onC.beyondD.through14.Teachers in this school were encouraged to use drama as a(n) ______ of learning.A.designB.instrumentC.agencyD.tool15.First, we need to find out what his scheme is, and then act ______ . A.sensitivelyB.imaginativelyC.efficientlyD.accordingly16.At first Jim was not quite clear what he was going to do after university, but now he seems ______ on becoming a computer programmer. A.fitB.setC.disposedD.decided17.When invited to talk about his achievements, he refused to blow his own ______ and declined to speak at the meeting.A.trumpetB.whistleC.bugleD.flute18.In spite of the treatment, the pain in his leg grew in ______ . A.gravityB.extentC.intensityD.amount19.Bus services between Town Centre and Newton Housing Estate will be ______ until the motorway is repaired.A.discontinuedB.suspendedC.haltedD.ceased20.The moon, being much nearer to the Earth than the Sun, is the ______ cause of the tides.A.principalB.basicC.initialD.elementary21.Teddy came to my ______ with a cheque of $ 200 to pay my room rate, after I phoned him that my wallet had been stolen.A.attendanceB.assistanceC.rescueD.safety22.The police have asked that ______ who saw the accident should get in touch with them.A.somebodyB.oneC.anyoneD.someone23.I'd sooner you ______ deliver the sofa tomorrow.A.didn'tB.shouldn'tC.wouldn'tD.mustn't24.When he finally emerged from the cave after 30 days, John was ______ pale.A.enormouslyB.startlinglyC.uniquelyD.dramatically25.______ ghost exists in the world. That's your illusion.A.No such a thing asB.No such a thing as aC.No such thing as aD.No such thing as26.______ allowing for his age, he still acts very immaturely.A.ButB.YetC.AlthoughD.Even27.He promised to return the book the next day without ______ .A.failB.defaultC.troubleD.failure28.By cutting down trees we ______ the natural habitat of birds and animals.A.damageB.injureC.hurtD.harm29.The government is doing a ______ of people's changing social habits. A.planB.surveyC.projectD.research30.Although he was on a diet, the food ______ him enormously. A.inspiredB.temptedC.overcameD.encouraged31.The title of the book was on the ______ of my tongue, but I just could not think of it.A.endB.tipC.backD.point32.If you want this pain killer, you'll have to ask the doctor for a ______ . A.receiptB.recipeC.subscriptionD.prescription33.Fred has ______ kind of humour that can only be appreciated by those willing to search beneath the surface.A.an obviousB.a hiddenC.a subtleD.a controlled34.A thorough check of the accounts has revealed ______ a tax evader. A.him beingB.him to beC.that he beD.that he had been35.Mrs. Smith is afraid that she and her husband don't see ______ on New Year's resolutions.A.face to faceB.eye to eyeC.hand to handD.heart to heart36.______ of the department, I would like to thank Mr. Jones for his stimulating lecture.A.On behalfB.On accountC.In personD.Instead37.Fewer and fewer of today's workers expect to spend their working lives in the same field, ______ the same company.A.all elseB.much worseC.less likelyD.let alone38.The ______ in David's character has hindered him from advancing in his career.A.weaknessB.shortcomingC.demeritD.defect39.______ I realised the consequences, I would never have done that. A.UnlessB.IfC.WhenD.Had40.Flag Day is a legal holiday only in the state of Pennsylvania, ______ Betsy Ross sewed the first American flag.A.whichB.whereC.thatD.has41.She said she wouldn't call us the next day, ______sheA.wouldB.wouldn'tC.didD.didn't42.They bought the land with a ______ to building a new office block. A.purposeB.reasonC.viewD.goal43.Maggie tiptoed over and took the clock away because she hated to hear______ it when she was trying to get some sleep.A.soundingB.hummingC.tickingD.ringing44.His argument does not ______ up to close scrutiny.A.holdB.standC.comeD.look45.Be careful with John; I think he has ______ motives for being so generous.A.ultimateB.ulteriorC.interiorD.hidden46.The vast majority of people in any given culture will ______ to established standards of that culture.A.confineB.conformC.confrontD.confirm47.It's a shame ______ able to give them any advice.A.not to have beenB.to have not beenC.to have been notD.to not have been48.They ______ so tired if they ______ for a whole day.A.wouldn't feel ... didn't walkB.wouldn't feel ... weren't walkingC.wouldn't be feeling ... weren't walkingD.wouldn't be feeling ... hadn't been walking二、多项选择题(共48题,每题2分。
2022年重庆大学软件工程专业《操作系统》科目期末试卷B(有答案)

2022年重庆大学软件工程专业《操作系统》科目期末试卷B(有答案)一、选择题1、某进程访问页面的序列如下所示。
若工作集的窗口大小为6,则在t时刻的工作集为()。
A.(6,0,3,2)B. (2,3,0,4)C.(0,4,3,2,9)D.(4,5,6,0,3,2)2、为了使多个进程能有效地同时处理输入和输出,最好使用()结构的缓冲技术。
A.缓冲池B.循环缓冲C.单缓冲D.双缓冲3、在请求分页系统中,页面分配策略与页面置换策略不能组合使用的是()。
A.可变分配,全局置换B.可变分配,局部置换C.固定分配,全局置换D.固定分配,局部置换4、下列关于虚拟存储的叙述中,正确的是()A.虚拟存储只能基于连续分配技术B.虚拟存储只能基于非连续分配技术C.虚拟存储容量只受外存容量的限制D.虚拟存储容量只受内存容量的限制5、解决主存碎片问题较好的存储器管理方式是()A.可变分区B.分页管理C.分段管理D.单一连续分配6、一个多道批处理系统中仅有P1,和P2两个作业,P2比P1晚5ms到达。
它们的计算和I/O操作顺序如下:P1:计算60ms,I/O 80ms,计算20msP2:计算120ms,I/O 40ms,计算40ms。
若不考虑调度和切换时间,则完成两个作业需要的时间最少是()。
A.240msB.260msC.340msD.360ms7、下面说法错误的有()。
I分时系统中,时间片越短越好。
II.银行家算法是防止死锁发生的方法之。
III若无进程处于运行状态,则就绪和等待队列均为空。
A. I和IIB. II和IIIC. I和IIID. I、II和II8、文件系统采用多级目求结构的目的是()。
A.减少系统开销B.节约存储空间C.解决命名冲突D.缩短传送时间9、下列选项中,磁盘逻辑格式化程序所做的T作是()I.对磁盘进行分区II.建立文件系统的根目录III.确定磁盘扇区校验码所占位数IV.对保存空闲磁盘块信息的数据结构进行初始化,A. 仅IIB.仅II、IVC.仅III,IVD.仅I、II、IV10、下列关于线程的叙述中,正确的是()。
2022年重庆大学计算机科学与技术专业《操作系统》科目期末试卷B(有答案)

2022年重庆大学计算机科学与技术专业《操作系统》科目期末试卷B(有答案)一、选择题1、某文件系统物理结构采用三级索引分配方法,如果每个磁盘块的大小为1024B.每个盘块索引号占用4B,请问在该文件系统中,最大文件的大小最接近的是()A.8GBB.16GBC.32GBD.2TB2、()结构的文件最适合于随机存取的应用场合。
A.流式B.索引C.链接D.顺序3、作业8:00到达系统,估计运行时问为1h。
若从10:00开始执行该作业,其响应比为()。
A.2B.1C.3D.0.54、在操作系统中,一方面每个进程具有独立性,另一方面进程之间具有相互制约性。
对于任何两个并发进程,它们()。
A.必定无关B.必定相关C.可能相关D.可能相同5、下列关于进程和线程的叙述中,正确的是()A.不管系统是否支持线程,进程都是资源分配的基本单位,B.线程是资源分配的基本单位,进程是调度的基本单位C.系统级线程和用户级线程的切换都需要内核的支持D.同一进程中的各个线程拥有各自不同的地址空间6、假定某页式管理系统中,主存为128KB,分成32块,块号为0,1,2,3,....31:某作业有5块,其页号为0,1,2,3,4,被分别装入主存的3,8,4,6,9块中。
有一逻辑地址为[3,70]。
试求出相应的物理地址(其中方括号中的第一个元素为页号,第二个元素为页内地址,按十进制计算)()。
A.14646B.24646C.24576D.345767、()存储管理方式提供一维地址结构。
A.分段B.分页C.分段和段页式D.以上都不对8、在单处理器系统中,可并行的是()I.进程与进程II.处理器与设备III.处理器与通道IV.设备与设备A.I、II和IIIB.I、II和IVC.I、III和IVD.II、III和IV9、一个多道批处理系统中仅有P1,和P2两个作业,P2比P1晚5ms到达。
它们的计算和I/O操作顺序如下:P1:计算60ms,I/O 80ms,计算20msP2:计算120ms,I/O 40ms,计算40ms。
2022年重庆大学数据科学与大数据技术专业《操作系统》科目期末试卷A(有答案)

2022年重庆大学数据科学与大数据技术专业《操作系统》科目期末试卷A(有答案)一、选择题1、处理外部中断时,应该山操作系统保存的是()A.程序计数器(PC)的内容B.通用寄存器的内容C.快表(TLB)中的内容D.Cache中的内容2、 OS通常为用户提供4种使用接口,它们是终端命令、图标菜单、系统调用和()A.计算机高级指令B.宏命令C.类似DOS的批命令文件或UNIX的shell文件D.汇编语言3、若系统中有5台绘图仪,有多个进程需要使用两台,规定每个进程一次仪允许申请一台,则最多允许()个进程参与竞争,而不会发生死锁。
A.5B.2C.3D.44、采用资源剥夺法可以解除死锁,还可以采用()方法解除死锁。
A.执行并行操作B.撤销进程C.拒绝分配新资源D.修改信号量5、并发进程执行的相对速度是()A.由进程的程序结构决定的B.由进程自己来控制的C.与进程调度策略有关的D.在进程被创建时确定的6、下列关于SPOOLing技术的叙述中,错误的是()A.需要外存的文持B.需要多道程序设计技术的支持C.可以让多个作业共享一台独占设备D.由用户作业控制设备与输入/输出之间的数据传送7、 I/O中断是CPU与通道协调I作的种于段,所以在()时,便要产生中断。
A.CPU执行“启动I/O”指令而被通道拒绝接收B.通道接受了CPU的启动请求C.通道完成了通道程序的执行D.通道在执行通道程序的过程中8、考虑一个文件存放在100个数据块中。
文件控制块、索引块或索引信息都驻留内存。
那么如果().不需要做任何磁盘I/O操作。
A.采用连续分配策略,将最后一个数据块搬到文件头部,B.采用单级索引分配策略,将最后一个数据块插入文件头部C.采用隐式链接分配策略,将最后一个数据块插入文件头部D.采用隐式链接分配策略,将第一个数据块插入文件尾部,9、如果当前读写磁头正在53号柱面上执行操作,依次有4个等待访问的请求,柱面号,依次为98,37,124,65,当采用()算法时,下一次磁头才可能到达37号柱面。
操作系统期末试题及答案

《操作系统》期末试卷姓名一、选择题( 15*2 分=30 分)1 、在操作系统中, JCB 是指(A )A.作业控制块B.进程控制块 C.文件控制块 D.程序控制块2、并发进程之间 ( D )A. 彼此无关B. 必须同步C. 必须互斥D. 可能需要同步或互斥3、运行时间最短的作业被优先调度,这种调度算法是( C ) 。
A.优先级调度 B.响应比高者优先C.短作业优先D.先来先服务4、某页式存储管理系统中,地址寄存器长度为 24 位,其中页号占 14 位,则主存的分块大小是( C )字节A. 210 B. 211 C. 214 D. 2245 、( D ) 是一种只能进行 P 操作和 V 操作的特殊变量。
A.调度 B.进程 C.同步D.信号量6、在操作系统中,并发性是指若干事件( )A.在同一时刻 B.一定在不同时刻C.在某一时间间隔内D.依次在不同时间间隔内7、很好地解决了“碎片”问题的存储管理方法是( A ) 。
A. 页式存储管理B. 段式存储管理C. 静态分区管理D. 可变分区管理8、多道程序设计是指 ( D )A. 在实时系统中并发运行多个程序B. 在分布系统中同一时刻运行多个程序C. 在一台处理机上同一时刻运行多个程序D. 在一台处理机上并发运行多个程序9 、设有 3 个进程共享同一程序段而每次最多允许两个进程进入该程序,若用 PV 操作作同步机制 , 则信号量 S 的取值范围为 ( ) 。
A.2,1,0,-1B.3,2,1,0C.2,1,0,-1,-2D.1,0,-1,-210、在提供虚拟存储的系统中,用户的逻辑地址空间主要受( C )的限制。
A. 内存空闲块的大小 B.外存的大小C.计算机编址范围D.页表大小11、采用时间片轮转法调度是为了 ( ) 。
A.多个终端都能得到系统的及时响应B.先来先服务 c 优先数高的进程先使用处理器 D.紧急事件优先处理12 、 ( )必定会引起进程切换。
操作系统期末考试试题及答案PDF

操作系统期末考试试题及答案PDF一、单项选择题(每题2分,共20分)1. 在现代操作系统中,进程和程序的主要区别是()。
A. 进程是一个动态的概念,程序是一个静态的概念B. 进程是程序的执行过程,程序是进程的代码集合C. 进程是程序的代码和数据的集合,程序是进程的执行过程D. 进程是程序的代码集合,程序是进程的执行过程2. 在操作系统中,进程调度的目的是()。
A. 决定进程的执行顺序B. 提高CPU的利用率C. 保证进程的公平性D. 以上都是3. 下列关于死锁的描述,不正确的是()。
A. 死锁是指两个或多个进程在执行过程中,因争夺资源而造成的一种僵局B. 死锁产生的四个必要条件是互斥、占有和等待、不可剥夺、循环等待C. 死锁的预防方法是破坏占有和等待条件D. 死锁的避免方法是通过银行家算法来实现4. 在操作系统中,虚拟内存的主要作用是()。
A. 提高内存的访问速度B. 提高内存的利用率C. 扩大内存的容量D. 以上都是5. 下列关于文件系统的的说法,不正确的是()。
A. 文件系统是操作系统中负责管理文件的系统B. 文件系统提供了文件的创建、删除、读取和写入等操作C. 文件系统将文件存储在磁盘上,并且可以对文件进行加密D. 文件系统允许多个用户同时访问同一个文件6. 在操作系统中,分页管理方式的主要优点是()。
A. 减少了内存的碎片B. 简化了内存管理C. 提高了内存的利用率D. 以上都是7. 下列关于进程通信的说法,不正确的是()。
A. 进程通信是指进程之间交换信息的过程B. 进程通信的方式有共享内存、消息传递、信号量等C. 进程通信可以提高系统的并发性D. 进程通信会导致进程的阻塞8. 在操作系统中,中断处理程序的主要作用是()。
A. 处理硬件设备发出的中断信号B. 处理用户发出的中断信号C. 处理操作系统发出的中断信号D. 处理进程发出的中断信号9. 下列关于操作系统的用户界面的说法,不正确的是()。
2022年重庆大学软件工程专业《操作系统》科目期末试卷A(有答案)

2022年重庆大学软件工程专业《操作系统》科目期末试卷A(有答案)一、选择题1、下列选项中,操作系统提供给应用程序的接口是()。
A.系统调用B.中断C.库函数D.原语2、执行系统调用的过程包括如下主要操作:①返回用户态②执行陷入(trap)指令③传递系统调用参数④执行相应的服务程序正确的执行顺序是()A.②->③->①->④B.②->④->③->①C.③->②->④->①D.③->④->②->①3、()有利于CPU繁忙型的作业,而不利于1/0繁忙型的作业(进程)。
A.时间片轮转调度算法B.先来先服务调度算法C.短作业(进程)优先调度算法D.优先权调度算法4、一个进程的读磁盘操作完成后,操作系统针对该进程必做的是(),A.修改进程状态为就绪态B.降低进程优先级C.给进程分配用户内存空间D.增加进程时间片大小5、进程调度算法中,可以设计成可抢占式的算法有()。
A.先来先服务调度算法B.最高响应比优先调度算法C.最短作业优先调度算法D.时间片轮转调度算法6、I/O交通管制程序的主要功能是管理()的状态信息。
A.设备、控制器和通道B.主存、控制器和通道C.CPU、主存和通道D.主存、辅存和通道7、下列关于SPOOLing的叙述中,不正确的是()A.SPOOLing系统中必须使用独占设备B.SPOOLing系统加快了作业执行的速度C.SPOOLing系统使独占设备变成了共享设备D.SPOOLing系统利用了处理器与通道并行上作的能力8、在磁盘上容易导致存储碎片发生的物理文件结构是()A.链接B.连续C.索引D.索引和链接9、下面关于目录检索的论述中,正确的是()。
A.由于散列法具有较快的检索速度,因此现代操作系统中都用它来替代传统的顺序检索方法B.在利用顺序检索法时,对树形目录应采用文件的路径名,应从根目录开始逐级检索C.在利用顺序检索法时,只要路径名的一个分量名未找到,便应停止查找D.在顺序检索法的查找完成后,即可得到文件的物理地址,10、在一个操作系统中对内存采用页式存储管理方法,则所划分的页面大小()。
操作系统英文版课后习题答案整理word文档良心出品

l.lWhat are the three main purpo ses of an op erat ing system? ⑴ In terface betwee n the hardware and user; (2) man age the resource of hardware and software; (3) abstracti on of resource;Answer:• To provide an environment k>r a computer user to< execute programs on computtr hardware in a ccnvenient and efficient manner• Tb 吕 lk>cat 特 the 艺t?parattz resources of the compuler as nteded to strive the prtjblem given* The allocation p TOCESS should be as fair and efficient as possible.• Asa ct>ntroJ p a>gram it serves two major functions : (1) sup ervision of the execution of user programs to p re vent errors and improper use of the computer, and (2) manage ment of the «p erat it) JI and control of [/O devices.1.2 List the four steps that are necessary to run a program on a completely dedicated machine. Prep rocess ing > Process ing > Linking > Executi ng.Answer乩 Reserve machine time*b. Manually load program into memory.c. Load starting address and begin execution.d.Monitor and control execution of program fnim ct>nsoie.1.6 Define the esse ntial prop erties of the follow ing types of op erat ing systems: a. Batch b. In teractive c. Time shari ng d. Real time e. Network f. DistributedAnswerBatch. Jobs with similar needs are batched together and run through the computer as a grcup by anoperator or automatic job st^quencer.[咆jrformHrk :电 is increased by atteiTipting to keep CPU andI/O devices busv 試 all times throughoff-lineoperation, Kptx?ling, and multiprogramming* Batch is good for executing large jobs that netxlinteraction; it can be siubmilted and picked up laterInteractive. Thkin J of many short transactiorifd where the results ofthe next transaction may be unpredictable. Response rirne needs to be short (seconds] since the user submils and w^iih For the result.Time sharing. This systems u&es 匚n scheduling and mLiltiprt)gramming toprtividt* economical interactive of a system. The CP 匚 占w 让 chem rap idly fn>nn one user to another Instead of havinga job defined by spooled card images^ each program re^dsa” b. c.its next control card from the terminal, and output is normally printed immediately to the screen. Real time. Often usvd in a dedicated application, tliis system reads information fram sensors and mustrespond within a fixed amount of time to ensure correct performance- Network.Distributed .This system distributes computation arntmg se¥t?ral physical prtxzesKors, Theprt>cesst>rs do not share memory or a cltKk. Instead, each prixessor has its t>wn kxzal memory. They communicate with each other through various communicatitm lines, such as a high-speed bus or telephone line.1.7 hardware. When is it approp riate for the op erat ing system to forsake this principle and to waste " resources? Why is such a system not really wasteful?Answer Single*user systems shtiuId maximize use of the systenn for the user. A GUI might “waste" CPU cy<les, but it optimizes the user's interaction with the system.2.2 How does the distinction between monitor mode and user mode function as a rudimentary form of p rotecti on (security) system?亠 ■ ■Answer; By establishing a set of privileged instructions that can be executed only when in the mt>niu)r mode, the operating system is assured of ct^ntrolling the entire system at all times.2.3 What are the differe nces betwee n a tra p and an in terru pt? What is the use of each fun cti on?Answer An interrupt is a ha rd w a re-genera ted change-of-flow within the system. An interrupt handler is summoned to deal with the c<iuse oF the interrupt; control is then re*turned to the interrupted context and instruction. A trap is a sof t wa re-genera ted in terru p 匕 An interrupt can bv usvd to signal the coiTipJctk*n of an [/O to obviate the need fnr du\ icy poiling. A trap can be used to call operating system routines or to catch arithmetic errors.2.5 Which of the follow ing in structi ons should be p rivileged? a. Set value of timer. b. Read the clock. c. Clear memory.d. Turn off i nterru pts.e. Switch from user to mon itor mode.d. Wehave stressed the n eed for an op erat ing system to make efficie ntuse of the comp ut ing3OS Exercise BookClass No. NameAnswer: The following instructions should be privileged: a. Set value of timer. b. Clear memory. c. Turn off interruptacL Switch from user to monitor mode.2.8 Protect ing the op erati ng system is crucial to en suri ng that the comp uter system op erates correctly. P rovisi on of this p rotecti on is the reas on beh ind dual-mode op erati on, memory pr otecti on, and the timer. To allow maximum flexibility, however, we would also like to p lace mini mal con stra ints on the user. The followi ngis a list of op erati ons thatof in structi ons that must be p rotected? a. Change to user mode. b. Change to mon itor mode. c. Read from mon itor memory. d. Write into mon itor memory.e. Fetch an in structi on from mon itor memory.f. Tur n on timer in terru pt.g. Turn off timer in terru pt.Answen The minimal set of instructions that must be protected are:Read from monitor memory* Write into monitor me mor v.*Turn off timer interrupt.3.6 List five services p rovided by an op erat ing system. Exp lain how each p rovides convenience to the users. Explainalso in which cases it would be impossible for user-levelpr ograms to p rovide these services.Answer:are no rmally p rotected.What is the minimal seta. Change to monitor mod 匕b. c.Program execution. The operating system loads the contents (or sections) of a file into memory and begins its execution. A user-level pm呂ram could not be trusted to properly allocate CPU time.I/O' op e rat ions. Disks, tapes, serial lines^ and other devices must be communicated with at a \ ery low level. The user need only specify the device and the operation to perform on it, while the system converts that request into device- or controller-specific commands. User-level programs cannot be trusted to only access devices they should have access to nnd to only access them when they art otherwise unused.File-system manipulation. There arv many details in file creation, deletion, alkKation, and naming that users should not have to perform. Blocks of disk spact? are used by files and must be tracked.Deleting a file requires removing the name file information and freeing the 说[located bk>cks.[Protections must also be checked to assure prtiper file access. User prt^grams could neither ensure adherence tct protection methexJs nor be trusted to allocate only free blocks and deallocate blocks on file deletion.Communications. Message passing between systems requires messages be turned into packets of information, sent to the network contnUlei; transmitted across a communications medium, and reassembled by the destination system. Packet ordering and data correction must take place. Again, user programs might not coordinate access to the network device, or they might reevi^T packets destined for other processes. • Error detection. Error detection occurs at both the hardware and sofirware levels. At the hardware le\-el, all data transfers must be inspected to ensure that data have not been c(>rrupted in transit AU data on media must bi checked to be sure they have not changed since they were written to the media. At the software level, media must be checked for data consistency;for instance, do the number of allt>cated and unallocated blocks of storage match the total number on the device. There, errors are frequently prexzess-independent (for instance, the corruption of data on a disk), so there must be a global program (ttiE op erating system) that handles all type 吕 of errors. Also, by having errors processed by the operating system, p rocesses need not contain code to catch and correct all thE errors possible on a syst Em.3.7What is the purpose of system calls?Answer System ualls(J1U>W user-lewl lii request ices uf tl咤uperdting sv;»-tem.3.10 What is the purpose of system programs?jVnswcr: Evstem p rograms can be thought of bundlcz^ uf useful systctu oils. Tbevprovide basic functicrahty to users and so users de not need to write their own programs to sol、忙common problems.4.1MS-DOS pr ovided no means of con curre nt pr ocess ing. Discuss three major comp licati ons that con curre nt p rocess ing adds to an op erat ing system.5OS Exercise BookClass No. NameAnswer:A method of time sharing must be implemented to allow each of several processes to have access to the systen'i. This method inxoJvcs the prompt ion of processes that do not voluntarily giA-e up the CPU (by using A system cal], for instance) <ind the kernel being reentrant (so more than one prtxzess may be executing kernel code concurrently).Processes and system resources must hav E protections and must be prciteck?d frtiTn each other Any given process must be limited in the amount of memory it can use and the operations it can perform on devices like disks.Care must be taken in the kernel to pre\ ent deadkxzks between processe 鬲 so prcicesses aren't waiting for each other's allcxated rest>urces.4.6full at any one time. Modify the algorithm to allow all buffers to be utilized fully.Answer No answer.5.1 P rovide two p rogram ming exa mp les of multithread ing givi ng imp rove p erforma nee over a sin gle-threaded soluti on.Answer (1) A server that services each request in a sep a rate thread. (2) A paral* lelized application such as matrix multi plication where different p arts of the matrix may be worked on in parallel. (3) An interactive GUI program such as a dibugger where a thread is used to monitor user input, another thread represents the running flppHcation, and a third thread monitors performance.5.3 What are two differences between user-level threads and kernel-level threads? Under what circumsta nces is one type better tha n the other?r■Answer Context switching between user tlireads is quite similar tG switching between kernel threads, although it is dependent on the threads library and how it maps user threads to kernel threads. In general, context switching between user threads involves taking a user thread of its LWP and replacing it with another thread. This act typically involves saving and restoring the st^te of the registers.6.3 Con sider the follow ing set of p rocesses, with the len gth of the CPU-burst time give n in millisec on ds: P rocessP1 P2 P3 F4 P5The p rocessesare assumed to have arrived in the orderThe correct p roducer— con sumer algorithm in Secti on 4.4 allows only n-1 buffers to beBurst 10 1 2 1 5Time P riority 3 1 3 4 2P1, P2, P3, P4, P5, all at time 0.a.Draw four Gantt charts illustrati ng the executi on of these p rocesses using FCFS, SJF, a nonpreemp tive p riority (a smaller p riority n umber imp lies a higher p riority), and RR (qua ntum = 1) scheduli ng.b.What is the tur narou nd time of each pr ocess for each of the scheduli ng algorithms in part a?c.What is the wait ing time of each p rocess for each of the scheduli ng algorithms in p art a?d.Which of the schedules in p art a results in the mini mal average wait ing time (over all pr ocesses)?An swer:AnswerThe four Gantt charts area.b- Turnaround timeFCFS円101113卩414 卩519RR■19274SJF191 ^riority18196Waiting time (turnaround time minus burst time)FCFS RR卩210Ih11卩413卩514 SJF214Prit^ritv•J61618d. Shortest Job First6.4 Suppose that the followingpr ocess will run the listed amou nt of time. In an sweri ng the questi ons, use nonpreemp tivescheduli ng and base all decisi ons on the in formati on you have at the time the decisi onp rocesses arrive for execution at the times in dicated. Each70.110.4a. What is the average tur narou nd time for these p rocesses with the FCFS scheduli ng algorithm?b. What is the average turnaround time for these processes with the SJF scheduling algorithm?c. The SJF algorithm is supp osed to impr ove p erforma nee, but no tice that we chose to run p rocessP1 at time 0 because we did not know that two shorter p rocesses wouldarrive soon. Comp ute what the average turn arou nd time will be if the CPU is left idle for the first 1 un it and the n SJF scheduli ng is used. Remember that p rocesses and P2 are wait ing duri ng this idle time, so their wait ing time may in crease. This algorithm could be known as future-k no wledge scheduli ng.Answer; a. 10,53b. 9.53c. 6.86Remember that turnaround time LS finishing time minus arrival time^ so you have h) subtract the arrival times to compute the turnaround times. F 匚FS is 11 if yw forget subtract arrival time.6.10 Explain the differe nces in the degree to which the follow ing scheduli ng algorithms discrim in ate in favor of short p rocesses: a. FCFS b. RRc. Multilevel feedback queuesAnswen孔 FCFS —discriminates against sliort jobs since any short jobs arriving after long jobs will have a kmger waiting time.b. RR 一treats all jobs equally (giving them eqiiaL bursts of CPU time) so short Qbm will be able toleave the system faster since they will finish first.c. Multilevel feedback queues —work similar to the RR algorithm —they discriminate favorably towardshort jt>bs.7.7 Show that, if the wait and sig nal op erati ons are not executed atomically, then mutual exclusi on may be violated.Answer No answer,must be made.ClassOS Exercise BookNo.NameAi rhal rimeBuist 1 i[uvPi7.8 The Slee pin g-Barber Pr oblem. A barbersho p con sists of a wait ing room with n chairsand the barber room containing the barber chair. If there are no customers to be served,the barber goes to slee p. If a customer en ters thebarbersho p and all chairs are occu pi ed,then the customer leaves the sho p.lf the barber is busy but chairs are available, the nthe customer sits in one of the free chairs. If the barber is aslee p, the customer wakes up the barber. Write a p rogram to coord in ate the barber and the customers.Answer: Please refer to the supporting Web site for source code solution.8.2 Is it possible to have a deadlock involving only one single process? Explain your answer.Answer No. This follows directly from the hold-and-wait condition.8.4 Con sider the traffic deadlock dep icted in Figure 8.11.a. Show that the four n ecessary con diti ons for deadlock in deed hold in this exa mple.b. State a sim pie rule that will avoid deadlocks in this system.Answer No answerCon Sider the follow ing snap shot of a system:Allocati onMax AvailableA B C DA B C D A B C D P0 0 0 1 2 0 0 1 2 1 5 2 0P1 1 0 0 0 1 7 5 0 P2 13 54 2 35 6P 3 0 6 3 2 0 6 5 2P40 0 1 40 6 5 6An swer the follow ing questi ons using th e ban kera. What is the content of the matrix Need?b. Is the system in a safe state?c. If a request from p rocess immediately?Answer:A. Deadlock cannot occur because preempticin exists.b. Yes. A process may never acquire all the resources 让 needs if they are continuously preempted by aseries of reqviests such as those of process C.9.5 Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in order), how would each of the First-fit, Best-fit, and Worst-fit algorithms place processes of 212K, 417K, 112K,and 426K (in order)? Which algorithm makes the most efficie nt use of memory?8.13 s algorithm:P1 arrives for (0,4,2,0), can the request be gran ted9OS Exercise BookClassNo. NameAnswer:212K is put in 500K partition 417K is put in BOOK partidon112K is put in 288K partition (new partition 288K = 500K = 212K) e. 426 K must wa 让212K 仏 put in 300K partidon 417K is put in 500K partition1I2K is put in 2nOK parti tin n 426K put in 600K partidon212K is put in 600K partition417K is put in 500K partitio 口 112K is put in 388K partidon 426K must waitIn this example. Best-fit turns out to be the best9.8 Con Sider a logical address sp ace of eight p ages of 1024 words each, mapped onto a physical memory of 32 frames.a. How many bits are there in the logical address?b. How many bits are there in the p hysical address?Answera. Logical addrej^s: 13 bitsb.卩hvsical address: 15 bits9.16 Con Sider the follow ing segme nt table: Segme nt Base Len gtha. First-fit:d ・ f. Best-fit:8- h* k. Worst-fit:m. n.600 14 100 580 96What are the p hysical addresses for the follow ing logical addresses? a. 0,430 b. 1,10 c. 2,500 d. 3,400 e. 4,112Answena. 219 + 43(1-649illegal reference, trap ki Dpvra ting systemillegal reference, trap tu op grating system10.2 Assume that you have a page referenee string for a process with m frames (initiallyall emp ty). The p age refere nee stri ng has len gth p with n disti net p age n umbers occur init. For any p age-re pl aceme nt algorithms,a. What is a lower bou nd on the n umber of p age faults?b. What is an upper bou nd on the n umber of p age faults?Answer a. tr b.卩10.11 Con Sider the follow ing p age refere nee stri ng: 1, Z 3, 4, 2,1,5, 6, Z 1,2, 3, 7, 6, 3, Z 1, Z 3, 6.How many p age faults would occur for the follow ing repl aceme nt algorithms, assum ing one, two, three, four, five, six, or seve n frames? Remember all frames are in itially emp ty, so your first uni que p ages will all cost one fault each.LRU rep laceme nt FIFO rep laceme nt Op timal rep laceme nt0 1 2 3 4219 2300 90 1327 1952 b. 2300 + 10 = 2310c. d. 1327 + 400= 17271111.7 Explain the purp ose of the openAnswer :■ The open operatit>n informs the system that the named file is about to become active^* Tlie cloiie «peration informs the system that tlie named file is no longer in active use by the user who issued the 匚lose operation.11.9 Give an example of an application in which data in a file should be accessed in the followi ng order: a. Seque ntially b. Ran domlyAnsiver :Print the content of the file.Print the content of record /. This record can be found using hashing or index techniques.11.12 theseusers to be able to access one file.a. How would you sp ecify this p rotecti on scheme in UNIX?b. Could you suggest ano ther pr otecti on scheme that can be used more effectively for this purpose tha n the scheme p rovided by UNIX?Answera. There are two methods for achieving this:Answer:ClassOS Exercise BookNo.NameNumber of framesLRU FIFO Optimal12 3 48-5 00 8 6 4and close op erati ons.a. b. Con sider a system that supports 5000 users. Suppose that you want to allow 4990 ofi. Create an access list with the names of all 4990ii. Put these 4990 users in one group and set the group access accordingly. This scheme cannot alwaysbe implemented since user groups are restricted by th# system.b. The univErse access information applies to all users unless their name appears in the access-controlHst with different access permission. With this scheme you simply put the names of the remaining ten users in the access control list but no access privileges alh)wcd.■r2Tl _Consider _a filecurrently consisting of 100 blocks.__Assume that _the file control block(ande in dex block, in the case of i ndexed allocati on) is already in memory. Calculate how any disk I/O op erati ons are required for con tiguous, li nked, and in dexed (sin gle-level) locati on strategies, if, for one block, the follow ing con diti ons hold. In thecase, assume that there is no room to grow in the beg inning, but there to be added is stored inAnswer198 9813.2 Con Sider the follow ing I/O see narios on a sin gle-user PC.a. A mouse used with a grap hieal user in terfaeeb. A tape drive on a multitask ing op erat ing system (assume no device p realloeati on is available) e. A disk drive containing user filesd. A gra phics eard with direet bus conn eeti on, aeeessible through memory-ma pped I/OFor each of these I/O see narios, would you desig n the op erat ing system to use bufferi ng, spo oli ng, eaehi ng, or a comb in ati on? Would you use p olled I/O, or in terru pt-drive n I/O? Give reas ons for your choices.teon tiguousalloeati onis room to grow in the end. Assume that the block in formatio nmemory.a. The block is added at the beg inning.b. The block is added in the middle. e. The block is added at the end.d. The block is removed from the begi nning.e. The block is removed from the middle.f. T he block is removed from the end.ContiffljQus LinkedIndexeda. b.201 101 52 3 52 10013OS Exercise BookClass No. NameAnswenA mouse used with a graphical user interfaceBuffering may bt? needed to record mouse movement during times when higher- priority op erations aretaking place. Spooling and caching are inap propriat 巳 Interrupt driven I/O is m 〔>st appropriate^ A t 日pe drive on a multitasking operating system (assume no device preallocation is availabl £) Buffering may be needed to manage through put difference behveen the tape drive and the souro? or destination of the I/O, C 白匚hing can bv used to hold copies of daU that resides on the tape, for faster access. Spooling could be used to stage data to the device when multiple users desire to read from or write to it. Interrupt driven I/G is likely to allow the best performance. A disk drive containing user filesBuffering can be used to hold data while in transit from user space to the disk, and visa versa. Caching can be used to hold disk-resident data for impmvtd performance. Spociling is not necessary because disks are shared-access devices. Interrupt- driven I/O is best for devices such as disks that transfer data at slow rates-A graphics card with direct bus connection, accessible through memory-rnapped I/O 'Buffering may be needed to control multiple access and for performance (doublebuffering can be used to hold the next screen image while displaying the current one). Caching and 5pooling are not necessary^ due to IH E fast and shared-access natures of the device. Folling and in term pts are only useful for input and for I/O completion detection, neither of which is needed for a memory^mapped device.14.2Suppose that a disk drive has 5000 cylinders,numbered 0 to 4999. The drive is currentlyserving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130Start ing from the curre nt head p ositi on, what is the total dista nee (in cyli nders) that the disk arm moves to satisfy all the pending requests, for each of the follow ing diskscheduli ng algorithms? a. FCFS b. SSTF c. SCAN d. LOOK e. C-SCANa. b.d.Answer:a. The FCFS schedule bi 143, 86, 1470, 913, 1774, 94S, 1509, 1022, 1750, 130. The tntal seekdistance is 7081.b. The SSTF schedule is 143, 130, 86, 913, 948, 1D22, 1470, 1509, 1750, 1774. The total seekdistance is 1745.c. The SCAN schedule is 143, 913, 94«, 1022,1470, 1509, 1750, 1774, 4999,130, 86. The total seekdistance is 9769.The LCX)K scheduJe is 143, 913, 94H, 1022, 1470, 1509, 1750, 1774, 130, H6. The total seekdistance is 3319.e. The C-SCAN schedule is 143,913,948,1022,1470,1509.1750,1774,4999;130. Thetotal seek distance is 9813.{Bonus.} The C-LOOK schedule is 143” 913,94& 1022,1470,1509,1750,1774,86,130. The tohal seek distance is 3363.1.1 1.62.3 2.53.7 6.3 6。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
XX大学2011 ——2012 学年第一学期《操作系统》期末考试试题(A)一.二.选择题(20分,每题1分)1. Generally speaking, which one is not the major concern for a operating system in the following four options?( D )A.Manage the computerB.Manage the system resourcesC.Design and apply the interface between user's program and computer hardware systemD.High-level programming language complier2.The main disadvantage of batch system is ( C )A.CPU utilization is lowB.Can not concurrentck of interactionD.Low degree of automation3.A process transforms from waiting state to ready state is caused by the ( B )A.Interrupt eventB.Process schedulingC.Create a process for a programD.Waiting for some events4.The concurrent process is refers to ( C )A.The process can be run in parallelB.The process can be run in orderC.The process can be run in the same timeD.The process can not be interrupted5.In multi-process system, in order to ensure the integrity of public variables, the processes should be mutually exclusive access to critical areas. The so-called critical area is ( D )A.A bufferB.A date areaC.Synchronization mechanismD.A program6.The orderly use of resources allocation strategy can destroy the condition ( D ) to avoid deadlock.A.Mutual exclusiveB.Hold and waitC.No preemptionD.Circular waiter's applications use the system resources to complete its operation by the support and services of ( C )A.clicking the mouseB.Keyboard commandC.System callD.Graphical user interface8.There are four jobs arrived at the same time and the execution time of each job is 2h. Now they run on one processor at single channel,then the average turnaround time is ( B )A.1hB.5hC.2.5hD.8h9.Among the job scheduling algorithms, ( B ) is related to the job's estimated running time.A.FCFS scheduling algorithmB.Short-job-first scheduling algorithmC.High response ratio algorithmD.Balanced scheduling10.In memory management, the purpose of using the overlay and swapping is ( C )A.Sharing main memoryB.Expanding main memory physicallyC.Saving main memory spaceD.Improving CPU utilization11.In the page-replacement algorithm,which one can cause the Belady phenomenon? ( A )A.FIFOB.LRUC.CLOCKINGD.OPT12.The following description of the system in safe state,which one is correct?( B )A.It must cause deadlock if the system is in insecure stateB.It may cause deadlock if the system is in insecure stateC.It may cause deadlock if the system is in secure stateD.All are wrong13.Generally, when we talk about"Memory Protection", the basic meaning is ( C )A.Prevent hardware memory from damagingB.Prevent program from losing in memoryC.Prevent the cross-border call between programsD.Prevent the program from being peeped14.The actual capacity of virtual memory is equal to ( B )A.The capacity of external memory(disk)B.The sum of the capacity of external memory and main memoryC.The space that the CPU logical address givesD.The smaller one between the option B and C15.Physical file's organization is determined by ( D )A.ApplicationsB.Main memory capacityC.External memory capacityD.Operating system16.A computer system is configured with two plotters and three printers,in order to properly drive these devices,system should provide ( C ) device driver program.A.5B.3C.2D.117.When there are fewer number of channels in system ,it may cause "bottlenecks".To solve this problem,which of the follow options is not the effective way?( A )A.improving the speed of CPUing the virtual device technologyC.Adding some hardware buffer on the devicesD.Increasing the path between devices and channels18.When I/O devices and main memory are exchanging data, it can be achieved without CPU's frequently intervention,this way of exchanging data is called ( C )A.PollingB.InterruptsC.Direct memory accessD.None of them19.The following description of device management, which one is not correct?( B )A.All external devices are managed by the system in uniformB.Channel is a software of controlling input and outputC.The I/O interrupt events from the I/O channel are managed by device managementD.One of the responsibility of the operating system is to use the hardware effectively20.The operating system used ( A ), it realized a mechanism that we can use more space to save more time.A.SPOOLINGB.Virtual storageC.ChannelD.Overlay三.填空题(20分,每空1分)1.Software may trigger an interrupt by executing a special operation called a system call .(P7)2.If there is only one general-purpose CPU,then the system is a single-processor system.(p12)3. A process can be thought of as a program in execution. (p79)4.As a process executes,it changes state.Each process may be in one of the following states:new,running,waiting,ready or terminated .(p83)5.Long-term(job) scheduling is the selection of processes that will beallowed to contend for the CPU.And Short-term(CPU) scheduling is the selection of one process from the ready queue. (p116)6.The process executing in the operating system may be either independent processes or cooperating processes. Cooperating processes require an interprocess communication mechanism to communicate with each other.Principally,communication is achieved through two schemes: share memory and message passing. (p116)7.In modern operating systems, resource allocation unit is process, processor scheduling unit is thread .(p127)8.Most modern operating systems provide kernel support for threads;among these are Windows,as well as Solaris and Linux .(p146)9.CPU scheduling is the basis of multiprogrammed operating systems.(p153)10.The FCFS algorithm is nonpreemptive;the RR algorithm is preemptive.11.Sometimes,a waiting process is never again able to change state,because the resources it has requested are held by other waiting processes.This situation is called deadlock . (p245)12.The main purpose of a computer system is to execute programs.These programs,together with the data they access,must be in main memory(at least partially) during execution.(P274)13. The various memory-management algorithms differ in may aspects.In comparing different memory-management strategies,we use the follow considerations:Hardware support,Performance,Fragmentation,Relocation, Swapping,Sharing and protection . (p310)14.A process is thrashing if it is spending more time paging than executing.15.Virtual memory is a technique that enables us to map a large logical address space onto a smaller physical memory.(p365)16.When we solve the major problems of page replacement and frame allocation,the proper design of a paging system requires that we consider page size,I/O,locking,process creation,program structure,and other issues.(p366) 17.The operating system abstracts from the physical properties of its storage devices to define a logical storage unit,the file . (p373)18.Since files are the main information-storage mechanism in most computer system,file protection is needed.(p408)19.The seek time is the time for the disk arm to move the heads to the cylinder containing the desired sector.(P457)20.The hardware mechanism that enables a device to notify the CPU is called an interrupt .(p499)四.简答题(30分,每题6分)1.What is the operating system?What role does the operating system play in acomputer?开放题,解释操作系统概念,操作系统可以实现哪些基本功能?关键词:a.管理系统资源,控制程序运行,改善人机界面,为其他应用软件提供支持。