什么是FAT?

File allocation table is a table for describing the allocation status of the clusters (the basic units of logical storage on a hard disk) in the file system and the link relationship between the file contents. You can simply say it is a table in which the file is located.

It is a vital part of the FAT file system, and it is also very important for the use of the hard disk. If the file allocation table is lost, the data on the hard disk cannot be located and cannot be used.

When a new file is written to the hard disk, the file is stored in one or more clusters that are not necessarily adjacent to each other; they may be fairly widely distributed across the disk. The operating system creates a FAT entry for the new file, recording the location of each
cluster and its order. When you read a file, the operating system reassembles the file from these clusters and places it as the entire file where you want to read it.

文件分配表是描述文件系统中簇(硬盘逻辑存储的基本单位)的分配状态和文件内容之间的链接关系的表。您可以简单地说它是描述文件所在位置的表。

它是FAT文件系统的重要组成部分,对硬盘的使用也非常重要。如果文件分配表丢失,则硬盘上的数据无法定位,无法使用

当有新文件写入硬盘时,文件存储在一个或多个不一定相邻的簇中;它们可能相当广泛地分布在整个磁盘上。操作系统为新文件创建一个 FAT 条目,记录每个簇的位置及其顺序。当您读取文件时,操作系统会从这些簇中重新组合文件,并将其作为整个文件放置在您要读取的位置。

那么你就可以看出FAT文件系统是以其组织方式命名的——文件分配表。它是微软在 1977 年发明的用于磁盘管理的文件系统,在 NTFS 发布之前,它被用作 Windows 中的默认文件系统。

FAT系统说明

The FAT file system roughly divides the space of the logical disk into four parts, which are boot sector, file allocation table area, root directory area and data area.


引导扇区:也称为保留扇区,位于第一部分。 它包括:操作系统启动计算机所需的引导加载程序代码、描述驱动器组织方式的主引导记录 (mbr) 的分区表以及描述驱动器物理轮廓的 BIOS 参数块 (BPB)。 数据存储量。

FAT 区:这部分通常包含文件分配表的两份副本,用于冗余检查和指定如何分配簇。

根目录区:该区是一个包含目录和文件信息的目录表。 它仅适用于 FAT12 和 FAT16。 它具有固定的最大大小并在创建时进行配置。 FAT32 通常将根目录存储在数据区中,因此可以根据需要进行扩展。

数据区:这是存储目录数据和现有文件的地方。 它占据了磁盘上的大部分分区。

文件分配表的类型

The general types of file system (FAT12, FAT16 or FAT32) are
determined by the width of the cluster entries in the FAT.

我们提到文件分配表是一个集群列表,用于显示存储数据的位置。 文件系统的一般类型(FAT12、FAT16 或 FAT32)由 FAT 中簇条目的宽度决定。

FAT12 (12-bit File Allocation Table)

The first version of the FAT file system is FAT12 which is the oldest type of FAT that uses a 12 bit file allocation table entry. It was introduced in 1980. FAT12 supports up to 16 MB of partition size using a 4 KB cluster, or 32 MB using an 8 KB cluster, the max file is limited by the partition size. It is almost never used at all since it is too small.

FAT 文件系统的第一个版本是 FAT12,它是最古老的 FAT 类型,它使用 12 位文件分配表条目。 它是在 1980 年推出的。FAT12 使用 4 KB 集群支持最多 16 MB 的分区大小,或使用 8 KB 集群支持 32 MB,最大文件受分区大小限制。 它几乎从未使用过,因为它太小了。

FAT16 (16-bit File Allocation Table)

The second implementation of FAT was FAT16, which introduced the 16-bit file allocation table entry for the first time in 1984.

Depending on the operating system and cluster size used, the FAT16 formatted drive can have a maximum drive size of 2 GB to 16 GB, the latter one which is only available in Windows NT 4 with a 256 KB cluster.

The file size on the FAT16 drive is up to 4 GB when Large File Support is enabled, or 2 GB if not. However, basically no one is using it now, because no one has a partition as small as 4GB.

FAT 的第二个实现是 FAT16,它在 1984 年首次引入了 16 位文件分配表条目。

根据所使用的操作系统和簇大小,FAT16 格式的驱动器的最大驱动器大小为 2 GB 到 16 GB,后者仅在具有 256 KB 簇的 Windows NT 4 中可用。

启用大文件支持时,FAT16 驱动器上的文件大小最大为 4 GB,否则为 2 GB。 不过现在基本没人用了,因为没人有4GB这么小的分区。

FAT32 (32-bit File Allocation Table)

FAT32 is the latest version of the FAT file system which was introduced in 1996. Now you say FAT often means FAT32. It supports max partition size up to 2 TB or even as large as 16 TB with 64 KB clusters. But in fact, you can only set it up to 32GB in Windows Disk Management.

The biggest single file size on FAT32 is 4 GB, that’s why you will fail if you create a file larger than 4GB in FAT32.

In summary, the FAT file system is considered to have limited performance because it is not complicated, so it is supported by almost all personal computer operating systems. Its good compatibility makes it an ideal floppy and memory card file system, as well as for data exchange in different operating systems.

However, FAT has a serious drawback: when writing new data after deleting a file, FAT does not organize the file into a complete fragment and then writes it. After long-term use, the file data will be gradually dispersed, and the reading and writing speed will be slowed down. Defragmentation is a workaround, but it must be reorganized frequently to maintain the validity of the FAT file system.

FAT32 是 FAT 文件系统的最新版本,于 1996 年推出。现在你说 FAT 通常意味着 FAT32。它支持高达 2 TB 的最大分区大小,甚至高达 16 TB 的 64 KB 集群。但实际上,您只能在 Windows 磁盘管理中将其设置为 32GB。

FAT32 上的最大单个文件大小为 4 GB,这就是为什么在 FAT32 中创建大于 4GB 的文件会失败的原因

综上所述,FAT文件系统被认为性能有限,因为它并不复杂,所以几乎所有的个人计算机操作系统都支持它。其良好的兼容性使其成为理想的软盘和存储卡文件系统,以及用于不同操作系统中的数据交换。

但是,FAT有一个严重的缺点:在删除文件后写入新数据时,FAT不会将文件组织成一个完整的片段然后再写入。长期使用后,文件数据会逐渐分散,读写速度会变慢。碎片整理是一种解决方法,但必须经常对其进行重组以保持 FAT 文件系统的有效性。

总结

  • 区分FAT表和FAT系统,FAT表只是FAT系统的一部分
  • FAT系统会形成磁盘碎片

参考

File Allocation Table (FAT): What Is It? (Its Types & More)

文件分配表(File Allocation Table)入门相关推荐

  1. mysql出现“Incorrect key file for table”解决办法

    今天mysql突然出现以下错误: mysql> select * from test;  ERROR 1034 (HY000): Incorrect key file for table 'te ...

  2. Mongodb 故障分享 初始化时errmsg : exception: new file allocation failure 并且长时间处于STARTUP2...

    Hello,大家下午好. 近几天的项目有点赶,所以耽误了更新.现在给大家分享下,在安装mongodb的过程中,遇到的故障一则.其实很小白的问题,当时遇到这个问题的时候比较心慌,浪费了很多时间,跟大家分 ...

  3. mysql old key files_mysql出现“Incorrect key file for table”解决办法

    本文来自: https://www.cnblogs.com/zjoch/archive/2013/08/19/3267131.html 今天mysql突然出现以下错误: mysql> selec ...

  4. ERROR 126 (HY000) at line 1: Incorrect key file for table '/tmp/#sql_7b09_0.MYI'; try to repair it

    1.问题背景 我在slelect一个数据量很大的merge表时,并同时将select结果集insert到另外一张表中,报了如下错误: ERROR 126 (HY000) at line 1: Inco ...

  5. mysql Incorrect key file for table ‘/tmp/#sql_xxxx_0.MYI‘; try to repair it

    查看information_schema的COLUMNS表,但是出现如下问题: root:information_schema> select * from COLUMNS; ERROR 126 ...

  6. MySQL异常:Incorrect key file for table '/tmp/#sql_37b_1.MYI'; try to repair it

    今天突然收到报警短信,提示网站有一个模块出现异常,当时我就方了 检查了下日志,发现异常如下: Caused by: java.sql.SQLException: Incorrect key file ...

  7. 重启服务器后mysql表损坏 Incorrect key file for table ‘.\axxxx.MYI‘; try to repair it“,“tourl“:““,.....

    重启系统后mysql表损坏 Incorrect key file for table '.\axxxx.MYI'; try to repair it","tourl":& ...

  8. [error] [mysql]:1034 Incorrect key file for table 'table_name'; try to repair it

    [error] [mysql]:"1034 Incorrect key file for table 'table_name'; try to repair it" 现象描述: m ...

  9. mysql中大数据表alter增加字段报错:1034 Incorrect key file for table 'table_name'; try to repair it...

    mysql中大数据表alter增加字段报错:"1034 Incorrect key file for table 'table_name'; try to repair it" 现 ...

最新文章

  1. 如果成为一名高级安卓开发_什么是高级开发人员,我如何成为一名开发人员?
  2. 一张图看懂encodeURI、encodeURIComponent、decodeURI、decodeURIComponent的区别 一、这四个方法的用处 1、用来编码和解码URI的 统一资源标识符
  3. swing中怎么在原来图片的基础上切换第二张图片_狂戳痛点!毕业论文图片和公式排版!...
  4. eclipse中动态web项目快捷方式设置
  5. img disabled可以用什么替代_本特:马内不可替代,菲米是粘合剂,萨拉赫可以用姆巴佩桑乔替代...
  6. 操作系统(概述、组成)、用户态、内核态
  7. jzoj3512-游戏节目【树状数组,双向dfs】
  8. JAVA单向链表实现
  9. android:layout 冒号,android-json解析及简单例子(补汉6个汉字字).pdf
  10. java中线程调度遵循的原则_Java 多线程(三) 线程的生命周期及优先级
  11. 微软MSDN提供的Visual Studio开发文档
  12. AIDA64自动监控计算机硬件工作情况
  13. python flag格式_Python 字符串格式化之 printf-style
  14. log4j.xml的实用例子
  15. 计算机的数字音乐,论数字音乐作曲
  16. 练习4-7 求e的近似值
  17. 3.5mm耳机、麦克风的插座、插头定义
  18. 代码传奇 | 身价10亿的程序员 雷军当年也为他打工——WPS之父 求伯君
  19. DNS系统概述及重要性
  20. Centos7下支付宝控件安装

热门文章

  1. Python numpy 多维数组切片
  2. dataframe 上下拼接_pandas DataFrame 的横向纵向拼接组合
  3. shell 写文件写入内容
  4. vue怎么实现手风琴效果_Vue中使用v-for制作动态手风琴效果
  5. 计算机与信息处理基础知识教案,高效的信息处理工具——计算机基础知识教案...
  6. oracle改成归档模式_将Oracle数据库改为归档模式并启用Rman备份
  7. linux内核中union,Linux上的Union mount
  8. oracle取字段第三位字符,oracle截取字符串(截取某个字符前面的字符串)
  9. java for while do-while 循环的经典题
  10. mysql半同步模式_MySQL 半同步复制模式的实现