## Find the number of disk blocks in a given hard disk in DBMS data storage

__Question:__
Following are the characteristics of a hard disk;
Sector size of 512 bytes, 16 sectors per track, 16384 tracks per surface, 4
double sided platter, and 4096 bytes per block. Find the number of blocks in
that disk.

__Solution:__
Let us find the total capacity of given disk in bytes.

A track has 16 sectors each of which is 512 bytes in size.

Capacity of a track =
Sector size * Number of sectors

= 512 * 16 = 8192 bytes.

There are 16384 tracks in a surface of a disk platter.

Capacity of one surface of disk platter = No. of tracks
* Capacity of a track

=
16384 * 8192 = 134217728 bytes

Capacity of one double sided platter = 134217728 * 2 (2
sides per disk)

=
268435456 bytes

There are 4 double sided platters.

Capacity of the hard disk = Capacity of one disk
platter * No. of disk platters

=
268435456 * 4

=
1073741824 bytes

It is given that the block size is 4096.

The number of blocks = (capacity of the hard disk) / (block
size)

=
1073741824/4096 = 262144 blocks

The hard disk with the given characteristics will have
262144 blocks.

*************

Go to Solved Exercises in DBMS page

find number of blocks in a hard disk drive

calculate the size of hard disk in bytes

find the capacity of a disk platter