
Archived
Low level FS implementation
A low-level file system implementation in C.
CFile SystemLow LevelBitmapInode
PDF document A document that outlines the design and implementation details of a custom file system (FS).
Components
- Partitioning: Storage is divided into
superblocks
,bitmaps
(inode and block),inode tables
, anddata blocks
. The superblock tracks metadata and extents (start and size) of each component. - Inodes and Extents:
- Inodes store file metadata and up to 11 direct extents.
- Files exceeding 11 extents use an indirect block to track additional extents.
- File Operations:
- Allocation: Bitmaps identify free inodes or blocks.
- Truncation/Deletion: Updates bitmaps and compacts directory entries to reclaim space efficiently.
- Path Resolution: Navigates directories to locate inodes for target files.
Performance
Memory management algorithms (FIFO
, LRU
, CLOCK
, MRU
, and RAND
) are compared across workloads like blocked,
matmul, and repeat loop:
- Blocked Access: High hit rates for LRU, FIFO, and CLOCK due to focused memory access.
- Matmul: Increased evictions from interruptions in access patterns.
- Repeat Loop: Larger memory reduces evictions significantly.
- Simple Loop: Low hit rates due to constant data swapping.
The project was implemented in C.
Tags:
C,
File System,
Low Level,
Bitmap,
Inode
Previous
Next