




已阅读5页,还剩1页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
东 南 大 学 考 试 卷(B 卷)自 觉 遵 守 考 场 纪 律 如 考 试 作 弊 此 答 卷 无 效学号 姓名 密封线课程名称操作系统考试学期07-08-2得分适用专业计算机应用考试形式闭卷考试时间长度120分钟一、Definitions 5X6=30 ptsGive the technical term that best fits these definitions1. Portion of a program that accesses shared variables and that no two processes can be executing this code that manipulates shared variables at the same time.2. It is a method of overlapping the I/O of a job with that jobs own computation. The idea is simple. After a read operation completes and the job is about to start operating on the data, the input device is instructed to begin the next read immediately. The CPU and input device are then both busy. 3. Some devices, such as tape drives and printers, cannot usefully multiplex the I/0 requests of multiple concurrent applications. The subsystems can coordinate concurrent output to a separate disk file. For instance, When an application finishes printing, the subsystem copies the queued files to the printer one, at a time.4. Unused routine is never loaded.5. A process is busy swapping pages in and out.6. A small operating system core that provides basic scheduling, memorymanagement and communication services while relying on processes to performthe other required functionality traditionally associated with the operating system.二、Comparisons6+9=15ptsComplete the following comparisons using True, False or Possible1.6ptsBlocking I/o versus Noblocking I/OPoint of Comparison Blocking I/O Noblocking I/OI/O call returns as much as availableImplemented via multi-threading2. 9 pts Threads versus processesPoint of Comparison Threads ProcessesShare all global variables Execute in separate address spaces Require less time to create, terminate and switch from one to another 三、Computing10+12=22 pts1.Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a request at cylinder 143, and the previous request was at cylinder 125. The queue of pending requests, in FIFO order, is 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following disk-scheduling algorithms? 10 pts a. SSTFb. LOOK2. Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:Process Burst Time PriorityP1 10 3P2 1 1P3 2 3P4 1 4P5 5 2The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. 12 ptsa. Draw the Gantt chart illustrating the execution of these processes using SJF, a nonpreemptive priority (a smaller priority number implies a higher priority) scheduling.b. What is the turnaround time of each process for the scheduling algorithm in part a?c. What is the waiting time of each process for the scheduling algorithm in part a?四、Answer the following questions 8+10=18 pts1.What is a race condition? When does it happen? 8pts2. Under what circumstances do page faults occur ? Describe the actions taken by the operating system when a page fault occurs. 10pts五、Programming15 ptsThe Sleeping-Barber Problem. A barbershop consists of a waiting room with n chairs, and a barber room with one barber chair. If there are no customers to be served, the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop. If the barber is busy, but chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber. Write a program to coordinate the barber and the customers using Java synchronization(or vc+ with P and V operations).B卷答案一、Definitions 5X6=30 pointsGive the technical term that best fits these definitions1. Critical Section2. Prefetching3.sppoling4. Dynamic loading5. Thrashing6. Microkernel二、Comparisons15ptsComplete the following comparisons using True, False or Possible1)6ptsBlocking I/o versus Noblocking I/OFalse TruePossible True 2) 9 pts Threads versus processesTrue False False True True False三、Computing22 points1.a.The SSTF schedule is 143, 130, 86, 913, 948, 1022, 1470, 1509, 1750, 1774. The total seek distance is 1745.b. The LOOK schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 130, 86. The total seek distance is 3319.2. Answer:a. The two Gantt charts are2 3 4 5 1 5 1 5 1 5 1 1 3 1 51 3 4 5 2b. Turnaround time(SJF and priority)P1 19 ,16 P2 1 ,1 P3 4 ,18 P4 2 ,19 P5 9 ,6c. Waiting time (turnaround time minus burst time)P1 9 ,6 P2 0 , 0 P3 2 ,16 P4 1 ,18 P5 4 ,1四、Answer the following questions 1The situation where several processes access and manipulate shared data concurrently. The final value of the shared data depends upon which process finishes last.2During address translation, if validinvalid bit in page table entry is 0 page fault. If there is ever a reference to a page, first refer
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 青蓝工程演讲稿
- 系统化管培生培训方案及实践指导文档
- 幼儿品德教育的实施策略
- 工业机械臂多自由度关节设计优化研究
- 排水沟工程施工合同协议书6篇
- 【《电梯导靴故障诊断研究的国内外文献综述》4700字】
- 【《信用证缺陷与软条款的概述》5500字】
- 2025年5G网络覆盖与农村信息化建设报告
- 新能源2025年危机公关案例解析:技术创新与处理策略报告
- 动漫产业链协同效应研究:2025年创新驱动策略研究报告
- YY/T 1269-2015血液透析和相关治疗用水处理设备常规控制要求
- GB/T 3047.2-1992高度进制为44.45mm的面板、机架和机柜的基本尺寸系列
- GB/T 19466.3-2004塑料差示扫描量热法(DSC)第3部分:熔融和结晶温度及热焓的测定
- 启航新课堂七数北上-第二章2.5有理数减法
- 老年康复理论知识考核试题及答案
- GA/T 1607-2019法庭科学生物检材中海洛因代谢物检验液相色谱-质谱法
- FZ/T 52025-2012再生有色涤纶短纤维
- 价值的创造与价值实现课件
- 大学物理实验:光电效应课件
- 【课件】物流系统规划与设计
- 创伤急救技术课件
评论
0/150
提交评论