Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Operating System Principles: Quiz 6 - Filesystems - Prof. Dorian Arnold, Quizzes of Operating Systems

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

Pre 2010

Uploaded on 08/18/2009

koofers-user-j3s-1
koofers-user-j3s-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 481: Operating System Principles
Spring ’09
Quiz #6: Filesystems
1. Journaling Filesystems (25 pts)
Consider a filesystem in which updates are made in the following order:
1. Free list update
2. File data block update
3. File inode update
(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.
1
pf2

Partial preview of the text

Download Operating System Principles: Quiz 6 - Filesystems - Prof. Dorian Arnold and more Quizzes Operating Systems in PDF only on Docsity!

CS 481: Operating System Principles

Spring ’

Quiz #6: Filesystems

1. Journaling Filesystems (25 pts)

Consider a filesystem in which updates are made in the following order:

  1. Free list update
  2. File data block update
  3. File inode update

(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.

2. Distributed Filesystems (10 pts)

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.