Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  All data files and subdirectories are stored in the files area, which
  occupies the last and largest part of each disk.

  DOS allocates space to files, one cluster at a time, on an as-needed
  basis. (Remember, a cluster is one or more consecutive sectors; the number
  of sectors per cluster is a fixed characteristic of each disk format.) As
  a file is being created, or as an existing file is extended, the file's
  allocated space grows. When more space is needed, DOS allocates another
  cluster to the file. In DOS versions 1 and 2, the first available cluster
  is always allocated to the file. Later versions of DOS select clusters by
  more complicated rules that we won't go into here.

  Under ideal conditions, a file is stored in one contiguous block of space.
  However, a file might be broken into several noncontiguous blocks,
  especially if information is added to an existing file or a new file is
  stored in the space left by an erased file. So it's not unusual for one
  file's data to be scattered throughout the disk.

  This file fragmentation slows access to the file's data to some degree.
  Also, it is much harder to "unerase" a file you have unintentionally
  erased if it is fragmented, simply because you have to do a lot more
  searching for the individual clusters that make up the file's data space.
  But fragmentation has no other effect, and programs generally do not need
  to be concerned about where on a disk their data is stored. To determine
  if a file is fragmented, use CHKDSK or a program such as the Norton
  Utilities.

  If you are concerned about diskette file fragmentation, the DOS COPY
  command lets you transfer fragmented files to a newly formatted disk. DOS
  allocates contiguous space for the copied files. This simple technique
  also works for fixed-disk files, but it is much less convenient unless you
  have an extra, newly formatted fixed disk to use. If you think that
  fixed-disk file fragmentation is slowing down a particular application,
  you can purchase any of several fixed-disk utility programs to rearrange
  fragmented fixed-disk files and make them contiguous. Most of the time,
  however, file fragmentation has little impact on the speed of your
  programs.

  Whether you ever look at your fragmented files or not, you should know how
  DOS uses the file allocation table (FAT) to allocate disk space and how
  the FAT forms a space allocation chain to connect all of the clusters that
  make up a file.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson