Defrag

From Free net encyclopedia

Template:Cleanup-date

Image:Windows XP-Disk Defragmenter.png Image:Defrag icon.png

Defrag or Disk Defragmenter is a program included with most versions of the MS-DOS and Microsoft Windows operating systems starting from MS-DOS 6.0 (1993). Defrag.exe defragments a file system such as a hard drive.

History

Defragmentation has been part of disk optimization since disk optimization stabilized in 1975. Few, other than Norton (Symantec) and Microsoft, have shipped defragmentation programs separate from disk optimization methods.

Image:Microsoft Defrag for MS-DOS.png.

MS-DOS up to version 5 and Windows NT through version 4 did not come with any defragmentation utility much less disk optimization. Why Dave Cutler, chief architect of NT did not include disk optimization remains a mystery, as apparently he had included disk optimization in all his very similar operating systems from VMS back to his work supporting OSs at Carnegie Mellon.

In the MS-DOS world there were several after-market disk optimizers. The most famous, the Microsoft Defrag utility (licensed from Symantec, makers of the Norton Utilities) only managed the defragmentation step and was considered incompetent by some people. Microsoft's Defrag was also very slow, used memory inefficiently and often got caught up moving one cluster at a time. Norton's Speed Disk was much better (with more organizational options, and a 30% speed improvement), A shareware program called Disk Organizer was faster than most other programs and became quite popular for several years.

When Defrag was shipped for free with MS-DOS 6.0, the use of the alternative commercial products became less frequent, because customers were unable to justify the additional expense. See: Embrace, extend and extinguish.

How does it work?

The purpose of Disk optimization is to optimize the time it takes to read and write files to/from the disk by minimizing head travel time and maximizing the transfer rate. The used techniques include:

  1. Move all the index or directory information to one spot. Move this spot into the center of the data, e.g. one third of the way in, so that head travel to data is halved compared to having directory information at the front.
  2. Cluster files around the directory area.
  3. Move infrequently used files further from the directory area.
  4. Obey a user provided table of file descriptions to emphasize or ignore.
  5. Make files contigious so that they can be read without unnecessary seeking (defragmentation).

See Defragmentation for other information about this process.