FS Implementation 2.In-memory information:For both FS management and performence improvement via caching Data are loaded at mount time and discarded at dismount Structures include: in-memory mount table; in-memory directory-structure cache system-wide open-file table; per-process open-file table 4口”4814在,4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FS Implementation 2. In-memory information: For both FS management and performence improvement via caching ▶ Data are loaded at mount time and discarded at dismount ▶ Structures include: ▶ in-memory mount table; ▶ in-memory directory-structure cache ▶ system-wide open-file table; ▶ per-process open-file table
FS Implementation 2.In-memory information:For both FS management and performence improvement via caching Data are loaded at mount time and discarded at dismount Structures include: Sppen (file name directory structure directory structure file-control block user space kemnel memory secondary storage (a) index 口口口 read (index 口口口 directory blocks per-process system-wide open file table open file table file-control block user space kernel memory secondary storage (b) 口”48+4在4色主月Q0
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FS Implementation 2. In-memory information: For both FS management and performence improvement via caching ▶ Data are loaded at mount time and discarded at dismount ▶ Structures include: ▶ in-memory mount table; ▶ in-memory directory-structure cache ▶ system-wide open-file table; ▶ per-process open-file table user space open (file name) kernel memory directory structure secondary storage file-control block directory structure (a) user space read (index) kernel memory per-process open file table system-wide open file table secondary storage file-control block directory blocks index (b)
Partitions and mounting Partition(分区) Raw(E.g.UNIX swap space some database)VS. cooked Boot information,with its own format Boot image Boot loader unstanding multiple FSes OSes Dual-boot Root partition is mounted at boot time Others can be automatically mounted at boot or manually mounted later 4口”4814在,4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Partitions and mounting ▶ Partition (分区) ▶ Raw (E.g. UNIX swap space & some database) VS. cooked ▶ Boot information, with its own format ▶ Boot image ▶ Boot loader unstanding multiple FSes & OSes Dual-boot ▶ Root partition is mounted at boot time ▶ Others can be automatically mounted at boot or manually mounted later
Virtual File Systems(虚拟文件系统) Virtual File Systems(VFS,虚拟文件系统)provide an object-oriented way of implementing file systems. VFS allows the same system call interface(the APl)to be used for different types of file systems. The APl is to the VFS interface,rather than any specific type of file system. file-system interface VFS interface local file system local file system remote file system type 1 type 2 type 1 dis network Schematic View of Virtual File System 口”4814在4生,主月QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Virtual File Systems (虚拟文件系统) ▶ Virtual File Systems (VFS, 虚拟文件系统) provide an object-oriented way of implementing file systems. ▶ VFS allows the same system call interface (the API) to be used for different types of file systems. ▶ The API is to the VFS interface, rather than any specific type of file system. local file system type 1 disk local file system type 2 disk remote file system type 1 network VFS interface file-system interface Schematic View of Virtual File System
Outline Directory Implementation 4口”4814在,4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline Directory Implementation