《文件系统结构》ppt课件

上传人:tia****nde 文档编号:70554866 上传时间:2019-01-17 格式:PPT 页数:54 大小:1.58MB
返回 下载 相关 举报
《文件系统结构》ppt课件_第1页
第1页 / 共54页
《文件系统结构》ppt课件_第2页
第2页 / 共54页
《文件系统结构》ppt课件_第3页
第3页 / 共54页
《文件系统结构》ppt课件_第4页
第4页 / 共54页
《文件系统结构》ppt课件_第5页
第5页 / 共54页
点击查看更多>>
资源描述

《《文件系统结构》ppt课件》由会员分享,可在线阅读,更多相关《《文件系统结构》ppt课件(54页珍藏版)》请在金锄头文库上搜索。

1、Chapter 11: File-System Implementation,Chapter 11 File System Implementation,11.1 File-System Structure 文件系统结构 11.2 File-System Implementation 文件系统实现 11.3 Directory Implementation 目录实现 11.4 Allocation Methods 分配方法 11.5 Free-Space Management 空闲空间管理 Exercises,11.1 File-System Structure 文件系统结构,I/O tran

2、sfers between memory and disk are performed in units of blocks. 内存与磁盘间的I/O传输以块为单位 Each block is one or more sectors(扇区). File structure Logical storage unit Collection of related information File system resides on secondary storage (disks). File system organized into layers. File control block (FCB)

3、 文件控制块 storage structure consisting of information about a file.,Layered File System,Commands(such as “retrieve block 123”),hardware-specific instructions,(controller),device drivers and interrupt handlers to transfer information between the main memory and the disk system.,Issue generic commands to

4、 the appropriate device driver,1.Translate logical block address to physical block address; 2.free space manager.,Manages metadata information. 1.manages the directory structure; 2.maintains file structure via file control block(FCB); 3.protection and security.,11.2 File-System Implementation 文件系统实现

5、,In this section, we delve into the structures and operations used to implement file-system operations.,1. Overview 2. Partitions and Mounting 分区及安装 3. Virtual File Systems 虚拟文件系统,1 . Overview,On-disk and in-memory structures used to implement a file system: The on-disk structures: A boot control bl

6、ock: 引导控制块 contains information needed by the system to boot an operating system from that partition. A partition control block: 分区控制块 contains partition details (such as: the number of blocks in the partition, size of the blocks, free-block count and free-block pointers, and free FCB count and FCB

7、pointers). Directory structure 目录结构 FCB 文件控制块,The in-memory structures : An in-memory partition table 内存 分区表 containing information about each mounted partition. An in-memory directory structure 内存 目录结构 that holds the directory information of recently accessed directories. The system-wide open-file

8、table 系统 打开文件表 contains a copy of the FCB of each open file, as well as other information. The per-process open-file table 进程 打开文件表 contains a pointer to the appropriate entry in the system-wide open-file table, as well as other information.,A typical file control block,Create a new file 创建新文件 The p

9、rocess: An application program calls the logical file system. Logical file system allocates a new FCB,. Read the appropriate directory into memory, updates it with the new file name and FCB, and writes it back to the disk. About directory Some operating systems (including UNIX) treat a directory as

10、a file. Some operating systems (including Windows NT) treat a directories as entities separate from files. (separate system calls for files and directories.),Open a file 打开文件 The process: The directory structures is searched for the given file name. (Parts of the directory structure are usually cach

11、ed in memory to speed directory operations.) The FCB is copied into a system-wide open-file table in memory. An entry is made in the per-process open-file table. (with a pointer to the entry in the system-wide open-file table, a pointer to the current location in the file, the access mode in which t

12、he file is open, ) The open call returns a pointer to the appropriate entry in the per-process open-file table. All file operations are then performed via this pointer. About the pointer returned by the open call Unix systems refer to it as a file descriptor. Windows 2000 refers to it as a file hand

13、le.,Close a file 关闭文件 The process: The per-process table entry is removed, and the system-wide entrys open count is decremented. When all users that have opened the file close it, the updated file information is copied back to the disk-based directory structure and the system-wide open-file table en

14、try is removed.,In-Memory file-system structures. (a) File open. (b) File read.,2. Partitions and Mounting 分区及安装,The layout of disk can have many variations, depending on the operating system. A disk can be sliced into multiple partitions, or a partition can span multiple disks (-a form of RAID). Ea

15、ch partition can be: “raw” : 生分区 containing no file system Raw disk is used where no file system is appropriate. Examples: UNIX swap space, some databases. “cooked” : 熟分区 containing a file system,Boot information 引导信息 can be stored in a separate partition. it has its own format because at boot time

16、the system does not have file-system device drivers loaded and therefore cannot interpret the file-system format. it is usually a sequential series of blocks, loaded as an image into memory. Execution of the image starts at a predefined location, such as the first byte.,root partition 根分区 which contains the operating-system kernel and potentially other system files, is mounted at boot time. Other partitions can be automatically mounted at boot or manually mounted later, depending

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号