Chapter 11 : File System Interface
文章目录
File Concept
Contiguous logical address space
Types:
- Data :numeric character binary …
- Program
File Structure
File Attributes(属性)
Name Type Location Size Protection Time, date, and user identification
Information about files are kept in the directory structure, which is maintained(维护) on the disk.
File Operations
Open(Fi) –search the directory structure on disk for entry Fi, and move the content of entry to memory
Close (Fi) –move the content of entry Fi in memory to directory structure on disk
Access Methods
- Sequential Access
- Direct Access
Directory Structure
disks are split into one or more partitions,each partition contains information about files within it.
The information is kept in entries in a device directory or volume table of contents
Organize the Directory
Efficiency Naming Grouping
-
Single-Level Directory
-
Two-Level Directory
-
Tree-Structured Directories
-
Acyclic-Graph Directories 非循环图
How do we guarantee no cycles?
Allow only links to file not subdirectories.
Garbage collection.
Every time a new link is added use a cycle detection algorithm to determine whether it is OK.
File System Mounting 挂载
A file system must be mounted before it can be accessed.