Professional Documents
Culture Documents
File Systems
6.1 Files
6.2 Directories
6.3 File system implementation
6.4 Example file systems
1
File Systems
2
Files
File Concept
3
Files
File Concept
Process/Thread CPU
Files Disk
4
Files
File Concept
file system
5
Files
File Naming
8
Files
File Types
1. Create 7. Append
2. Delete 8. Seek
3. Open 9. Get attributes
4. Close 10.Set Attributes
5. Read 11.Rename
6. Write
12
Files
Memory-Mapped Files
14
Directories
Two-level Directory Systems
15
Directories
Hierarchical Directory Systems
1. Create 5. Readdir
2. Delete 6. Rename
3. Opendir 7. Link
4. Closedir 8. Unlink
18
File System
Implementation
19
File System Implementation
20
In-Memory File System Structures
21
File System Implementation
Allocation Methods
22
File System Implementation
Allocation Methods: Contiguous allocation (1)
24
File System Implementation
Allocation Methods: Contiguous allocation (3)
25
File System Implementation
Allocation Methods: Linked allocation (1)
block = pointer
26
File System Implementation
Allocation Methods: Linked allocation (2)
27
File System Implementation
Allocation Methods: Linked allocation (3)
• File-Allocation Table
28
File System Implementation
Allocation Methods: Linked allocation (4)
index table
31
File System Implementation
Allocation Methods: Indexed allocation (2)
32
File System Implementation
Allocation Methods: Indexed allocation (3)
An example i-node
33
File System Implementation
Allocation Methods: Indexed allocation (4)
• Combined Scheme: UNIX (4K bytes per block)
34
Implementing Directories (1)
Block size
41
Example File Systems
CD-ROM File Systems
42
The MS-DOS File System (1)
43
The MS-DOS File System (2)
Bytes
45
The Windows 98 File System (2)
Bytes
Checksum
46
The Windows 98 File System (3)
47
The UNIX V7 File System (1)
48
The UNIX V7 File System (2)
A UNIX i-node
49
The UNIX V7 File System (3)