翻译windows internals 第12章文件系统(持续更新)

本文介绍了Windows文件系统的基础知识,特别是FAT12、FAT16和FAT32的区别。FAT12和FAT16的根目录预设了256个目录条目限制,而FAT32则没有此限制。文件系统中每个目录项占用32字节,包含文件名、大小、起始簇和时间戳信息。对于长文件名,会额外分配目录条目存储。FAT32通过32位簇标识符支持最大16TB的卷,但在Windows系统中限制为32GB。此外,FAT32的根目录不限尺寸且有启动扇区备份,提高了稳定性。

The root directory of FAT12 and FAT16 volumes is preassigned enough space at the start of a volume to store 256 directory entries, which places an upper limit on the number of files and directories that can be stored in the root directory. (There’s no preassigned space or size limit on FAT32 root directories.) A FAT directory entry is 32 bytes and stores a file’s name, size, starting cluster, and
time stamp (last-accessed, created, and so on) information. If a file has a name that is Unicode or that doesn’t follow the MS-DOS 8.3 naming convention, additional directory entries are allocated to store the long file name. The supplementary entries precede the file’s main entry. Figure 12-4 shows a sample directory entry for a file named “The quick brown fox.” The system has created a THEQUI~1.FOX 8.3 representation of the name (that is, you don’t see a “.” in the directory entry because it is assumed to come after the eighth character) and used two more directory entries to store the Unicode long file name. Each row in the figure is made up of 16 bytes.
FAT12和FAT16卷的根目录在卷的开始处预留了足够大的空间来存放256个子目录的条目,这里设置了可以存放在根目录中的文件和子目录的上限。(在FAT32文件系统中名没有并没有预留空间和尺寸上限)。FAT目录项为32字节,存储了文件的名字,大小,起始簇,时间戳信息。如果一个文件的名字是Unicode类型或者名不遵循MS-DOS8.3的命名传统,额外的目录项被分配存储长文件名,补充的条目在文件主条目的前面,图12-4显示文件名为“the quick brown fox”的目录项。系统已经创建文件名为THEQUI~1.FOX
8.3的文件(你并没有在目录项中看到“.”,因为它被假设在第8个字符之后),使用额外的两个目录项来存储Uincode长文件名,每一行都有16个字节。
这里写图片描述
FAT32使用32位的簇标识符但是保留了高四位,因此实际上簇标识符是28位,因为FAT32簇大小可以是64KB的大小,FAT32理论上可以寻址16TB的卷。尽管windows系统使用FAT32大小更大的卷(创建在其它操作系统中),他限制了FAT32卷最大为32GB。FAT32 高位潜在的簇数字使它比FAT16管理磁盘更加有效,它可以处理高达128GB的卷大小,该卷的簇大小为512字节,表12-2显示FAT32卷的默认磁盘簇大小。
这里写图片描述
除了高位的簇限制,其他FAT32比FAT12和FAT16更好的地方包括:FAT32的更目录没有预先存储在卷的 预先定义的位置上,根目录并没有在尺寸上设置界限,FAT32基于稳定性存储了启动扇区的备份。FAT32和FAT16都限制了文件的最大尺寸是4GB,因为子目录存储文件大小是32位值。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值