file management
file properties
Organization of data inside the file
organization between files
The operating system provides functionality to upper layers
-
Create a file
-
Delete Files
-
open a file
-
close file
- read file
- write file
Logical structure of the file
unstructured file
have structured files
sequence file
The physical structure of the file
disk block (file block)
continuous allocation
- advantage
For HDD
- shortcoming
Summarize
link assignment
implicit link
explicit link
Summarize
index allocation
link scheme
multi-level index
mixed index
Summarize
File Directory
Requirements for directory management
- Realize "access by name"
- Improve catalog retrieval speed
- File Sharing
- Allow file renaming
Implementation of the file directory
FCB
Each file corresponds to a file control block (FCB)
A series of file control blocks constitute the file directory
Information contained in an FCB
- Basic information: file name, physical location, logical structure, physical structure
- Access control information: access rights, etc.
- Usage information: creation modification date, etc.
index node
FCB no longer stores all information, only file names and index nodes are stored to reduce the size of FCB
Other information about the file is stored in the index node
Structure of the file directory
Single-stage
**
two levels
multilevel (tree)
File Sharing
Based on inodes (hard links)
Based on symbolic links (soft links)
file protection
password protection
encrypted protection
Advantages: Strong confidentiality, no need to store "passwords" in the system
Disadvantages: Encoding/decoding, or encryption/decryption takes a certain amount of time.