







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








Disk reads/writes in terms of sectors, not bytes read/write single sector or adjacent groups How to write a single byte? “Read-modify-write” read in sector containing the byte modify that byte write entire sector back to disk key: if cached, don’t need to read in Sector = unit of atomicity. sector write done completely, even if crash in middle (disk saves up enough momentum to complete) larger atomic units have to be synthesized by OS
Files can be lost if directory destroyed or crash happens before link can be set New twist: FFS can find lost inodes Facts: FFS pre-allocates inodes in known locations on disk Free inodes are initialized to all 0s. So? Fact 1 lets FFS find all inodes (whether or not there are any pointers to them) Fact 2 tells FFS that any inode with non-zero contents is (probably) still in use. fsck places unreferenced inodes with non-zero contents in the lost+found directory