|
Previous | Table of Contents | Next |
This section reviews the hardware involved in computer startup and the logical organizations created for data storage and describes basic hardware building blocks, such as platters, heads, and tracks.
Both floppy disks and hard disks use the same phenomenon as a tape recorder to store data. A recording head magnetizes microscopic particles embedded in a surface; moving the particles past the magnetized head magnetizes the particles. In an audio or digital computer tape, the magnetic medium is a long string of plastic tape embedded with metal particles usually composed of iron oxide (rust). A floppy disk contains a single double-sided, magnetically coated platter onto which the microscopic iron particles are scattered. A metallic coil wrapped around the floppy drives read/write head electronically magnetizes these particles and organizes them into bits and other larger elements. The floppy drives head can write and read binary code, which consists of 1s and 0s, to and from the platter.
Formatting a floppy disk using DOS logically apportions its platter into the following elements:
Sectors are organized into clusters, which are disk space allocation units. Disk space is allocated to a file in whole clusters, each of which can consist of one or more sectors.
A 3 ½-inch high-density disk breaks down as follows:
18 sectors 80 tracks 512 bytes per sector = 1.44 MB
To efficiently access particular bytes on a disk, the operating system constructs directories and indexes that describe whats occupied, whats free, and what parts should never be used. This type of disk information is called the logical format.
DOS uses the same logical format for all disk types to organize the disk into four main areas: the boot record, the file allocation table (FAT), the root directory, and the data area. Hard disks have a fifth area, the partition table, which is described in the section Hard Drive Master Boot Record. (Although other operating systems might have different ways of logically arranging the information on a hard disk, we will focus our discussion primarily on DOS file management.)
The first sector on the floppy disk, track 0, head 0, sector 1, is reserved for the boot record, which contains the bootstrap routine, a machine language program designed to load the operating system. The bootstrap machine gets its name because it lets the computer essentially pull itself up by its bootstraps by reading and executing a short programthe boot codethat in turn launches the rest of the operating system.
The boot record also includes the BIOS parameter block (BPB), which identifies the floppy disks operating parameters, including the number of bytes per sector, sectors per cluster and track, and tracks per disk. The BPB also identifies sectors that are reserved for special purposes. By identifying disk architecture, the BPB allows an operating system to understand the format of the disk. If the BPB is corrupted, the floppy disk is unreadable.
The File Allocation Table (FAT) is a table of entries corresponding to each cluster on the disk. But it is more than a simple index. Each entry indicates whether its associated cluster is available, bad, or in use by a file. If the cluster is in use, the entry either points to the next cluster/FAT entry of the file, or indicates that the cluster is the last cluster of the file. The file directory also is responsible for this record-keeping task. It records both the length of each file and its starting cluster number, and the last FAT entry of each file is specially marked.
The FATs importance is such that DOS stores two identical copies of it. Whenever a file expands, DOS looks in the FAT to find and reserve the next free cluster.
The root directory is the last part of the system area of any DOS-formatted disk. Its the only directory in the system area, located immediately following the FAT. Each directory entry contains important information, such as the starting cluster number, size of each file, the file name associated with a starting cluster number, time and date fields, a file attributes field, and additional DOS-reserved bytes. The attributes represent special properties that can be applied to a file, such as read-only, hidden, system, and volume label.
Previous | Table of Contents | Next |