Operating System of the file system (Chapter V)

First, file

1, the file system whose user-connector comprises the file name, type, attributes and operations of the files of

2, the file name: Use all operating systems allow one to eight strings consisting of characters ⺟

3, the file extension: Most operating systems support file names ⽀ Using divided into two parts separated by a dot after dot screen for part of the file name extension called

4, the file structure:

  • ⽆ structure byte sequence (stream files)

    

  • Recording a sequence of fixed ⻓  

  

 

  • Tree structure

   

 5, file type

 

 

 File access ****************************************** **** *************************************

 

 ********************************************** file attributes ** ************************************

 

 File operations ******************************************* **** **********************************

 

Second, directory

Of Contents is important to realize the file system data structures accessed by name; file systems typically provide directory or folder for log files, many systems directory itself is a file, directory name to access important data in the file system implemented structure.

There are two files of Contents ⻅ regular structure: attribute item of Contents, and placed on the node i

 

 1, the structure of Contents:

****************************************** single-level directory ***** *****************************

 

 ****************************************** two directories ***** **************************************

 

 *************************************** tree directory ******** *****************************************

 

 2, the path name: when recorded using a tree of Contents, require some files specified Remedies

 3, the operation of Contents

Third, to achieve the file system

实现⽂件

⽂件系统通常是以2的n次⽅个连续的扇区为单位对⽂件进⾏磁盘空间的分配, 把分配给⽂件的连续扇区构成的磁盘块称为簇

 

 ⽂件存储的4种常⽤⽅式:

*********************************************************连续分配***************************************

把每个⽂件作为⼀连串的数据块放在磁盘上

 

 **********************************************磁盘链接表**********************************************

 

 *******************************************内存的链接分配表****************************************

不适合大容量的磁盘:磁盘容量大,内存连接表就越大,占用内存。

 

 

 

 *******************************************************i-结点***********************************************

 

 ************************************************i-结点 计算题*******************************************

 

 *******************************************计算题 2*****************************************************

 

 

2、实现⽬录

*********************************************CP/M(一种操作系统)中的目录************************************************

 

*********************************************MS-DOS中的目录***********************************************************

 

 

************************************************UNIX中的目录******************************************************

UNIX中采用的目录结构非常简单,每个目录项只包含一个文件名及其i结点 号。有关文件类型、长度、时间、所有者和簇号等信息都放在i结点。

 

3、磁盘空间管理

磁盘空间管理是文件系统的重要功能,包括记录空闲磁盘信息、设计文件的 存放方式,以及规定文件系统的簇大小等内容

 

4、记录空闲块的方式

 

 

Guess you like

Origin www.cnblogs.com/jalja/p/11469585.html