Sunday, August 16, 2009

Types of Disk Formatting

There are two types of formats to consider:

-Physical, or low-level

-Logical, or high-level

When you format a floppy disk, the DOS FORMAT command performs both kinds of formats simultaneously. To format a hard disk, however, you must perform the operations separately. Moreover, a hard disk requires a third step, between the two formats, in which the partitioning information is written to the disk. Partitioning is required because a hard disk is designed to be used with more than one operating system. Separating the physical format in a way that is always the same, regardless of the operating system being used and regardless of the high-level format (which would be different for each operating system), makes possible the use of multiple operating systems on one hard drives. The partitioning step allows more than one type of operating system to use a single hard disk or a single DOS to use the disk as several volumes or logical drives. A volume or logical drive is anything to which DOS assigns a drive letter.

Consequently, formatting a hard disk involves three steps:

1. Low-Level Formatting (LLF)

2. Partitioning

3. High-Level Formatting (HLF)

During a low-level format, the disk's tracks are divided into a specific number of sectors. The sector header and trailer information is recorded, as are intersected and inter track gaps. Each sector's data area is filled with a dummy byte value or test pattern of values. For floppy disks, the number of sectors recorded on each track depends on the type of disk and drive; for hard disks, the number of sectors per track depends on the drive and controller interface.

The original ST-506/412 MFM controllers always placed 17 sectors per track on a disk. ST-506/412 controllers with RLL encoding increase the number of sectors on a drive to 25 or 26 sectors per track. ESDI drives can have 32 or more sectors per track. IDE drives simply are drives with built-in controllers, and depending on exactly what type of controller design is built in, the number of sectors per track can range from 17 to 100 or more. SCSI drives essentially are the same as IDE drives internally with an added SCSI Bus Adapter circuit, meaning that they also have some type of built-in controller; and like IDE drives, SCSI drives can have practically any number of sectors per track, depending on what controller design was used.

Virtually all IDE and SCSI drives use a technique called Zoned Recording, which writes a variable number of sectors per track. The outermost tracks hold more sectors than the inner tracks do, because they are longer. Because of limitations in the PC BIOS, these drives still have to act as though they have a fixed number of sectors per track. This situation is handled by translation algorithms that are implemented in the controller.

Multiple Zone Recording:

One way to increase the capacity of a hard drive is to format more sectors on the outer cylinders than on the inner ones. Because they have a larger circumference, the outer cylinders can hold more data. Drives without Zoned Recording store the same amount of data on every cylinder, even though the outer cylinders may be twice as long as the inner cylinders. The result is wasted storage capacity, because the disk media must be capable of storing data reliably at the same density as on the inner cylinders. With older ST-506/412 and ESDI controllers, unfortunately, the number of sectors per track was fixed; drive capacity, therefore, was limited by the density capability of the innermost (shortest) track.

In a Zoned Recording, the cylinders are split into groups called zones, with each successive zone having more and more sectors per track as you move out from the inner radius of the disk. All the cylinders in a particular zone have the same number of sectors per track. The number of zones varies with specific drives, but most drives have 10 or more zones.

Another effect of Zoned Recording is that transfer speeds vary depending on what zone the heads are in. Because there are more sectors in the outer zones, and the rotational speed is always the same, the transfer rate will be highest.

Drives with separate controllers could not handle zoned recordings because there was no standard way to communicate information about the zones from the drive to the controller. With SCSI and IDE disks, it became possible to format individual tracks with different numbers of sectors, due to the fact that these drives have the disk controller built in. The built-in controllers on these drives can be made fully aware of the zoning that is used. These built-in controllers must then also translate the physical Cylinder, Head, and Sector numbers to logical Cylinder, Head, and Sector numbers so that the drive has the appearance of having the same number of sectors on each track. The PC BIOS was designed to handle only a single number of specific sectors per track throughout the entire drive, meaning that zoned drives always must run under a sector translation scheme.

The use of Zoned Recording has allowed drive manufacturers to increase the capacity of their hard drives by between 20 percent and 50 percent compared with a fixed-sector-per-track arrangement. Virtually all IDE and SCSI drives today use Zoned Recording.


Partitioning:

Partitioning segments the drive into areas, called partitions, that can hold a particular operating system's file system. Today, PC operating systems use four common file systems:

1)FAT (File Allocation Table). The standard file system used by DOS, Windows 95 (Non-OSR2 release), OS/2, and Windows NT. FAT partitions support file names of 11 characters maximum (8+3 character extension) under DOS, and 255 characters under Windows 95 or NT 4.0 or later versions. Under the standard FAT system, 12-bit or 16-bit numbers are used to identify allocation units, resulting in a maximum volume size of 2G.

2)FAT32 (File Allocation Table, 32-bit). An optional file system used by Windows 95 OSR2 (also called OEM Service Release 2 or Windows 95B) or later versions. Under FAT32, file allocation units are stored as 32-bit numbers, allowing for a single volume of 2T or 2,048G in size. FAT-32 support will likely be added to Windows NT in the future.

3)HPFS (High Performance File System). A file system that's accessible only under OS/2 and Windows NT 3.51 or earlier. DOS applications running under OS/2 or Windows NT, or via a network, can access files in HPFS partitions, but straight DOS cannot. File names can be 256 characters long, and volume size is limited to 8G.

4)NTFS (Windows NT File System). A UNIX-like file system that's accessible only under Windows NT. DOS cannot access these partitions, but DOS applications running under Windows NT or accessing a Windows NT volume from the network can. File names can be 256 characters long, and volume size is limited to 8G.
Of these four file systems, the FAT file system still is by far the most popular (and recommended). The main problem with the original 16-bit FAT file system is that disk space is used in groups of sectors called allocation units or clusters. Because the total number of clusters is limited to 65,536 (the most that can be represented with a 16-bit number), larger drives required that the disk be broken into larger clusters. The larger cluster sizes required cause disk space to be used inefficiently. FAT-32 solves this problem by allowing the disk to be broken up into over 4 billion clusters, so the cluster sizes can be kept smaller. Most FAT-32 and NTFS volumes use 4K clusters.

High-Level Format:

During the high-level format, the operating system (such as DOS, OS/2, or Windows) writes the structures necessary for managing files and data. FAT partitions have a Volume Boot Sector (VBS), a file allocation table (FAT), and a root directory on each formatted logical drive. These data structures (discussed in detail in Chapter 22, "Operating Systems Software and Troubleshooting") enable the operating system to manage the space on the disk, keep track of files, and even manage defective areas so that they do not cause problems.

High-level formatting is not really formatting, but creating a table of contents for the disk. In low-level formatting, which is the real formatting, tracks and sectors are written on the disk. As mentioned, the DOS FORMAT command can perform both low-level and high-level format operations on a floppy disk, but it performs only the high-level format for a hard disk. Hard disk low-level formats require a special utility, usually supplied by the disk-controller manufacturer.

0 comments:

Post a Comment