

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A quiz from a university course, cs 481, focused on operating system principles. The quiz covers topics on journaling filesystems and distributed filesystems. Questions include the results of crashes in journaling filesystems, the purpose and disadvantage of consistency checkers, and performance and optimization strategies for distributed filesystems.
Typology: Quizzes
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Consider a filesystem in which updates are made in the following order:
(Your answers should be no more than 2 sentences.)
1.1) What is the result of a crash between events 1 and 2? (5 pts)
Free list reflects a block in use, but since inode hadn’t been updated, block is “leaked”, i.e. disk storage is wasted. There are no functional inconsistencies.
1.2) What is the result of a crash between events 2 and 3? (5 pts)
A disk storage block is “leaked”, and the time taken to update the block is also wasted. There are no functional inconsistencies.
1.3) In this filesystem, what would be the purpose of a consistency checker? (5 pts)
The consistency checker’s job is to make sure that blocks shown as “in use” by the free list are actually in use by files as reflected in their inodes.
1.4) What is the single biggest disadvantage of the consistency checker? (5 pts)
The consistency checker is slow because it has to scan all files on the disk.
1.5) How do journaling filesystems address this deficiency? What is the purpose of the journal or log? (5 pts)
Journaling addresses this slowness by restricting scans to only transactions that were in progress when the system crashed. The log or journal maintains the list of “in- progress” transactions.
Write-on-close consistency describes the consistency of a distributed filesystem in which clients accessing a file only update the file server when a modified file is closed.
2.1) Briefly discuss the performance and consistency of such a system. (5 pts)
Such systems can perform quite efficiently since writes are not flushed to disk until the file is closed. However, concurrent writes to the same file by different processes can lead to very divergent versions of data, consider the scenario in which a user has a text file open after hours of editing and second user opening that file. The version the second user will see will be the file without any of the first user’s modifications.
2.2) Describe one thing you can do to make read() calls as fast as possible in this system. (5 pts)
When the file is opened, you can (in the background) pre-fetch all the file’s data blocks.