how music and video files stores in hard disk

stevewauh

Solid State Member
Messages
7
I have a small doubt, data stores in hard disk in binary formate but how a music and video files are stores in hard disk and retrieve by the computer. could you provide materials on this one
 
I have a small doubt, data stores in hard disk in binary formate but how a music and video files are stores in hard disk and retrieve by the computer. could you provide materials on this one

Binary...

Binary is just ons and offs, electricity, or no electricity, computers can not understand anything else. A hard drive stores data in a magnetic format, it is a glass, aluminium or plastic coated in a magnetic material. When you write something to the disc, different sections of the drive are magnetised, or left alone, to give the on or off, 1 or 0.

For how the computer works out these sections though, think of it like a dart board. The disc (platter) is split into rings and then each of those is split into individual segments. Ideally, a piece of data will be held in contiguous segments (clusters), as this will need the least disc and spindle movement, therefore will lead to the fastest read/write times. When the data is spread out (fragmented), to go from position 1 to position 2 takes longer, as the data is further away on the disc, hence why a fragmented hard drive is slower than one that is not. No prizes for guessing what defragmentation does then :)

Found a picture:

Disk-structure.svg


The data is tracked by the computer in a similar way to memory - each section has an address. These addresses are assigned by a file system, an example you may have heard of is FAT (File Allocation Table) or NTFS (New Technology File System). What this table does is say "here is a piece of data, here is where the next part is". So, the table contains information about where each sector points to.

Assume that you have a hard drive with 100 sections, and there is 1 program on it. You may open the program and the hard drive will get told "this program starts at 25". So the hard drive goes to 25.

25 then points to the next piece of data, 32, so it retrieves the data from 32, which points to 6, so it retrieves data from 6, which points to 87, so it retrieves the data from 87, which is the end of the program.

What it does with this data is load it into memory, because the CPU can not directly access the hard drive, but it can directly access RAM, so can manipulate the data from there, and send it either back to memory, where the altered data can be put back into storage, or onto an output device, such as your video coming from hard drive, to memory, to CPU, to GPU, to monitor (simplified)
 
Back
Top Bottom