Sistemas operacionais - execicios e respostas mass storage structure
1345 palavras
6 páginas
MassStorage
Structure
10
CHAPTER
Practice Exercises
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 a Web 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.
Answer:
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.3
Why is rotational latency usually not considered in disk scheduling?
How would you modify SSTF, SCAN, and C-SCAN to include latency optimization? Answer:
Most disks do not export their rotational position information to the host. Even if they did, the time for this information to reach the scheduler would be subject to imprecision and the time consumed by the scheduler is variable, so the rotational position information would become incorrect. Further, the disk requests are usually given in terms
35
36
Chapter 10 Mass-Storage Structure
of logical block numbers, and the mapping between logical blocks and physical locations is very