Name: ________________________________ Login: _____________

Comp111 Final Exam
Monday Dec 15, 2014 - open books and notes

Any and all printed and written materials are allowed, including books, course notes, and handwritten notes.

No electronic devices of any kind are allowed, including cellphones, calculators, pagers, laptops, etc. Please turn these off before beginning the exam.

Please show all work on these pages. Feel free to use the back of each page as needed. Make sure that your work for each problem is clearly marked, especially on the backs of pages. These pages will be graded and returned electronically, like exercises, and the results will be made available online.

Please note that point values have no correspondence with difficulty. We suggest that you solve the problems that you best understand first.

Please also note that the space I gave you to answer is the space I would need, and not necessarily the space you will need. There is no deduction for more verbose answers (though succinct and comprehensive answers are very much appreciated by your instructor!).

1a       of 10
1b       of 10
2a       of 10
2b       of 10
3       of 10
4a       of 10
4b       of 10
5       of 10
6       of 10
7       of 10
8       of 10
Total       of 100

    Name: ________________________________ Login: _____________

  1. Suppose the 5-minute load average of a linux system is 2.0.
    1. (10 points) Explain exactly what this measurement means.

    2. (10 points) Supposing that this load average is made up entirely of 30 people editing, and that each one types an average of 1 character per second, what is the average editing response time between pressing a character and seeing the result?

    Name: ________________________________ Login: _____________

  2. I skipped some details of implementing transactional filesystems. Let's fill in some of the blanks.
    1. (10 points) I claim that it is relatively simple to defragment a transactional filesystem, compared to defragmenting a physical filesystem. Why?

    2. (10 points) Is the page cache described for EXT2-4 necessary in a fully transactional filesystem? Why or why not?

  3. (10 points) Is fairness important for the disk scheduler? Why or why not?

    Name: ________________________________ Login: _____________

  4. Consider the act of deleting a regular file from a filesystem.
    1. (10 points) List all changes that need to be made to the EXT2 filesystem in order to delete a file.

    2. (10 points) One of the great mysteries of Linux for users is that to delete a file, one does not need to be able to write to it. In fact, one can delete files over which one has no privileges at all. Use the structure of the filesystem to explain why this is true, and describe the privileges one needs in order to delete a file.

    Name: ________________________________ Login: _____________

  5. (10 points) I claim that the buddy system for memory management is actually slower than other mechanisms if all memory chunks to be allocated are exactly the same size. Why? What other mechanism could one use instead?

  6. (10 points) In assignment 3, many people observed a curious behavior. The process being controlled seemed to write many thousands of lines before the parent process could read 100 lines and stop it. Explain this behavior from your understanding of the I/O subsystem. What actually happened?

    Name: ________________________________ Login: _____________

  7. (10 points) In the final lecture, I reminded you that one thing to avoid in an operating system is "thrashing", in which the operating system takes more time than it provides for useful work. Describe a few kinds of thrashing and how to avoid these behaviors.

    Name: ________________________________ Login: _____________

  8. (10 points EXTRA CREDIT) One of the worst hardware ideas of all time was the so-called multi-ported disk drive that had one disk and two interfaces to different hosts running different operating systems. Supposing that the multi-ported disk contains one EXT4 filesystem and that the two host run independent copies of linux, what are the limitations of this technique, and why did this product fail to sell?