Thursday, May 30, 2013

Low-Level vs High-Level Formatting

Many people do not distinguish low-level formatting (also called physical formatting) from high-level formatting (also called logical formatting).
Even though hard drives can be very small, they still contain millions of bits and therefore need to be organized so that information can be located. This is the purpose of the file system. The surface of each cylinder, which is originally uniform, is divided during formatting (by divided we mean of course that the surface particles are magnetised...) into little parcels that can be more easily located.

Low-level formatting

The purpose of low-level formatting is to divide the disk surface into basic elements:
  • tracks
  • sectors
  • cylinders
Remember that a hard drive consists of several circular platters rotating around an axis and covered on either side by a magnetic oxide which, since it is polarised, can be used to store data.

The tracks are the concentric areas written on both sides of a platter.

Finally, these tracks are divided into pieces called sectors.

There are millions of tracks and each has around 60 to 120 sectors.
cylinder refers to all the data located on the same track of different platters (i.e. vertically on top of each other) as this forms a "cylinder" of data in space.

Physical formatting therefore consists in organizing the surface of each platter into entities called trackers and sectors, by polarising the disk areas using the write heads. Tracks are numbered starting from 0, then the heads polarise concentrically the surface of the platters. When the head goes from one track to the next, it leaves a gap. Each track is itself organized into sectors (numbered starting from 1) and separated by gaps. Each of these sectors starts with an area reserved for system information called a prefix and ends with an area called a suffix
The purpose of low-level formatting is therefore to prepare the disk surface to receive data (and therefore does not depend on the operating system) and to mark "defective sectors" using tests performed by the manufacturer.
When you buy a hard drive, it has already undergone low-level formatting. 

High-level formatting

Logical formatting occurs after the low-level formatting. It creates a file system on the disks that will allow an operating system (DOS, Windows 95, Linux, OS/2, Windows NT, ...) to use the disk space to store and access files.
Operating systems use different file systems, so the type of logical formatting will depend on the operating system you install. So, if you format your disk with a single file system, this naturally limits the number and type of operating systems that you can install (in fact, you can only install operating systems that use the same file system).
Fortunately, there is a solution to this problem which is to create partitions. Each of the partitions can effectively have its own file system, and you can therefore install different types of operating systems.