12.10

Operating systems try to ensure that consecutive blocks of a file are stored on consecutive disk blocks. Why is doing so very important with magnetic disks? If SSDs were used instead, is doing so still important, or is it irrelevant? Explain why.


Operating systems try to ensure that consecutive blocks of a file are stored on consecutive disk blocks. This is because, when processing the file (that is stored on disk), most programs perform a sequential access pattern. To read blocks in sequential access, a disk seek may be required for the first block, but successive requests would either not require a seek, or require a seek to an adjacent track, which is faster than a seek to a track that is farther away. Data transfer rates are highest, when consecutive file blocks are stored on consecutive disk blocks (since seek time is minimal).

Storing consecutive blocks of a file on consecutive disk blocks, also improves performance when using SSDs. This is because of the read-ahead caching that is performed.