Hard Disk Structure In OS

A hard disk is a secondary storage that stores a large amount of data. The hard disk drive contains dozens of disks. These disks are also known as platters. These platters are mounted over the spindle, which rotates in any direction, i.e., clockwise or anti-clockwise. Let’s look at the hard disk structure in OS.

Platter in Disk

The manufacturer constructs the Platter from aluminum or iron oxide. The platter diameter range is 1.8 inches to 5.25 inches.

  • One surface of the Platter requires one Read/Write head, and a second R/W head is used for the other surface to store information.
  • Every Platter holds the same no of tracks.
  • Multiple platters increase the storage capacity.

Below is a descriptive diagram of a single platter.

Tracks

Circular areas of the disk are known as tracks.

  • There may be more than 1000 tracks on a 3.5-inch hard disk.
  • Track Numbering starts with zero from the outermost track.

Sectors

We further divide tracks into several small units, and these units are known as sectors.

  • Sectors are the most minor physical storage units on disk.
  • The size of each sector is almost always 512 Bytes.
  • Sector Numbering starts from number 1, in the outermost tracks.

R/W Head

R/W Heads move forth and back over the Platter surfaces to Read or Write the data on sectors. Read/Write heads do not touch the platter surface.

  • The magnetic field writes data onto the platter surface.
  • When the R/W head contacts the platter surface, it may create bad sectors.
  • Had disk may damage due to these bad sectors.

Cylinder

All Corresponding tracks with the same radius of all platters in the Hard disk are known as cylinders. In simple words, we say

“Each track of all platters with the same radius is called a cylinder”.

So, the number of tracks on the Platter always equals the number of cylinders. For example, in a hard disk, where each Platter contains 600 tracks, the number of cylinders will also be 600 in the hard disk.

Cylinder Numbering starts with zero from the outermost cylinder.

Cluster

Cluster is also known as blocks. A group of sectors makes a cluster. There may be 64 or more sectors in a cluster. OS uses these clusters to Read/Write the data.

Hard Disk Capacity

As we know, there are several platters in the hard disk. Each Platter contains two R/W heads. There are several cylinders/tracks in the hard disk. Each track is divided into multiple sectors. Each sector has some size, but most sectors are 512 Bytes.

Some of the common storage capacities for Hard Disk Drives (HDDs) include 500GB, 1TB, 2TB, and 4TB.

Hard Disk Structure Numerical Questions

Let’s explain various numerical questions of hard disk structure which involve the following parameters

  • Hard disk size
  • platter size
  • bits required to represent the hard disk size
  • and many other things

Hard Disk Question: 01

Suppose there are eight platters in the hard disk drive. Each Platter has two surfaces so that 16-surfaces will be in the hard drive. Therefore, the required R/W head will also be 16. Suppose there are 1,024 cylinders and 128 sectors in each track. The sector size is 512 bytes. Then

  • Calculate Disk Size. 
  • How many bits are required to represent the disk size?

Part A – Solution

Size of Hard Disk = Cylinder x Heads X Sectors x Sector-Size 
= 1,024 x 16 x 128 x 512 Bytes
=  210 + 24 + 27 + 29 Bytes = 230Bytes = 2GB

Part B – Solution

 As 2GB = 2*230bits, To represent a 2GB hard disk, use 31 bits.

Hard Disk Question: 02

Find the size of a Single platter if the track size is 1KB and there are 1024 cylinders. 

Solution

There is a single platter, so the R/W head’s requirement will be 2.

Size of Platter = Cylinder x Heads X track size (because Track size = Sectors x Sector_Size)
= 210 + 21 + 210 Bytes
=21+220 Bytes = 2MB

Hard Disk Question: 03

Why does the sector number addressing CHS (cylinder Head Sector) start at sector one and not 0?

Solution 

For all translation modes, cylinder (C) =0, Head (H) =0, and Sector (S) =1, which is equivalent to Logical Block Address (LBA) =0. So, the value of the sector is always 1.

Disk Performance Parameters

Here are some key parameters used to assess the performance of a hard disk.

  • Seek Time: refers to the amount of time required by the read/write head to move to the requested track.
  •  Latency or rotational delay: refers to the time required for the requested sector to come under the read/write head. 
  • Data transfer rate is defined as the amount of data transferred per unit time, for example, 30 MB/sec.
  • Data transfer time is the duration required to move a specific amount of data from one device to another. it depends on the data transfer rate of the disk.
  • The average access time is calculated by following the formula

Average Access Time = Seek Time + Rotational Latency + Data Transfer Time

Logical structure

  • Generally, the logical division of a hard disk is divided into five basic terms.
  • MBR (Master Boot Record)
  • DBR (DOS Boot Record)
  • FAT (File Allocation Tables)
  • Root Directory
  • Data Area