云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 操作系统第九版部分课后作业习题答案

操作系统第九版部分课后作业习题答案

  • 62 次阅读
  • 3 次下载
  • 2025/5/4 1:01:08

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? a. FCFS b. SSTF c. SCAN d. LOOK e. C-SCAN Answer:

a. The FCFS schedule is 143, 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130. The total seek distance is 7081.

b. The SSTF schedule is 143, 130, 86, 913, 948, 1022, 1470, 1509, 1750, 1774. The total seek distance is 1745.

c. The SCAN schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 130, 86. The total seek distance is 9769. d. The LOOK schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 130, 86. The total seek distance is 3319.

e. The C-SCAN schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 86, 130. The total seek distance is 9813.

f. (Bonus.) The C-LOOK schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 86, 130. The total seek distance is 3363. 12CHAPTER File-System Implementation Practice Exercises

12.1 Consider a ?le currently consisting of 100 blocks. Assume that the ?lecontrol 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

contiguous-allocation case, assume that there is no room to grow at

the beginning but there is room to grow at the end. Also 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. Answer:

The results are:

Contiguous Linked Indexed a. 201 1 1 b. 101 52 1 c. 1 3 1 d. 198 1 0 e. 98 52 0 f. 0 100 0

12.2 What problems could occur if a system allowed a ?le system to be

mounted simultaneously at more than one location? Answer:

4344 Chapter 12 File-System Implementation

There would be multiple paths to the same ?le, which could confuse

users or encourage mistakes (deleting a ?le with one path deletes the

?le in all the other paths).

12.3 Why must the bit map for ?le allocation be kept on mass storage, rather than in main memory? Answer:

In case of system crash (memory failure) the free-space list would not

be lost as it would be if the bit map had been stored in main memory.

12.4 Consider a system that supports the strategies of contiguous, linked,

and indexed allocation. What criteria should be used in deciding which

strategy is best utilized for a particular ?le? Answer: ?

Contiguous—if ?le is usually accessed sequentially, if ?le is

relatively small. ?

Linked—if ?le is large and usually accessed sequentially. ? Indexed—if ?le is large and usually accessed randomly.

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

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? a. FCFS b. SSTF c. SCAN d. LOOK e. C-SCAN Answer: a. The FCFS schedule is 143, 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130. The total

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com