操作系统课后重点习题整理(3)
(1)first-fit,best-fit和worst-fit算法分配进程如下: First-fit:
212K is put in 500K partition 417K is put in 600K partition
112K is put in 288K partition (new partition 288K = 500K ? 212K) 426K must wait Best-fit:
212K is put in 300K partition 417K is put in 500K partition 112K is put in 200K partition 426K is put in 600K partition Worst-fit:
212K is put in 600K partition 417K is put in 500K partition
112K is put in 388K partition 426K must wait
(2)Best-fit算法充分利用了内存空间。
第七版8.12 Consider the following segment table:
What are the physical addresses for the following logical addresses? a. 0,430 b. 1,10 c. 2,500 d. 3,400 e. 4,112
答:作业ch9-第四题
a. 430<600, 219+430 = 649 ; b. 10<14, 2300+10 = 2310 ; c. 500>100, illegal ;
d. 400<580, 1327+400 = 1727 ; e. 112>96, illegal 第九章
9.13 一个页面置换算法应使发生页错误的次数最小化。怎样才能通过将使用频率高的页平均分配到整个内存而不只是竞争少数几个页帧页来达到这种最小化。可以对每个页帧设置一个计数器来记录与此帧相关的页数。那么当置换一个页时,就可以查找计数器值最小的页帧 Answer:
a.定义一个页面置换算法解决问题:
Ⅰ.计数器初始值——0;
Ⅱ.计数器值增加——每当新的一页与此帧相关联;
Ⅲ.计数器值减少——每当与此帧相关联的一个页不再需要; Ⅳ.怎样选择要被置换的页——找到带有最小计数器值的帧。使用先进先出算法解
除其关系 b.14个页错误 c.11个页错误
9.15 颠簸的原因是什么?系统怎样检测颠簸?一旦系统检测到颠簸,系统怎样做来消除这个问题? Answer:
分配的页数少于进程所需的最小页数时发生颠簸,并迫使它不断地页错误。该系统可通过对比多道程序的程度来估计CPU利用率的程度,以此来检测颠簸。降低多道程序的程度可以消除颠簸。 第十章
第六版10.11 Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for the following replacement algorithms, assuming
one, two, three, four, five, six, or seven frames? Remember all frames are initially empty, so your first unique pages will all cost one fault each. LRU replacement FIFO replacement Optimal replacement
第十二章
12.1 Consider a file currently consisting of 100 blocks. Assume that the file control block (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level)
allocation strategies, if, for one block, the following conditions hold. In the contiguousallocation case, assume that there is no room to grow in the beginning, but there is room to grow in the end. Assume that the block information to be added is stored in memory. a. The block is added at the beginning. b. The block is added in the middle. c. The block is added at the end.
d. The block is removed from the beginning. e. The block is removed from the middle. f. The block is removed from the end.
12.2 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 diskscheduling
algorithms?(假设一个错哦盘驱动器有5000个柱面,从0到4999,驱动器正在为柱面143的一个请求提供服务,且前面的一个服务请求是在柱面125.按FIFO顺序,即将到来的请求队列是
86,1470,913,1774,948,1509,1022,1750,130 从现在磁头位置开始,按照下面的磁盘调度算法,要满足队列中即将到来的请求要求磁头总的移动距离(按柱面数计)是多少?) a. FCFS b. SSTF c. SCAN d. LOOK e. C-SCAN
a. FCFS的调度是143, 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130. 总寻求距离是7081.
b. SSTF的调度是143, 130, 86, 913, 948, 1022, 1470, 1509, 1750, 1774. 总寻求距离是1745.
c. SCAN的调度是143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 130, 86. 总寻求距离是9769.
d. LOOK的调度是143, 913, 948, 1022, 1470, 1509, 1750, 1774, 130, 86. 总寻求距离是3319.
e. C-SCAN的调度是143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 86, 130. 总寻求距离是9813.
f. C-LOOK的调度是143, 913, 948, 1022, 1470, 1509, 1750, 1774, 86, 130. 总寻求距离是3363.
…… 此处隐藏:1607字,全部文档内容请下载后查看。喜欢就下载吧 ……相关推荐:
- [高等教育]公司协助某村精准扶贫工作总结.doc
- [高等教育]高二生物知识点总结(全)
- [高等教育]苏教版数学三年级下册《解决问题的策略
- [高等教育]仪器分析课程学习心得
- [高等教育]2017年五邑大学数学与计算科学学院333
- [高等教育]人教版七年级下册语文第四单元测试题(
- [高等教育]2018年秋七年级英语上册Unit7Howmuchar
- [高等教育]2017年八年级下数学教学工作小结
- [高等教育]湖南省怀化市2019届高三统一模拟考试(
- [高等教育]四年级下册科学_基础训练及答案教材
- [高等教育]城郊煤矿西风井管路伸缩器更换施工安全
- [高等教育]昆八中20182019学年度上学期期末考试
- [高等教育]项目部各类人员任命书
- [高等教育]上市公司经营水务产业的模式
- [高等教育]人教版高二化学第一学期第三章水溶液中
- [高等教育]【中考物理第一轮复习资料】四.压强与
- [高等教育]金坑水电站报废改建工程机电设备更新改
- [高等教育]高中生物教学工作计划简易版
- [高等教育]2017年西华大学攀枝花学院(联合办学)44
- [高等教育]最新整理超短爆笑英文小笑话大全
- 优秀教师继续教育学习心得体会
- 阳历到阴历的转换
- 留守儿童教育案例分析
- 华师17春秋学期《玩教具制作与环境布置
- 测速传感器新型安装装置的现场应用
- 人教版小学数学三年级下册第四单元
- 创业个人意向书
- 山东省潍坊市2012年高考仿真试题(三)
- [恒心][好卷速递]四川省成都外国语学校
- 多少人错把好转反应当成了病情加重处理
- 中外广播电视史复习资料整理
- 江苏省扬州市江都区宜陵镇中学2014-201
- 工程造价专业毕业实习报告
- 广西师范学院心理与教育统计
- aympkrq基于 - asp的博客网站设计与开
- 建筑业外出经营相关流程操作(营改增后
- 人治 德治 法治
- [精华篇]常识判断专项训练题库
- 中国共产党为什么要实行民主集中
- 小学数学第三册第一单元试卷(A、B、C




