20.FileSystems-Consistency

20.FileSystems-Consistency - FileSystems: ConsistencyIssues...

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

View Full Document Right Arrow Icon
1 File Systems: Consistency Issues
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 File Systems: Consistency Issues File systems maintains many data structures Free list/bit vector Directories File headers and inode structures Data blocks All data structures are cached for better performance Works great for read operations … but what about writes? If modified data is in cache, and the system crashes all modified data can be lost If data is written in wrong order, data structure invariants might be violated (this is very bad, as data or file system might not be consistent) Solutions: Write-through caches: Write changes synchronously consistency at the expense of poor performance Write-back caches: Delayed writes higher performance but the risk of loosing data
Background image of page 2
3 What about Multiple Updates? Several file system operations update multiple data structures Examples: Move a file between directories Delete file from old directory Add file to new directory Create a new file Allocate space on disk for file header and data Write new header to disk Add new file to a directory What if the system crashes in the middle? Even with write-through, we have a problem!! The consistency problem: The state of memory+disk might not be the same as just disk. Worse, just disk (without memory) might be inconsistent.
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Which is a metadata consistency problem? A. Null double indirect pointer B. File created before a crash is missing C. Free block bitmap contains a file data block that is pointed to by an inode D. Directory contains corrupt file name
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 15

20.FileSystems-Consistency - FileSystems: ConsistencyIssues...

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

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