PoiNtEr->: Block Addressing In Hard Drives

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Friday, January 4, 2013

Block Addressing In Hard Drives





A hard disk drive (HDD) is a data storage device used for storing and retrieving digital information using rapidly rotating discs (platters) coated with magnetic material. An HDD retains its data even when powered off. Data is read in a random-access manner, meaning individual blocks of data can be stored or retrieved in any order rather than just sequentially. An HDD consists of one or more rigid ("hard") rapidly rotating discs (platters) with magnetic heads arranged on a moving actuator arm to read and write data to the surfaces.
Following two schemes are used to address the location on hard drive which store some useful information

1:)Logical block addressing (LBA) is a common scheme used for specifying the location of blocks of data stored on computer storage devices, generally secondary storage systems such as hard disks.
LBA is a particularly simple linear addressing scheme; blocks are located by an integer index, with the first block being LBA 0, the second LBA 1, and so on.
LBA and CHS equivalence with 16 heads per cylinder
LBA ValueCHS Tuple
0   0, 0, 1
1   0, 0, 2
2   0, 0, 3
62   0, 0, 63
945   0, 15, 1
1007   0, 15, 63
1008   1, 0, 1
1070   1, 0, 63
1071   1, 1, 1
1133   1, 1, 63
1134   1, 2, 1
2015   1, 15, 63
2016   2, 0, 1
16,127   15, 15, 63
16,128   16, 0, 1
32,255   31, 15, 63
32,256   32, 0, 1
16,450,559   16319, 15, 63
16,514,063   16382, 15, 63

CHS (cylinder/head/sector) tuples can be mapped to LBA address with the following formula:
            LBA=((C \times HPC) + H ) \times SPT + S -1

where,
C, H and S are the cylinder number, the head number, and the sector number
LBA is the logical block address
HPC is the maximum number of heads per cylinder (reported by disk drive, typically 16 for 28-bit LBA)
SPT is the maximum number of sectors per track (reported by disk drive, typically 63 for 28-bit LBA)
LBA addresses can be mapped to CHS tuples with the following formula:

\begin{align}
C &= LBA \div ( SPT \times HPC )\\
H &= ( LBA \div SPT ) \, \bmod \, HPC \\
S &= ( LBA \, \bmod \, SPT ) + 1
\end{align}



                                                                                               

                                                                                                     
2:)Cylinder-head-sector, also known as CHS, was an early method for giving addresses to each physical block of data on a hard disk drive. In the case of floppy drives, for which the same exact diskette medium can be truly low-level formatted to different capacities, this is still true.
Though CHS values no longer have a direct physical relationship to the data stored on disks, virtual CHS values (which can be translated by disk electronics or software) are still being used by many utility programs.




       




           

No comments:

Post a Comment