Comp111 Final Exam
Review Sheet 3 Answers
Fall 2005

Open book and notes. No electronics of any kind allowed. Please turn off cellphones, pagers, laptops, radios, etc.

Takehome questions:

  1. (25 points) In class, we described a scheme for representing files in the filesystem based upon two kinds of blocks. A link block consists of an array of pointers to other blocks, with one next pointer that points to the next link block. A data block consists entirely of data. A file is described by one or more link blocks that themselves point to data blocks.

    Give a complete list of advantages and disadvantages of such a scheme for representing files. Consider file sizes, paging, scheduling, and read-only versus read-write access to files in your answer. Hint: in a normal filesystem, a one-byte file occupies one block.

  2. You have to decide between two options for web service: one machine with a clock rate of 500MHZ or two machines with clock rates of 250MHZ each. The software the machines will run is identical. There is only static content: you are just serving up unchanging files. You may assume that the process of selecting between machines to respond to requests takes negligible time (it usually does). You may assume that the machines have no other tasks other than web service.
    1. (10 points) Estimate which solution will give the faster throughput response time, utilizing M/M/c queueing theory. Assume that the load is the same in either case and that the processing rate μ on a 500 MHZ machine is exactly twice that of μ on a 250 MHZ machine.
    2. (15 points) Explain exactly how and why the estimate you just gave is inaccurate. Is it too low, or too high, and why?

    Some students pointed out that "throughput" is the wrong thing to think about, because by the balance equations, throughput is the same by definition. They are correct. The differences are in response time rather than throughput.

Non-takehome questions:

  1. (25 points) In a journalling filesystem, what constraints are there on writing the journal entries to disk? Should I write them as late as possible or as early as possible? Why?
  2. (25 points) One hot topic in current operating systems is "virtualization" of the operating system. It is possible to run two operating systems on the same computer using, e.g., the commercial VMWare software product or the open-source Xen virtual machine. The most difficult problem in virtualization is how to share physical devices between two operating systems. Explain precisely why sharing a physical device (e.g., a disk or a printer) between two operating systems is problematic.