File System Implementation Flashcards
Give the definition:
How files and directories are represented
On-disk structures
Give the definition:
(Internal) How on-disk structures get touched when performing FS operations
File system operations
What structure is this common for?
Data block
Inode table
Directories
Data bitmap
Inode bitmap
Superblock
File system
What in the file system is divided into blocks?
The disk
What do we call the simple layout of a file system?
Very Simple File System (VSFS)
What blocks reserve a fixed portion of disk?
Data blocks
What sort of table is this:
Stores inodes, where each inode is 256 bytes & a block of 4KB can store 16 inodes
Inode table
What does an inode table use its pointers to to indicate?
Block numbers
What does this formula find?
(inode_number + sizeof(inode_table)) / block_size)
The block an inode is in
Give the definition:
Index node
Inode
What sort of pointers used by an inode table refer to a data block?
Direct pointers
What sort of pointers used by an inode table have an issue with limited size?
Direct pointers
What sort of pointers used by an inode table refer to a block containing more pointers?
Indirect pointers
What sort of pointers used by an inode table have an issue with overhead & 2 disk reads for each access?
Indirect pointers
What sort of pointers used by an inode table have some direct & some indirect pointers?
Hybrid pointers
Are hybrid pointers better for small or big files?
Small
If the file that a hybrid pointer is going to point to is large what sort of index do we use?
Multi-level index
What are the two approaches for pointers with an inode table that don’t use pointers?
Extent-based & linked lists
Give the definition:
A special type of file
Directories
What on-disk structure is this design common for?
Storing directory entries in files
Directory
Give the definition:
Total bytes for a file name & any left over space in a directory
reclen
Give the definition:
The actual length of a file name in a directory
strlen
What are bitmaps used for?
Allocation
What are the two on-disk structures that can be used by a file system to find free data blocks/inodes?
Free list & bitmap
Give the definition:
An on-disk structure that points to the first free block
Free list
Give the definition:
An on-disk structure where each bit indicates availability
Bitmap
How many bitmaps are used for inodes & data blocks?
1 for each
Is this a downside for free lists or bitmaps?
Cannot get contiguous space easily
Free lists
Is this an upside for free lists or bitmaps?
Easy to allocate contiguous space for files
Bitmap
Give the definition:
A block used for storing metadata about basic file system configuration & runtime status, such as:
- Block size
- How many inodes there are
- How much free space there is
Superblock
Which file system operation doesn’t do anything on disk?
close
What does the system use to avoid excessive I/O operations & improve the performance of FS operations?
Cache
Is this what the system uses the cache to do when reading or writing to avoid excessive I/O operations & improve the performance of FS operations?
Using DRAM to store some important blocks
Reading
Is this what the system uses the cache to do when reading or writing to avoid excessive I/O operations & improve the performance of FS operations?
Write buffering & delaying writes
Writing