The storage disk is a circular object encased in a box. It stores data in bytes. For reference, 1 byte is enough to hold 1 character, like a number or a letter or a symbol → 3 or h or %

Here's how a storage disk from your computer looks like.

Here's how a storage disk from your computer looks like.

The disk actually consists of 2 parts → the actual disk and the read-write head.

The disk stores data while the head spins the disk and moves backward and forward to read and write information to the disk. It's analogous to stereo record player where you place the record on the player and lay the needle atop the disk to play the song.


Data Storage

The disk is made up of many concentric circles, each one smaller in radius than the other. Each gutter created between two concentric circles is called a Track. It also has many vertical lines running from the edge to the center (like the radius line). The area created by two lines and the outer arc is called a Sector.

The read-write head (needle) spins the disk to move from sector to sector and shifts back and forth along the radius (from edge to center) to switch between tracks. If you visualise it, you'll understand what I'm saying here.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b0f3eba1-8e82-41ec-bc39-4d9689927e41/Untitled.png

There are parts where these vertical lines intersect with the circumference of all the concentric circles. The area created between these intersection lines is alled a Block. These blocks store data in bytes. For theoretical purposes, assume that each block can hold 512 bytes of data.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/cacc54aa-16ee-4e4b-a10f-e17f1e0c15a2/Untitled.png

To identify a block, we reference its track and sector ID. In this case, the purple block would be identified as [a, 6] since it's found in track a located in the 6th sector.

When we zoom into a block, we see 512 bytes ready for use. To reference a specific byte in these 512 bytes, we use something called an Offset. For the purple byte below, the offset is 10 and for the red byte, the offset is 3. You get the point.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/7b178205-d662-4688-ad16-406f0b7da753/Untitled.png

We cannot directly manipulate data on the disk, which is why we have to read all the blocks to main memory (famously known as RAM). We use data structures and code to manipulate this information in the RAM and send back the changed data to the same blocks for persistent storage.

The Disk Masters in all their glory. RIP 8-Track, you'll be remembered. Also, watch Regular Show. It's lit.

The Disk Masters in all their glory. RIP 8-Track, you'll be remembered. Also, watch Regular Show. It's lit.