what Defragmentation is

782 views

what Defragmentation is

In: Technology

6 Answers

Anonymous 0 Comments

A hard disk is a spinning physical disk. The disk is divided into blocks, think of them as little boxes to hold your data.
Your files are split up into these little boxes, the bigger the file the more boxes it’ll need.
Now to read your files, the disk moves an arm with a reader over to where the blocks your files are, then it spins the disk so the part where your files are.
Moving the arm is really complicated, hard and slow, and waiting for the disk to spin is also slow. (at least for computer standards)
So you want to have you file’s blocks all in a neat little row, so they don’t need to move the arm and just spin the disk, and even then it doesn’t have to skip over blocks it doesn’t care about right now.
Now lets say you have 5 blocks, 1-5.
You have 5 files, all 1 blocks each.
1:File 1
2:File 2
3:File 3
4:File 4
5:File 5

Now you delete files 1,4 and 5
1:Empty
2:File 2
3:File 3
4:Empty
5:Empty

Now you want to write a big new files that takes up 3 blocks.
Computer slots it in
1:New File
2:File 2
3:File 3
4:New File
5:New File

Now your computer has a problem, to read the new file it has to skip blocks 2 and 3, meaning you’ll have to wait for the platter to spin. We can say that the New File is fragmented.
Now this is a tiny example, but a badly fragmented file system might mean that the disk head is jumping all over the place and waiting a lot for the disk to spin, as it tries to find hundreds of files in millions of blocks.
So defragmenting says.

We’ll swap block 3 and block 1. Now the files system looks like:

1:File 3
2:File 2
3:New File
4:New File
5:New File
and all is good

You are viewing 1 out of 6 answers, click here to view all answers.