Docsity

Fast File System (FFS) - Worksheet 16, Study notes of Operating Systems

Toggle sidebar
bg1
CS 537: Intro to Operating Systems (Summer 2017)
Worksheet 16 - Fast File System (FFS)
DUE: Aug 9th 2017 (Wednesday)
This question is about the Berkeley Fast File System, FFS. Remember, the first file system
that realized it was built on a mechanical disk? The question focuses on the flow of data
to disk, i.e., where does FFS place files?
Assume we have 10 cylinder groups (or block groups) on disk. As you might recall,
each group has four basic components: an inode bitmap (Bi), a data bitmap (Bd), some
inodes (I), and some data blocks (D).
This question focuses on which data structures are touched when certain operations
occur. For example, if an application reads a 1-block file in the second block group, the
flow would be: “2I, 2D”, because to read that file, the application first has to read its
inode and then its data block, both of which are in the second block group.
Assume for these questions that all files and directories are 1 block in size unless
otherwise specified. Also assume the root directory is found in block group 1.
a. There is an existing file “/foo” in block group 3. An application wishes to read
it from disk. What is the flow of reads from disk needed to satisfy this request?
(Remember to start at the root)
b. Now an empty file “/bar” is created in the same directory as foo (i.e., the root direc-
tory). What flow describes the writes to disk needed to create “/bar”? (Note: the
exact ordering does not matter in this case.)
c. Now assume that someone runs “ls” on the root directory and wants to obtain the
size of each file or directory within. What is the flow of reads from disk?
d. Finally, assume another file is getting created in the root directory, “/big”. Assume
it is a really big file. As it keeps growing and growing and eventually nearly filling
the disk, what flow might describe the its sequence of writes to disk?

Partial preview of the text

Download Fast File System (FFS) - Worksheet 16 and more Study notes Operating Systems in PDF only on Docsity!

CS 537: Intro to Operating Systems (Summer 2017) Worksheet 16 - Fast File System (FFS) DUE: Aug 9th^ 2017 (Wednesday)

This question is about the Berkeley Fast File System, FFS. Remember, the first file system that realized it was built on a mechanical disk? The question focuses on the flow of data to disk, i.e., where does FFS place files? Assume we have 10 cylinder groups (or block groups) on disk. As you might recall, each group has four basic components: an inode bitmap (Bi), a data bitmap (Bd), some inodes (I), and some data blocks (D). This question focuses on which data structures are touched when certain operations occur. For example, if an application reads a 1-block file in the second block group, the flow would be: “2I, 2D”, because to read that file, the application first has to read its inode and then its data block, both of which are in the second block group. Assume for these questions that all files and directories are 1 block in size unless otherwise specified. Also assume the root directory is found in block group 1.

a. There is an existing file “/foo” in block group 3. An application wishes to read it from disk. What is the flow of reads from disk needed to satisfy this request? (Remember to start at the root)

b. Now an empty file “/bar” is created in the same directory as foo (i.e., the root direc- tory). What flow describes the writes to disk needed to create “/bar”? (Note: the exact ordering does not matter in this case.)

c. Now assume that someone runs “ls” on the root directory and wants to obtain the size of each file or directory within. What is the flow of reads from disk?

d. Finally, assume another file is getting created in the root directory, “/big”. Assume it is a really big file. As it keeps growing and growing and eventually nearly filling the disk, what flow might describe the its sequence of writes to disk?