How Does Defragmentation Work?
-
Hard Drive Description
-
Hard drives consist of a disk that has several rings. These rings are used to store files into sectors to store files. As you add files to your computer, the hard drive rotates while the actuator arm moves back and fort to add files to the sectors. Because the hard drive moves slowly compared to the processor, the hard drive is set up to place every file in a sequential order.
Fragmentating
-
When you delete a file, the hard drive replaces the deleted file's sector with part of a new file until that sector is full. It then moves to the next available sector. This means that if a free sector is out of order the hard drive fragments the files into sectors that are out of order. When you run that file, the hard drive has to look for all of the sectors of that file, so your computer runs slower. After you have used the same hard drive for a while, the hard drive has many files that are in separate sectors and separate rings.
-
Library Example
-
When you go to a library, you expect to find the books organized, first by subject, then by author and finally by title. However, if you are looking for all of the books on defragmenting your hard drive and someone has placed some of the books in the children's section, it is going to take you a long time to collect all of those books. This is similar to the problem the hard drive has when it replaces deleted files.
Defragmenting
-
As the name suggests, defragmenting the hard drive does the reverse of fragmenting. The hard drive moves all of the fragmented files into adjoining sectors. In addition, defragmenting moves the files that get used most often next to each other so that the hard drive does not have to rotate as often when you open these files.
-