- 1、本文档共75页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
CH12文件系统实现
Chapter 12: File System Implementation文件系统实现 12.1 File System Structure 文件系统结构 12.2 File System Implementation文件系统实现 12.3 Directory Implementation 目录实现 12.4 Allocation Methods 分派方法 12.5 Free-Space Management 空闲空间管理 12.6 Efficiency and Performance 效率和性能 12.7 Recovery 恢复 12.8 Log-Structured File Systems 日志结构文件系统 12.9 NFS 网络文件系统 12.1 File-System Structure(文件系统结构) File structure(文件结构) Logical storage unit(逻辑存储单元) Collection of related information(相关信息的集合) File system resides on secondary storage (disks). (文件系统存在于辅助存储器中—磁盘) File system organized into layers.(文件系统按层组织) File control block – storage structure consisting of information about a file. (文件控制块FCB:由一个文件的相关信息组成的存储结构) Fig 12.1 Layered File System 12.2 File System Implementation文件系统实现 12.2.1 Overview The on-disk structures include: Boot control block Partition control block(分区控制块):superblock in UFS, Master File Table in NTFS Directory structure FCB In-memory structure include: In-memory partition table In-memory directory structure System-wide open-file table Per-process open-file table UNIX磁盘文件卷结构 超级块:描述文件系统的状态,包括磁盘空闲块栈,空闲i结点栈 i节点(inode list):存放文件说明信息,每项64字节 目录文件:每个目录项16字节。文件名区分大小写。 Fig 12.2 A Typical File Control Block In-Memory File System Structures The following figure illustrates the necessary file system structures provided by the operating systems. OS中的文件系统结构下面图例的功能 When a file is opened , the directory structure is searched for the given file name. Parts of the directory structure are usually cached in memory to speed directory operations. Once the file is found , the FCB is copied into a system- wide open-file table in memory. This table not only stores the FCB, but also has entries for a count of the number of processes that have the file open. Next , an entry is made in the per-process open-file table, with a pointer to the entry in the system- wide open-file table and some other fields. Figure 12-3(a) refers to opening a file. Figure 12-3(b) refers to reading a file. Fig 12.3 In-Memory
文档评论(0)