Partitions and File Systems

advertisement
Partitions and File Systems
November 1 (Day); October 24 (Night)

Hard Drive Partitions:
o
It is too difficult to store data on the basis of those cylinders, heads, and sectors that
we talked about during the last lecture (p. 203).
o
A partition is a chunk of a hard drive used to structure and organize data on a hard
drive (p. 203).
o
The concept of partitions was originally developed to allow multiple operating
systems, each with different file systems, to co-exist on a single hard drive.
o
Today, partitions are used to divide a single drive into multiple volumes used by the
same operating system.
o
A computer learns about its partitions during booting. The boot sector is a specific
place on the hard drive that stores all partition information. It consists of the
following information (p. 204):

The Master Boot Record (MBR) which is a small program that assists the
operating system in finding the correct partition.

The partition table contains entries for up to four partitions. It contains
information such as the beginning and ending sector on the hard drive
and how many sectors are used by the partition.

Types of Partitions:
o
There are two types of partitions: primary and extended.
o
The primary partition is the more common type (p. 204).
o

The primary partition is bootable.

The operating system is installed on the primary partition.

Windows assigns the drive letter C: to the primary partition.

Generally, there can only be one primary partition.
Extended partitions are optional (p. 204).

An extended partition is not bootable.

Extended partitions can not be assigned drive letters directly.

Extended partitions are divided into logical drives. Logical drives are
assigned drive letters.

An extended partition can be broken into 23 logical drives (D: - Z:). Each
appearing as separate drive letter to the operating system.
o
Partitioning:

Partitioning is the process of creating partitions. You must have a
partition on the hard drive before you install an operating system (p.
216).

FDISK is the manual partitioning program used the most often. FDISK
is a small command-line based program that can be found on most
Windows boot disk (p. 216).

File Systems:
o A file system defines the name of the files and keeps track of which sector stores
which file. It also allows you to create folders so that you can organize your files. In
short, the file system helps you organize your data (p. 205).
o
Clusters:

Rather than storing information about each sector on a hard drive, the file
system stores information about groups of sectors known as clusters.
Cluster Size = # of Sectors * 512 bytes OR
Cluster Size = # of Sectors * .5 KB

The smallest space that one file can occupy is one cluster. For example,
if a file is even one bit larger than the size of one cluster, the file will
take up two clusters.
o
Types of File Systems:

The File Allocation Table system uses two tables to store information
about clusters: FAT Directory, FAT Table.


The FAT Directory stores information about each file.

The FAT Table stores information about each cluster on the disk.
FAT16 uses 16 bits to store the address of each cluster (p. 205).

It can address a maximum of 65,536 (216) clusters.

Supports partitions of up to 2 GB.

Used by DOS and Windows 3.1.
FAT16 Directory (Source: Upgrading and Repairing PCs – Eleventh Edition)
Filename
file1.txt
file2.txt
Starting Cluster
1000
1007
Size
4
3
Value
Meaning
First Available Cluster
……
In use, points to next cluster
In use, points to next cluster
In use, point to next cluster
End of File
Cluster available
Cluster available
Cluster available
In use, points to next cluster
In use, points to next cluster
End of File
……
Last Available Cluster
FAT16 Table
Cluster #
00001
……
01000
01001
01002
01003
01004
01005
01006
01007
01008
01009
……
65536
……
1001
1002
1003
EOF
0
0
0
1008
1009
EOF
……


FAT32 uses 32 bits to store the address of each cluster (p. 205).

It can address a maximum of 4,294,967,296 (232) clusters.

Supports partitions of up to 32 GB.

Used by Windows 95, Windows 98, and Windows ME.
NTFS is the newest file system (p. 205).

NTFS is a very secure file system with a lot of advanced
features.


Supports partitions of up to 2 TB.

Used by Windows NT, Windows 2000, and Windows XP.
If we can make our hard drives larger by increasing the number of entries
in the FAT table, why is there not a FAT64 or a FAT128?

Remember that the FAT table is loaded into memory at bootup.
If we dedicated 128 bytes, for instance, to each cluster on our
hard drive, the FAT table will become very large and overuse
our memory.

If we are limited in the number of clusters that we can use in our FAT
table, how might we increase the capacity of our hard drive?

We increase the size of clusters, so that more data is stored for
each entry in the FAT table.

Cluster Waste:

Wasted space is the problem of increasing the size of your
clusters. To demonstrate this point, pretend that you have a file
that is 10 KB in size.
o
If you have a cluster size of 32 KB, then you will waste
22 KB of space to store this file.
o
If you have a cluster size of 16 KB, then you will waste
only 6 KB of space to store this file.

Because some files waste a little bit of a cluster and some files
waste a lot of a cluster, each file is assumed to waste one-half of
a cluster.

Here’s the calculation:
Cluster Waste = # of Files * (Size of cluster * .5)

Pretend that you have 5000 files on your hard drive and are using
cluster sizes of 16 KB.
Cluster Waste = 5000 * (16 KB * .5)
= 5000 * (8 KB)
= 40,000 KB

Pretend that you have 5000 files on your hard drive and are using
cluster sizes of 32 KB.
Cluster Waste = 5000 * (32 KB * .5)
= 5000 * (16 KB)
= 80,000 KB
Download