News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

How is Data Stored in My Hard Disk

Started by ganeshbala, Sep 15, 2008, 11:17 AM

Previous topic - Next topic

ganeshbala

How is Data Stored in My Hard Disk

A key concept in data storage is that it is linear, logical and systematic in nature. When you 'save' data to the hard disk, the disk will follow a logical system.

A hard disk can be compared to a large, square piece of graphing paper composed of squares a thousand long and a thousand wide. Each individual square can accommodate one kilobyte of data and thus a 'strip' having a thousand squares can store one megabyte of data. In such a case, the disk head will 'fill' in the upper leftmost square first then continue down the line – one square at a time until all the appropriate squares are filled.

Data Storage Example

Imagine that you are saving a 1-Mb Word document on the hard disk. Saving a 1 MB file means the disk will systematically 'fill in' a thousand squares.

After saving the Word document, let us assume that you saved to your hard disk a 3 MB photo. Following the key concepts of data storage, the disk writer head will go through the disk and then look for the first available space – which in our example, happens to be the square following the last kilobyte of the Word document. Thus, the 3 MB photo will be saved at the space next to the Word document.

Afterwards, you go back to your Word document and trim it down, ending up with a file 700 KB in size, which you then save to your hard disk. Given the smaller file size, the 1 MB space requirement was reduced to 700 KB, leaving 300 KB free or (using the analogy above) 300 blank squares immediately after the Word document. There's now available space between the Word Document and the 3 MB photo.

When you save yet another file, say a 2 MB Excel file, the hard disk will follow its rule of saving data on the first available space. Thus, the Excel file will be split into two portions: 300 KB would be written on the 300 KB free space and the rest will be placed in the next available space – after the image file.
The Problem

Data storage, while designed to be logical and systematic, leads to file fragmentation. Imagine adding, deleting files and editing files for days, weeks and months. After a few months, the hard disk will become so fragmented that it would take the disk a lot of time to find fragments of a single file.

It is easy to see from this that data retrieval would be easy if the file components are in a single, contiguous location on the hard disk. De-fragmentation is the process wherein the different file fragments in a data storage system are located, 'gathered' and consolidated into specific areas of the storage device, thus making it easier to retrieve data – allowing for speedier processing as well as reduced wear and tear on data retrieval mechanisms.