首页 > 试题广场 >

Requests are not usually unifo

[问答题]
Requests are not usually uniformly distributed. For example, a cylinder containing the file system FAT or inodes can be expected to be accessed
more frequently than a cylinder that only contains files. Suppose you know that 50 percent of the requests are for a small, fixed number of cylinders.
a. Would any of the scheduling algorithms discussed in this chapter be particularly good for this case? Explain your answer.
b. Propose a disk-scheduling algorithm that gives even better performance by taking advantage of this "hot spot" on the disk.
c. File systems typically find data blocks via an indirection table, such as a FAT in DOS or inodes in UNIX. Describe one or more ways to take advantage of this indirection to improve the disk performance.

推荐
a.SSTF would take greatest advantage of the situation. FCFS could cause unnecessary head movement if references to the "highdemand" cylinders were interspersed with references to cylinders far away.
b.Here are some ideas. Place the hot data near the middle of the disk. Modify SSTF to prevent starvation. Add the policy that if the disk becomes idle for more than, say, 50 ms, the operating system generates an anticipatory seek to the hot region, since the next request is more likely to be there.
c.Cache the metadata in primary memory, and locate a file's data and metadata in close physical proximity on the disk. (UNIX accomplishes the latter goal by allocating data and metadata in regions called cylinder groups.)
发表于 2018-03-23 21:55:21 回复(0)