Homework Assignment #10 – File Systems


You are expected to do your own work on all homework assignments. You may (and are encouraged to) engage in general discussions with your classmates regarding the assignments, but specific details of a solution, including the solution itself, must always be your own work. (See the statement of Academic Dishonesty on the Syllabus)

How to turn in?

Assignments need to be turned in via Lamaku. No late submissions will be accepted.

What to turn in?

You should turn in single plain text or PDF file named README.txt, or README.pdf, with your answers to the assignment’s questions. Your file must be readable “as is” and points will be removed if the report is not readable.


Exercise #1 [40 pts EXTRA CREDIT]

Consider a disk that holds data as 1KiB blocks. Consider a file system that uses a UNIX-like inode data structure as follows:

The inode structure above is always stored in its own disk block

Question #1 [10 pts EXTRA CREDIT]

Assuming a block pointer is stored using 8 bytes, what is the maximum possible size of a file whose inode does not use the double- and triple-indirect pointers? Show your work, and give your answer as a sum of powers of 2.

Question #2 [10 pts EXTRA CREDIT]

Still assuming that a block pointer requires 8 bytes, what is the maximum possible size of a file on our file system? Show your work, and give your answer as a sum of powers of 2.

Question #3 [10 pts EXTRA CREDIT]

Still assuming that a block pointer requires 8 bytes, now consider a file that’s 32.3KiB. How many blocks are used on disk to store the file AND its inode? Show your work, and give your answer as an integer.

Question #4 [10 pts EXTRA CREDIT]

Your friend tells you that on this system a 1GiB file can be handled with an inode that only uses the direct, single, and double indirect pointers. You then reply: ``Oh.. then I know that the block pointers are at most X bits”. What is X? Show your work, and give your answer as an integer. (hint: this requires solving a quadratic equation)