FS Flashcards
what’s read-modify-write?
read in a sector, modify the byte, write it back
tradeoff of a sector?
+ sector writes are always completed
- larger atomic units have to be created by the OS
what’s location transparency?
the ability to access data w/o knowing its location
FS working intuitions
FS performance dominated by # of FS accesses
transfer time is negligible compared to seek time + rotational delay
tradeoffs of contiguous allocation
+ simple, fast access, sequential and random
- external fragmentation
tradeoffs of linked files
+ easy dynamic growth, sequential access, no fragmentation
- non-contiguous blocks = bad access times
- bad random access
- pointers take up space
FAT benefits
cache entire FAT, cheap compared to disk access when pointer chasing
space overhead trivial
must duplicate to protect against errors
indexed files tradeoffs
+ sequential, random easy
- mapping table requires large chunk of contiguous space
multilevel indexed files
+ solves space issues of indexed files
+ small files are fast, large max file size
- worst case 3 FS accesses (di -> i -> b)
- 13 block file = big space overhead
- metadata and data are strewn across disk
what are hard links?
a refcount of pointers to an inode
what are soft links?
like a directory: inode has special symlink bit set, file contents are name of target
what does the superblock store?
block size, # of blocks, max # of files, pointer to head of free list/bitmap, information necessary to locate an inode given its inumber
issues with old file system?
- 512B block size too small
- poor clustering of related objects
how FFS fixes block size?
4KiB min, increases bandwidth
eliminate internal fragmentation with fragments
how FFS fixes clustering?
cylinder groups
- data blocks of a file in same CG
- inode and data in same CG
- inodes of a directory in same CG
how FFS bitmap improves free list?
easier to find contiguous blocks
smaller, keep entire bitmap in RAM
tradeoff of the FFS bitmap?
time to find a free block increases with fewer free blocks
how FFS deals with bitmap tradeoff?
trade space, always keep about 10% of disk free, scattered across disk
only root can allocate blocks once 100% full
how can FS summary info be wrong?
corrupt inodes
fields in inodes are wrong
directories are bad
corrupt inodes
not a simple crash
- bad block numbers, block used in more than one place