fat32文件系统详细介绍
A file can be "free formed", indexed or structured collection of related bytes having meaning only to the one who created it. Or in other words an entry in a directory is the file. The file may have attributes like name, creator, date, type, permissions etc.
文件可以是“自由格式的 ”,相关字节的索引或结构化的集合,仅对创建者有意义。 换句话说,目录中的条目就是文件。 该文件可能具有名称,创建者,日期,类型,权限等属性。
档案结构 (File Structure)
A file has various kinds of structure. Some of them can be :
文件具有各种结构。 其中一些可以是:
Simple Record Structure with lines of fixed or variable lengths.
具有固定或可变长度线的简单记录结构 。
Complex Structures like formatted document or reloadable load files.
复杂的结构,例如格式化的文档或可重新加载的加载文件。
No Definite Structure like sequence of words and bytes etc.
没有确定的结构,如单词和字节序列等。
文件属性 (Attributes of a File)
Following are some of the attributes of a file :
以下是文件的一些属性:
Name . It is the only information which is in human-readable form.
名字 它是唯一可读格式的信息。
Identifier. The file is identified by a unique tag(number) within file system.
标识符 。 该文件由文件系统内的唯一标记(编号)标识。
Type. It is needed for systems that support different types of files.
输入 。 支持不同类型文件的系统需要它。
Location. Pointer to file location on device.
位置 。 指向设备上文件位置的指针。
Size. The current size of the file.
大小 。 文件的当前大小。
Protection. This controls and assigns the power of reading, writing, executing.
保护 。 这控制并分配读取,写入,执行的能力。
Time, date, and user identification. This is the data for protection, security, and usage monitoring.
时间,日期和用户标识 。 这是用于保护,安全和使用情况监视的数据。
文件访问方式 (File Access Methods)
The way that files are accessed and read into memory is determined by Access methods. Usually a single access method is supported by systems while there are OS's that support multiple access methods.
文件的访问和读入内存的方式由Access方法决定。 通常,系统支持一种访问方法,而有些操作系统则支持多种访问方法。
1.顺序访问 (1. Sequential Access)
Data is accessed one record right after another is an order.
一条记录接一个顺序访问数据。
Read command cause a pointer to be moved ahead by one.
读取命令使指针向前移动一个。
Write command allocate space for the record and move the pointer to the new End Of File.
写命令为记录分配空间,并将指针移到新的文件尾。
Such a method is reasonable for tape.
这种方法对于磁带是合理的。
2.直接访问 (2. Direct Access)
This method is useful for disks.
此方法对磁盘很有用。
The file is viewed as a numbered sequence of blocks or records.
该文件被视为编号的块或记录序列。
There are no restrictions on which blocks are read/written, it can be dobe in any order.
对于读取/写入哪些块没有限制,可以按任何顺序进行。
User now says "read n" rather than "read next".
用户现在说“读n”而不是“下一个读”。
"n" is a number relative to the beginning of file, not relative to an absolute physical disk location.
“ n”是相对于文件开头的数字,而不是相对于绝对物理磁盘位置的数字。
3.索引顺序访问 (3. Indexed Sequential Access)
It is built on top of Sequential access.
它建立在顺序访问之上。
It uses an Index to control the pointer while accessing files.
它在访问文件时使用索引来控制指针。
什么是目录? (What is a Directory?)
Information about files is maintained by Directories. A directory can contain multiple files. It can even have directories inside of them. In Windows we also call these directories as folders.
有关文件的信息由目录维护。 一个目录可以包含多个文件。 它甚至可以在其中包含目录。 在Windows中,我们也将这些目录称为文件夹。
Following is the information maintained in a directory :
以下是目录中维护的信息:
Name : The name visible to user.
名称 :用户可见的名称。
Type : Type of the directory.
类型 :目录的类型。
Location : Device and location on the device where the file header is located.
位置 :设备和文件头所在设备上的位置。
Size : Number of bytes/words/blocks in the file.
大小 :文件中的字节/字/块数。
Position : Current next-read/next-write pointers.
位置 :当前的下一个读/下一个写指针。
Protection : Access control on read/write/execute/delete.
保护 :对读/写/执行/删除的访问控制。
Usage : Time of creation, access, modification etc.
用法 :创建,访问,修改的时间。
Mounting : When the root of one file system is "grafted" into the existing tree of another file system its called Mounting.
挂载 :将一个文件系统的根“移植”到另一个文件系统的现有树中时,称为挂载。
翻译自: https://www.studytonight.com/operating-system/file-system
fat32文件系统详细介绍