File Systems
File Allocation Methods
| Method | Advantages | Disadvantages |
|---|---|---|
| Contiguous | Fast sequential and direct access | External fragmentation; hard to grow files |
| Linked | No external fragmentation | Slow direct access; pointer overhead (FAT improves this) |
| Indexed | Direct access, no external fragmentation | Index-block overhead (UNIX inodes use multi-level indexing) |
Directory Structures
Single-level, two-level, tree-structured, acyclic graph (shared files and links) and general graph.
Free-Space Management
Bit vector (bitmap), linked free list, grouping and counting.
UNIX inode
inode: metadata (owner, permissions, size, timestamps)
12 direct block pointers
1 single-indirect pointer
1 double-indirect pointer
1 triple-indirect pointer
Linux File Permissions
ls -l notes.txt
chmod 754 notes.txt # rwx for owner, r-x for group, r-- for others
-rw-r--r-- 1 asha staff 120 Nov 6 10:15 notes.txt
Track your progress through the Operating System course