LAYERED FILE SYSTEM application programs logical file system file-organization module ↓ basic file system ↓ I/O control ↓ devices
LAYERED FILE SYSTEM
FILE SYSTEM IMPLEMENTATION 块 组 续组0 校用N1 块组到 引导块 超级块 索引节点表 数据块 i-node 块组0是引导块,块组1往后分别是超级块,索引 节点表,数据块。 节点号2始终固定的指向根目录(). ·引导块一GRUB/LILO(boot control block) •超级块--空闲索引节点,空间数据块表 (volume control block;superblock;master file table) •索引节点表--文件相关信息及文件位置(FCB) •数据块---存储数据 12
FILE SYSTEM IMPLEMENTATION 块组0是引导块,块组1往后分别是超级块,索引 节点表,数据块。 节点号2始终固定的指向根目录(/). •引导块—GRUB/LILO (boot control block) •超级块---空闲索引节点,空间数据块表 (volume control block; superblock; master file table) •索引节点表----文件相关信息及文件位置 (FCB) •数据块----存储数据 12
A TYPICAL FILE CONTROL BLOCK file permissions file dates(create,access,write) file owner,group,ACL file size file data blocks or pointers to file data blocks
A TYPICAL FILE CONTROL BLOCK
I-NODES I-node Attributes Single indirect block Double Addresses of indirect data blocks block Triple indirect block An i-node with three levels of indirect blocks. 14
I-NODES An i-node with three levels of indirect blocks. 14
UNIX Files inode mode Data owner Data Direct block 0 Direct block 1 Data Direct block 11 Index Single indirect Double indirect- Triple indirect Data Index Data Index Index Index Data Index Data Index Index Data Index 15 Data
15 UNIX Files mode Data owner … Direct block 0 Direct block 1 … Direct block 11 Single indirect Double indirect Triple indirect inode Data Data Index Data Data Index Index Index Data Data Index Index Index Index Index Data Data