已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 工程监理专业职业规划
- 病理技术员就业前景
- 未来中期职业规划作文
- 廉洁教育演讲模板-1
- 2026江西江西新鸿人力资源服务有限公司招聘4人笔试模拟试题及答案解析
- 2026浙江绍兴大学招聘27人考试备考题库及答案解析
- 2026广东湛江市霞山区东新街道办事处就业见习岗位招聘1人农业笔试备考试题及答案解析
- 2026浙江台州市椒江区三甲街道招聘4人笔试备考题库及答案解析
- 2026年及未来5年市场数据中国电视光盘重放设备行业市场全景评估及发展前景预测报告
- 2026年及未来5年市场数据中国民办初中行业市场发展数据监测及投资潜力预测报告
- 心房颤动单病种质控查检表
- 食用菌育种教材 第2章 蕈菌的性及交配系统(4学时)
- 竞争情报理论与务实
- 大理双廊镇旅游产业可持续发展战略,mba旅游管理论文
- SMT PCBA周转、存储作业指导书V1.0
- 钢铁职业病危害现状评价报告
- 高中心理健康教育教资面试教案五篇
- GB/T 6478-2001冷镦和冷挤压用钢
- GB/T 32238-2015低温承压通用铸钢件
- GB/T 18348-2022商品条码条码符号印制质量的检验
- GB/T 12719-2021矿区水文地质工程地质勘查规范
评论
0/150
提交评论