KarbosGuide.com. Module 6a.5

About file systems (continued)

The contents:

  • File fragmentation
  • Defragmentation
  • Windows 98 Defrag
  • Next page
  • Previous page

  • File fragmentation

    When we work with FAT formatted disks, file fragmentation will occur all the time. One file can be several megabytes, thereby occupying more than one cluster. Maybe it requires 17 clusters. Ideally, the 17 clusters should be located next to each other. They can then be read at optimum speed, since that allows minimal movement of the read head. However, that is not the way it works.

    In actual operation, the individual files are broken up in multiple blocks, which are scattered across the disk. The problem increases with time. The more files you have on the hard disk, the more fragmentation you will experience. To begin with, vacant spaces appear between the files:

    When you first write to a new hard disk, the file might occupy 17 clusters in sequence. The same will happen to file number 2, 3, etc., until there are no more vacant clusters on the disk. Then the file system must re-use clusters. That is done by finding empty clusters, where the contents have been erased. Thus, the file could be scattered in 17 clusters, none of which are in sequence. Here you see a file split in four disconnected clusters:

    In the first DOS versions, when a new file had to be written, the file system always returned to the first vacant cluster to start a new file. That was done, to get optimum utilization of the disk. It also resulted in immediate and total file fragmentation. Since DOS version 3.0 the system was changed to fill the disk, before any vacant clusters were re-used. That delays fragmentation, but sooner or later it will occur anyway.


    You can use the program DEFRAG to defragment the files on the disk. If you are a heavy PC user, it needs to be done often. I usually run SCANDISK first. That checks the file system for logical errors and repairs them.
    Scandisk will often find errors, so it does a good job.

    Next defragment the disks with defrag /all. Both programs can be started with the command Start --> Run. Type in the command on the window: defrag /all

    Here you see the defragmentation:

    Run defrag weekly - that will keep your hard disks in good shape. Don't make the intervals too long. That can cause the disk to get messed up, especially if it is nearly full.

    Windows 98 Defrag

    In Windows 98 the defragmentation was changed from the way it worked in Windows 95. Windows 98/Me monitors how programs are loaded. Opening Word, as an example, includes opening a large number of DLL and other program files.

    With the defragmentation, all these files are placed in the right position to another on the disk, so they are loaded with optimal speed. It works very well, the programs are loaded 2-3 times as fast as before.

    However, you have to defrag on a regular (weekly) basis and the process may take a long time.

  • Next page
  • Previous page

    To learn more

    Read Module 6b with a little about Windows 95/98.

    Read Module 6c about the relationship between BIOS, OS and hardware

    Read Module 7a about the videosystem

    Read about video cards in Module 7b .

    Read about digital sound in Module 7c .

    [Main page]
    [Karbo's Dictionary]
    [The Software Guides]

    Copyright (c) 1996-2005 by Michael B. Karbo. www.karbosguide.com.