|
Computer Basics Page 5
Hard Drives
As anyone who has worked with a computer will know, a hard drive is one of the most important parts of your computer. Although it is a complex piece of hardware and installing one can sometimes be a chore, a little knowledge and practice can make it very easy. The process of replacing or installing hard drives can make you very nervous, but it doesn't have to.
This section of the site is written to help you decide on various types, learn how they work, and explain how to install a drive and conveniently prepare it for use.
File Structure Basically, tracks, sectors, and cylinders are the divisions of the hard drive platters where information is stored. A track is a concentric ring around the platter containing information. Since a hard drive typically has two or more platters, each storing data on both sides, these tracks line up on each platter. The identically positioned tracks on each platter are called cylinders. To better help you understand a track and cylinder, let's take a target used for target practice. You have a bunch of concentric circles, each bigger than the other, all sharing the same center, which is the bulleye. Now, each of the spaces between circles is similar to a track on a hard disk platter. Now, if you stack several of these targets on top of each other, each exactly the same, you can form a cylinder by simply taking a track and moving it down through all of the same tracks on the targets below.
Since typical hard drives are too large to deal with by the track, each track is divided into sectors. Its not that a track could not be dealt with, but since a track can hold as much as 50K sometimes, this would not be practical for storing large files. So, sectors are basically slices of the track. Different drives have different numbers of sectors per track. Each sector is given an identity during formatting to aid the controller in finding what it needs in the appropriate sector. These sector numbers are written to the beginning and the end of each sector, called the prefix portion and the suffix portion respectively. These identities take actual space on the hard drive. This explains why there is a difference between the capacity of an unformatted disk and a formatted one. On a floppy, the disk itself can hold 2M or so of data. When formatted and the identities placed, the capacity reduces to 1.44M. The same holds true for a hard drive. Drive manufacturers know this and publish formatted capacities to indicate drive size. There are two types of disk formatting: low-level and high-level. These both are done in the preparation of a hard drive for use. First, one low-level formats, then partitions, then high-level formats. A low-level format turns the platter from a blank slate to a divided slate. It defines the data areas: creates tracks, separates into sectors, and writes the ID numbers to each sector. Partitioning segments the drive into separate areas, each capable of running its own operating system. At this point, the file allocation tables (FATs) are dropped in. There are four types of file systems. -
FAT16. The is the file system used by DOS, Win95 and Win98, unless you convert. It supports an eight letter file name max, with a three letter extension under DOS. With Windows it supports up to 255 characters. With this system, a partition can be no larger than 2G.
-
FAT32. The 32 means 32-bit. This is an optional file system introduced with Windows 95 OSR-2. The file allocation units are stored as 32-bit numbers. The main advantage is that it allows for partitions of up to 2048G with smaller clusters. There is an option to convert FAT16 to FAT32 under Windows 98, and Windows NT5 will support it as an option.
-
High Performance File System (HPFS). An unpopular file system only used with OS/2 or early versions of NT. File names can be 256 characters and partitions can be 8G.
-
Windows NT File System (NTFS). Just like the HPFS, but only for NT.
FAT file system is most used in PC's today. The main problem with the original FAT was the inefficient use of disk space in defining clusters, or groups of sectors. The clusters were rather large, causing wasted space, because a small file would take up the entire cluster even though it could hold more. With FAT-32, 4 billion clusters are allowed, allowing 4K clusters. This significantly reduces disk waste.
The concept of FAT explains why one can run out of disk space even when you are not storing the capacity of files. For example, a 1G hard drive can run out of space with 160MB to spare. This is due simply to the FAT structure. With the original FAT, each cluster could hold 32K. But, if you are storing an 8K file, it still takes up a complete cluster, leaving the other 24K to waste. This is called slack. The only way around this is to re-partition the hard drive to two or more partitions. As the partition gets smaller the wasted space gets less. This, then is a tradeoff. The convenience of one partition, or the wasted disk space.
With FAT32, the wasted space is much less. Smaller clusters.
No matter what file system is used, a boot sector is written to the beginning of each disk, in the first sector. This sector contains the boot program which tells the system what to do when you turn it on.
In a high-level format, the operating system creates a structure needed to manage its files and data. In short, it creates a table of contents for the disk. While the low-level format gives a structure, the high-level format makes it readable and orderly. The DOS FORMAT command is only capable of high-level formatting on a hard disk. Most manufacturers sell drives already low-level formatted. Otherwise, a special utility is needed, usually provided by the manufacturer. Every computer we use today almost always has a hard drive. Hard Drives store information on little platters, which are simple Frisbees made of metal and coated with a magnetic substance. But how exactly is the data organized on those little platters? They do it with a thing called a file system. File systems are mostly operating system independent. Meaning, that almost every different operating system has a different type of file system. DOS/Windows is the most widely used Operating system in the United States and Europe, so it's file system is pretty much the standard that most other operating systems can at least read from. FAT The Dos/Windows file system is called File Allocation Table, or just FAT for short. There are 3 main type of the FAT file system. There is the 12bit FAT (FAT12) which is mainly used on floppy disks and REALLY small hard drives. Next is 16bit FAT (FAT16, or just FAT for short, being it's the most common) that is used for most hard drives with Windows 3.1, DOS, and the first version of Windows 95. And more recently, there is a 32bit FAT (FAT32). The differences between FAT12 and FAT16 aren't all that great. Whether a partition is going to use FAT12 or FAT16 is based mainly on it's size and version of DOS you are using. If the partition or disk is 16MB or less in size, it is going to use FAT12. If the Partition is between the size of 17MB and 2048MB, it will use the FAT16 file system. FAT uses clusters to store files in. Each cluster can only hold one file. The computer gives each cluster it's own address, just as each house in a neighborhood has it's own address. The cluster size is determined by the partition size. The cluster size is important because only one file can be stored in a cluster at a time. If you have a cluster that is 32KB big, and you are storing a file in it that is only 1KB, you are wasting 31KB of space on your hard drive. That's not very big when you look at it in terms of a 2GB hard drive, which has 2,097,152KB on the drive. But when you take a look and realize that there are no files that are perfectly going to fill up 32KB, you are wasting space with every file you have on your hard drive. How can this be avoided? The smaller the partition you have, the smaller the clusters you will have, and the less space you will have. Below is a table showing the exact cluster sizes you will get with partition sizes.
|
Partition size |
FAT Type |
Cluster size | |
< 16MB |
FAT12 |
4KB | |
17MB-32MB |
FAT16 |
2KB | |
33MB-256MB |
FAT16 |
4KB | |
257MB-512MB |
FAT16 |
8KB | |
512MB-1GB (1024MB) |
FAT16 |
16KB | |
1GB-2GB (2048MB) |
FAT16 |
32KB |
There is a slight problem with the FAT16 file system. What would you do if you had a Hard drive bigger than 2GB and wanted only 1 partition? FAT32 Solved that. It now supports drives up to 2048GB. 2048GB=2 terabytes. FAT32 also solved the problem of large cluster sizes. Below is another table, but this compares the size of a FAT32 with it's cluster sizes.
|
FAT32 Partition Size |
Cluster Size | |
< 260MB |
512bytes (˝KB) | |
260MB-8GB |
4KB | |
8GB-16GB |
8KB | |
16GB-32GB |
16KB | |
32GB-2048GB (2TB) |
32KB |
Unfortunately, The ability to make a 260MB FAT32 partition is limited due to the fact that the major program that makes partitions limits FAT32 drives to 512MB. NTFS NTFS (NT File system) is the major file system used by Microsoft's Windows NT. (Windows NT also supports the FAT file system). NTFS has features to improve reliability, such as transaction logs to help recover from disk failures. To control access to files, you can set permissions for directories and/or individual files. NTFS files are not accessible from other OSs such as DOS For large applications, NTFS supports spanning partitions or volumes which means files and directories can be spread out across several physical disks. This file system is mainly used by the Corporate and power users. HPFS High Performance File system is basically a mix between NTFS and FAT. While FAT offers the 8.3 file naming system (8 characters, then a dot, then 3 more characters) HPFS will support up to 256 characters in a file name. This file system is mainly used by OS/2, which is IBM's answer to Microsoft Windows. Ext2 Ext2 is a file system used by Linux. The main people that use it are those that run the many versions of the Linux Operating system
|