fat file allocation table. file systems the hard disks and other media provide the physical space...

15
FAT File Allocation Table

Upload: gyles-lyons

Post on 18-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

FAT

File Allocation Table

Page 2: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

File Systems• The hard disks and other media provide the physical

space for storing data.

• The file system provides the logical structure of organizing data on a physical drive.

• It provides the mechanism to locate data any where on a given disk or drive.

• It provides the hierarchical structure of directories in which individual files are stored.

Page 3: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

Different File Systems• The common file systems used by PC operating

systems today are:– Fat16 (file allocation table, 16 bit); Fat32 (32bit)– NTFS (Windows NT file system)– Ext2FS (Linux’s Second Extended File System)

Page 4: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

File Allocation Table• The most commonly used file systems today are

based on a file allocation table (FAT), which keeps track of the data stored in each cluster on a disk.

• The various FAT systems are:– FAT12 - used on volumes smaller than 16MB (Floppies)– FAT16 - used on volumes 16MB to 2GB (Hard Drives)– FAT32 - used on volumes 512MB to 2TB (Hard Drives)

Page 5: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

File Allocation Table• The file allocation table (FAT) is a list of

numerical entries - describing how each cluster in the partition is allocated.– Each cell of the table corresponds to a single

cluster on the disk.

– The number stored in that cell indicates where the next cluster of the file is located.

Page 6: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

File Allocation Table

Page 7: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

Clusters (Allocation Units)• A cluster is equal to one or more 512-byte sectors,

in a power of two.

• Having more than one sector per cluster reduces the size and processing overhead of the FAT and enables the operating system to run faster because it has fewer individual units to manage.

Page 8: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

Floppy Cluster Sizes

Page 9: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

Floppy 1.44MB Cluster Sizes Each cluster is made of one sector.

So there are 1.44M clusters

((2 x 80 x 18) - size of the FAT) clusters

Page 10: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

FAT16 Cluster Sizes

Page 11: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

FAT16 - Number of Clusters• FAT16 uses 16-bit entries to reference the clusters

in the partition,

• there can be a maximum of only

216

= 65,536 clusters.

Page 12: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

FAT16 Cluster Sizes• Cluster Size = size of the partition / 216

= size of the partition / 65,536

e.g., a 500MB partition will have cluster of size:

= 500MB / 65,536

= 512000 kB / 65,536

= 7.8125 kB

The cluster size will be multiples (1, 2, 4, 8, 16, 32, 64) of 512 Bytes.

So, the cluster size will 16 x 512 Bytes = 8kB.

Page 13: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

FAT32 Cluster Sizes

Page 14: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

FAT32 - Number of Clusters• FAT32 uses 32-bit entries to reference the clusters

in the partition,

• But there are a maximum of only

228

= 268,435,456 clusters.

Page 15: FAT File Allocation Table. File Systems The hard disks and other media provide the physical space for storing data. The file system provides the logical

FAT32 Cluster Sizes• Cluster Size = size of the partition / 221

= size of the partition / 2,097,152

A 8GB partition will have cluster of size:

= 8GB / 2,097,152

= 8 x 1024 x 1024 kB / 2,097,152

= 4 kBThe cluster size will be multiples (1, 2, 4, 8, 16, 32, 64) of 512 Bytes.

So, the next size is 8kB for the partitions 8GB ~16GB.