Lecture 13 Advanced file systems

Lecture 13 Advanced file systems - Review: FFS background...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Review: FFS background 1980s improvement to original Unix FS, which had:- 512-byte blocks- Free blocks in linked list- All inodes at beginning of disk- Low throughput: 512 bytes per average seek time Unix FS performance problems:- Transfers only 512 bytes per disk access- Eventually random allocation 512 bytes / disk seek- Inodes far from directory and file data- Within directory, inodes far from each other Also had some usability problems:- 14-character file names a pain- Cant atomically update file in crash-proof way 1/36 Review: FFS [McKusic] basics Change block size to at least 4K- To avoid wasting space, use fragments for ends of files Cylinder groups spread inodes around disk Bitmaps replace free list FS reserves space to improve allocation- Tunable parameter, default 10%- Only superuser can use space when over 90% full Usability improvements:- File names up to 255 characters- Atomic rename system call- Symbolic links assign one file name to another 2/36 FFS disk layout superblocks cylinder groups inodes data blocks information bookkeeping Each cylinder group has its own:- Superblock- Bookkeeping information- Set of inodes- Data/directory blocks 3/36 Basic FFS data structures data data data data name i-number . . . contents directory . . . inode . . . indirect block . . . double indir indirect ptr . . . metadata . . . . . . data ptr data ptr data ptr data ptr . . . Inode is key data structure for each file- Has permissions and access/modification/inode-change times- Has link count (# directories containing file); file deleted when 0- Points to data blocks of file (and indirect blocks) By convention, inode #2 always root directory 4/36 FFS superblock Superblock contains file system parameters- Disk characteristics, block size, CG info- Information necessary to get inode given i-number Replicated once per cylinder group- At shifting offsets, so as to span multiple platters- Contains magic number to find replicas if 1st superblock dies Contains non-replicated summary info- # blocks, fragments, inodes, directories in FS- Flag stating if FS was cleanly unmounted 5/36 Cylinder groups Groups related inodes and their data Contains a number of inodes (set when FS created)- Default one inode per 2K data Contains file and directory blocks Contains bookkeeping information- Block map bit map of available fragments- Summary info within CG # free inodes, blocks/frags, files, directories- # free blocks by rotational position (8 positions) [Was reasonable in 1980s when disks werent commonly zoned] 6/36 Inode allocation Allocate inodes in same CG as directory if possible New directories put in new cylinder groups- Consider CGs with greater than average # free inodes- Chose CG with smallest # directories Within CG, inodes allocated randomly (next free)- Would like related inodes as close as possible- OK, because one CG doesnt have that many inodes 7/36 Fragment allocation...
View Full Document

Page1 / 39

Lecture 13 Advanced file systems - Review: FFS background...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online