第263页 9.2 The System V File System(s5fs)
- 章节名:9.2 The System V File System(s5fs)
- 页码:第263页
Following the superblock is the node list... 引自 9.2 The System V File System(s5fs) 关于磁盘上的inode: 1. inode list 不是链表,而是一个数组 2. 每个inode大小为64 bytes。在Linux的Ext2上的,inode的大小是128 byte 3. inode list数组的大小在格式化文件系统时就固定下来 s5fs 关键数据结构: http://weenix.cs.brown.edu/mediawiki/index.php/S5FS svr4 源代码: https://archive.org/download/ATTUNIXSystemVRelease4Version2/sysvr4.tar.bz2 uts/i386/sys/fs 上有关于s5fs的头文件 s5fs 的实现则在目录 uts/i386/fs/s5 下 s5fs 关于free blocks和free inodes的管理? free node 的管理: 1. super block中free block list 是一个数组,数组的元素是free blocks的编号 2. 由于数组能存放的free blocks的编号是有限的,所以当super block中的数组没法保存所有free blocks的编号时,就会把剩下free blocks的编号存放到磁盘的某一个普通的block中 3. super block 中 free block list 的第1个元素就是上面提到的磁盘中的某一个普通block的编号,这个block里面的内容就是另外一个数组,这个数组包含了其它的free blocks的编号 4. 可能这个block也没法保存所有的free blocks编号,那怎么办呢?跟super block中的free block数组一样,这个block数组的第一个存放的是另一个包含free blocks编号的block,以此类推,最终将所有free blocks管理起来 5. 提2个思考的问题:allocate block时数组没有元素了怎么办?release block时数组满了怎么办? 6. 这种block管理方式是非常原始的,一个数组编号是16 bit的short整数,用位图来管理只需要1个bit。这就导致了在super block中没法存放所有的free blocks编号,也就导致了在allocate block和release block时逻辑很复杂。ext2用的就是bitmap的方式来管理free block的
jeff对本书的所有笔记 · · · · · ·
-
第257页 8.11.3 the OSF/1 Approach
OSF/1 是 DEC的UNIX实现,基于Mach内核,这个系统后来演变成DEC的Digital UNIX, Tru64 UNIX,...
-
第283页 The Translucent File System
这个文件系统是一个UnionFS(docker一开始采用的技术),由SUN发明,主要用于程序员管理代码...
-
第263页 9.2 The System V File System(s5fs)
-
第266页 9.2.3 The Superblock
Free blocks list Free inodes list 跟 ext2 的bitmap有什么不同?
-
第1页 1 Introduction
一张图看懂UNIX的发展史 清晰版下载: https://upload.wikimedia.org/wikipedia/commons/thum...
说明 · · · · · ·
表示其中内容是对原文的摘抄