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

发布时间 : 星期一 文章操作系统第九版部分课后作业习题答案更新完毕开始阅读

9.27.Consider a demand-paging system with the following time-measured utilizations: CPU utilization 20% Paging disk 97.7% Other I/O devices 5%

Which (if any) of the following will (probably) improve CPU utilization? Explain your answer. a. Install a faster CPU. b. Install a bigger paging disk.

c. Increase the degree of multiprogramming. d. Decrease the degree of multiprogramming. e. Install more main memory.

f. Install a faster hard disk or multiple controllers with multiple hard disks.

g. Add prepaging to the page fetch algorithms. h. Increase the page size.

Answer: The system obviously is spending most of its time paging, indicating over-allocation

of memory. If the level of multiprogramming is reduced resident processes

would page fault less frequently and the CPU utilization would improve. Another way to

improve performance would be to get more physical memory or a faster paging drum. a. Get a faster CPU—No. b. Get a bigger paging drum—No.

c. Increase the degree of multiprogramming—No. d. Decrease the degree of multiprogramming—Yes. e.

Install

more

main

memory—Likely

to

improve CPU utilization as more pages can

remain resident and not require paging to or from the disks. f. Install a faster hard disk, or multiple controllers with multiple hard disks—Also an

improvement, for as the disk bottleneck is removed by faster response and more

throughput to the disks, the CPU will get more data more quickly.

g. Add prepaging to the page fetch algorithms—Again, the CPU will get more data

faster, so it will be more in use. This is only the case if the paging action is amenable

to prefetching (i.e., some of the access is sequential). h. Increase the page size—Increasing the page size will result in fewer page faults if

data is being accessed sequentially. If data access is more or less random, more

paging action could ensue because fewer pages can be kept in memory and more

data is transferred per page fault. So this change is as likely to decrease utilization as it is to increase it.

10.1、Is disk scheduling, other than FCFS scheduling, useful in a single-user

environment? Explain your answer.

Answer: In a single-user environment, the I/O queue usually is empty.

Requests generally arrive from a single process for one block or

for

a

sequence of consecutive blocks. In these cases, FCFS is an economical

method of disk scheduling. But LOOK is nearly as easy to program and will give much better performance when multiple processes are

performing concurrent I/O, such as when aWeb browser retrieves data

in the background while the operating system is paging and

another

application is active in the foreground.

10.2.Explain why SSTF scheduling tends to favor middle cylinders over the

innermost and outermost cylinders.

The center of the disk is the location having the smallest average distance to all other tracks.Thus the disk head tends to

move

away from the edges of the disk.Here is another way to think of

it.The

current location of the head divides the cylinders into two groups.If

the head is not in the center of the disk and a new request arrives,the

new request is more likely to be in the group that includes the center

of the disk;thus,the head is more likely to move in that direction.

10.11、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

联系合同范文客服:xxxxx#qq.com(#替换为@)