Section 17.6
Review Questions

Files

  1. What really is a file?
answer...
an abstract entity created by the operating system, comprised of data stored in sectors on disk drives
  1. Which operating system for personal computers used to store files using the contiguous allocation method?
answer...
MS-DOS
  1. How does contiguous allocation work?
answer...
The data of a file is stored in consecutive sectors a disk drive until the track fills up, when the next track is utilized.
  1. What are the pros and cons of contiguous allocation?
answer...
Pros it is simple to implement, easy to find the next sector in a file Cons when a file gets too large, it may not all fit; and if a file is deleted and another added, the OS may have to move whole files around on disk to accomodate the new one; files have a hard time growing especially if another file follows
  1. What the main alternative method of storing files on disk?
answer...
the linked-list allocation method
  1. How does this work?
answer...
Files are comprised on sectors. In each sector of a file is a pointer to the next sector in the chain. Sectors can be anywhere on disk, in no particular order.
  1. What are the pros and cons of this method?
answer...
Pros it is easy for files to grow and shrink; existing sectors never have to be recopied or moved Cons performance degrades when sectors are scattered all over the disk due to long seek times
  1. What do we call the process of periodically writing all the files to another disk or to tape, and then back to the disk in order to get all the sectors on the same or nearby tracks to improve performance?
answer...
reorganizing, or defragmenting
  1. What do we call all the tracks in a disk drive that are the same distance from the edge?
answer...
a cylinder
  1. Why is this concept of groups of tracks useful?
answer...
allocating files out of sectors in the same cylinder will improve performance by eliminating seek time (all the sectors in a cylinder are available without turning on the stepper motor)