Question:
How FAT (file allocation table)file works?
love to all
2010-04-25 10:29:01 UTC
and what is the purpose of this file,or say what this table functions?
Three answers:
husoski
2010-04-25 11:23:05 UTC
FAT is the structure used on the original IBM PC to organize data on floppy disks and later on hard drives. It's been expanded over the decades, first to handle tree-structured directories and hard drives (not supported until DOS 2.0) and later for ever-increasing hard drive sizes.



The name does stand for File Allocation Table, and that's the major (but not the only) data structure. It is really an array, with one element for each cluster. That element describes whether the cluster is available, marked as bad, or part of an allocated file. If it's part of an allocated file, the entry value is either the FAT index of the next cluster in the file, or it's a special marker to say that it's the last (and maybe only) cluster of the file. The directory is a different structure, with an entry for each file and containing the file name, attribute information and the index of the first cluster in the file.



That's the general idea. You can look at Wikipedia for more detail:



http://en.wikipedia.org/wiki/File_Allocation_Table
2016-04-14 05:18:13 UTC
The File Allocation Table - FAT - FAT32 The File Allocation Table of contents of a computer disk which tells what sectors are used for what file. The File Allocation Table ( also know as FAT, FAT16, and FAT32 ), is located in the master boot sector (first 63) of a bootable disk, floppy or hard. You visually cannot see this. The FAT follows the boot sector. The FAT file system revolves around the File Allocation Table for which it is named. Each logical volume has its own FAT, which serves two important functions: it contains the allocation information for each file on the volume in the form of linked lists of allocation units and it indicates which allocation units are free for assignment to a file that is being created or extended. The File Allocation Table ( FAT ) was designed and coded in Feb., 1976 by a kid named Bill Gates during a five day stay at the Hilton Hotel in Albuquerque. He developed it for a version of Basic that could store programs and data on floppy disks. The FAT design was incorporated by Tim Patterson in an early version of an operating system for the Intel 8086 chip. Gates bought the rights to the system, then rewrote it to create the first version of DOS. As a direct result, Gates is the richest man in America. The FAT file system is simple and reliable. It does not lose data because the computer crashed in the middle of an update. It does not use a lot of memory. It does, however, do a lot of extra administrative I/O to different areas of the partition. The directory is allocated at the start of the partition and it contains the table of free space. To write a new data set, or to add data to an old one, the disk arm must be constantly moved between the location of the directory and the place where the data is being written. Without optimization, a file can end up fragmented into many small pieces. When the system crashes, no data is lost. However, a FAT system may have removed disk area from the chain of free space, but may not have yet assigned it to any permanent new data set. The CHKDSK or SCANDISK utility examines the FAT table to determine the status of every record on disk. The records which are not part of any data set may be returned to the free space chain. After CHKDSK finds unallocated sectors, it asks you whether they should be turned into files. If you were in the middle of creating a new file and the system crashed, and the data that was lost is extremely valuable, you might answer Yes. If you do answer Yes you can scan the recovered file scraps for the information you lost. Otherwise, answer No and the unallocated space will be recycled as free space. If the FAT table (Table 1) becomes corrupted, or what is known as disk errors, there is a second (backup) table (Table 2) available for programs like Scandisk uses to fix the FAT (Table 1). A corrupt FAT can cause you to get the message "No Bootable Media". At this point if Scandisk cannot fix it you will need to format and start over. It is recommended that you Low Level Format and reinstall Windows. If the Windows Setup program complains about the drive, replace the drive with a new one. By design FAT supports a maximum of 64K allocation units . When the disk partition is 32 megabytes or less, an allocation unit is a 512 byte sector. However, as the disk gets larger, the units get larger. A 64 megabyte disk partition has 1K allocation units. A 128 meg partition has 2K units. A 256 meg partition has 4K allocation units. Each file occupies one or more allocation unit. As the allocation units get larger, any large number of small files wastes a lot of disk space. The classical FAT directory structure (before NT and Windows 95) limits file names to eight characters with a three character extension (as in the name "AUTOEXEC.BAT"). This 8.3 naming convention was borrowed from earlier DEC minicomputers. The FAT structure also maintains for each file a set of attributes, S H R A (is it a System data set, should it be Hidden in the DIR display, should it be Archived next time the disk is backed up, is it Read-only). There is also a data and time stamp when the file was last changed. OS/2 allows a FAT file to have additional Extended Attributes. Since there is no room for these attributes in the FAT directory, OS/2 creates a separate hidden file on the disk volume named "EA DATA. SF" and stores the information there. FAT has been around for a long time, so its problems have been carefully studied. Every version of DOS and Windows (except NT) comes with a DEFRAG program that will reorganize the directory, files, and free space to maximize performance. Effective use of RAM as a disk cache can address some of the I/O problems. Our QikFix program has a Memory Utilization program to help optimize the swap file and a Cache utility to optimize the disk cache.
Amishera A
2010-04-25 10:35:09 UTC
http://en.wikipedia.org/wiki/File_Allocation_Table


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...