Skip to content

Instantly share code, notes, and snippets.

@Dineshs91
Created March 29, 2017 12:44
Show Gist options
  • Save Dineshs91/b1bfc7450283c85a6a79cb1009253b1f to your computer and use it in GitHub Desktop.
Save Dineshs91/b1bfc7450283c85a6a79cb1009253b1f to your computer and use it in GitHub Desktop.
Simple file system
- Directories
- Files
- Inode
Each inode describes a data structure on the hard disk, storing the properties of a file.
Struct
- Owner, Group Owner of the file.
- File type
- Permissions
- Date and time of creation, last read and change.
- Date and time this information has been changed in the inode.
- Number of links to this file.
- File size
- An address defining the actual location of the file data.
Inode doesn't store the file name and directory.
- Expose syscalls like open, close, read, write
- Directory implementation
- Use linear list.
Linked list based implementation for allocating disk blocks for files.
- Data bitmap
- Inode bitmap
- Superblock
Reference http://pages.cs.wisc.edu/~remzi/OSTEP/file-implementation.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment