Final Year Project:
Using Linux Filesystems Under Windows
Chris Bryden
BEng. Electronics and Software Engineering
School of Computer Science
University of Birmingham
3
2. Hard Disk Structure
This section aims to outline several concepts related to hard disk access
that are necessary to understand the low level disk access routines that provide
the foundations for accessing any filesystem on disk.
2.1 Physical Disk Access: Cylinders, Heads and Sectors
Information stored on a disk is divided into small parts (usually 512 bytes
for hard disks) called sectors. When a disk I/O operation is carried out this is the
smallest amount of information that can be read or written in one go. These
sectors are known as physical sectors. A hard disk consists of one or more
platters on which information is
stored.
These
are
magnetically
coated disks stacked one on top of
another on a central rotating shaft.
These platters are read by a head
suspended a fraction of a millimetre
away from both sides of each platter.
The head is free to move across the
platter from its centre to its outer
edge. The sectors are arranged in
concentric circles called tracks on
both sides of the platters. A cylinder
describes all tracks at a given head
position across all platters.
A three figure reference is
used to uniquely identify each sector
on a disk: a cylinder number, head
number and sector number (CHS). The cylinder number gives the cylinder to be
read, and the head number gives the head, it can be seen that these two
numbers are sufficient to position the correct head above the desired cylinder.
The sector number then gives the individual sector to be read from the disk. It
should be noted that although these are referred to as physical sectors, the
cylinder, head and sector numbers no longer relate to the physical position of the
sector on modern hard disks, as internal translation is carried out to overcome
certain design limitations.
So, to conclude, reading or writing a physical sector on a disk involves
specifying its CHS co-ordinates. This level of disk access pays no attention to
what is actually on the disk, this must be done by the operating system or user
program.