Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






File FAT32 system. Catalogue structure. FAT table.

A disk file allocation system from Microsoft that uses 32-bit values for FAT entries instead of 16-bit values used by the original FAT system, enabling partition sizes up to 2TB (terabytes). FAT32 first appeared in Windows 95B and is also found in Windows 98 and Windows NT 5.0.

In order to overcome the volume size limit of FAT16 while still allowing memory-constrained DOS real-mode code to handle the format, Microsoft decided to implement a newer generation of FAT, known as FAT32, with 32-bit cluster numbers, of which 28 bits are currently used.

In theory, this should support a total of approximately 268,435,438 (< 228) clusters, allowing for drive sizes in the range of 2 terabytes. However, due to limitations in Microsoft's scandisk utility, the FAT is not allowed to grow beyond 4,177,920 (< 224) clusters, placing the volume limit at 124.55 gigabytes, unless "scandisk" is not needed. Windows 2000 and XP placed a limit on the size of FAT32 partitions they can create at 32 GB, Microsoft says this is by design but does not explain why, and those versions of Windows are quite capable of reading and writing larger FAT32 partitions created by other means. FAT32 was introduced with Windows 95 OSR2. The many changes it incorporated made it a major improvement.

The maximum possible file size for a FAT32 volume is 4 GB minus 1 byte (232-1 bytes). For most users, this has become the most nagging limit of FAT32 as of 2005, since video capture and editing applications can easily exceed this limit, as can the system swap file.

32-bit File Allocation Table File System Not the same as VFAT or FAT, which are both 16-bit file systems.

The structure of the FAT

In the FAT file system related sectors disks are combined into units called clusters. The number of sectors per cluster is a power of two. For storage file assigned integer number of clusters (at least one), so that, for example, if the file size is 40 bytes, the cluster size 4KB actually busy information file is only 1% of space allocated for it. To avoid this, it is advisable to reduce the size of the clusters, and to reduce the amount of address information, and increase the speed of file operations - on the contrary. In practice, choosing a compromise. Since the capacity of the disk can not be expressed by a number of clusters is usually late in the present so-called volume. surplus sectors - «residue» smaller than the cluster which can not be discharged to the OS data storage.

FAT32 volume space is logically divided into three related areas:

The reserved area. Contains service structures that belong to the partition boot record (Partition Boot Record - PBR, to distinguish it from Master Boot Record - the master boot record disk PBR also often incorrectly called the boot sector) and are used to initialize the volume;

Table-of-FAT, containing an array of index pointers ("cells"), corresponding to clusters of data. Typically, the disc is two copies of the FAT table for reliability;



The data area where the actual contents of the file is written - that is the text of a text file, encoded image to image files, digitized sound for audio files, etc. - as well as the so-called. metadata - information on file and folder names, their attributes, timestamps, size, and location on the disk.

In FAT12 and FAT16 specially allocated area of ​​the root directory. It has a fixed position (immediately after the last element in the table FAT) and a fixed size in sectors.

If a file belongs to the cluster, then the corresponding cell contains next cluster of the same file. If the cell corresponds to the last cluster of a file, it contains a special value (FFFF16 for FAT16). Thus built up a chain of clusters file. Unused clusters in the table correspond to the zeros. The "bad" clusters (which are excluded from the process, for example, because of illegibility relevant field device) also corresponds to a special code.

When a file is deleted the first character of the name is replaced with a special code E516 and the cluster chain in the file allocation table is cleared. Since the information about the size of the file (which is located in the directory next to the file name), however, remains intact, if clusters of a file on the disk sequentially and they have not been overwritten with new information can recover deleted file.

Table FAT

The next important volume structure FAT - it is the very table FAT, which occupies a separate logical area. It specifies a list (chain) of the clusters, which host the files and folders of the volume. Between clusters and index pointers tables have a one-to-one correspondence - N-th index corresponds to the cluster with the same number. The first cluster of data is assigned a number 2. The value of the index corresponds to the index of the corresponding cluster. The following states:

cluster free - reset pointer;

cluster file is busy and is not the last cluster file - pointer - the number of the next cluster file;

cluster is the last cluster of the file - the index contains a label EOC (End Of Clusterchain), the value of which depends on the version of FAT: FAT12 to mark EOC is any value greater than or equal to 0x0FF8 (default 0x0FFF); to FAT16 - greater than or equal 0xFFF8 (by Default 0xFFFF); for FAT32 - any value greater than or equal 0x0FFFFFF8 (default 0x0FFFFFFF);

cluster is damaged - the index contains a label whose value for FAT12 0x0FF7, for FAT16 0xFFF7 and FAT32 0x0FFFFFF7. Not bad cluster file system can be used for data storage, the corresponding indexes are not affected by the volume is formatted, when all other indicators are set to zero;

cluster is reserved "for future standardization" - contains a pointer to a value greater than CountofClusters, but less bad cluster marks (that is, until 0xFFF6 inclusive for FAT16). In this case, the cluster is not corresponding to any real data, it is considered busy and skipped when looking for free, but no other information about him is available.

Clusters 0 and 1 are reflected FAT otherwise. The index pointer corresponding to the zero cluster (the first pointer table FAT), contains the value BPB_Media in the lower 8 bits, the remaining bits are set to 1. For example, if BPB_Media = 0xF8 (HDD), FAT [0] = 0x0FFFFFF8 for FAT32. Thus, formally FAT [0] = EOC, which is used in the processing of zero size files (see below).

Second reserved pointer, FAT [1], when formatting is set to mark EOC. In FAT12 it is not used any more, and in FAT16 and FAT32 upper two bits of the pointer can contain a note of the need to check the volume (so-called. "Dirty bit"), at what all the other bits are set to 1.


Date: 2015-01-29; view: 1379


<== previous page | next page ==>
Attributes of the file. Temporary characteristics. File length. | File NTFS system. Principles of construction.
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.008 sec.)