Homework 1

Due date: April 18, 2008 Points: 100

Short-Answer Problems

These can be answered in a sentence or two, and are intended to reinforce important points.

  1. (5 points) text, exercise 2.2
  2. (5 points) text, exercise 2.10
  3. (10 points) text, exercise 3.10

Long-Answer Problems

These questions require some thought and longer answers than the short-answer questions. They are intended to have you use the concepts discussed in class, to be sure you understand them and can work with them.

  1. (13 points) On early computers, every byte of data read or written was directly handled by the CPU (i.e., there was no DMA—Direct Memory Access). What implications does this organization have for multiprogramming?
  2. (14 points) Protecting the resident monitor is crucial to a correctly operating computer system. Providing this protection is the reason behind multiple mode operation, memory protection, and the timer. To allow maximum flexibility, however, we would also like to place minimal constraints upon the user. The following is a list of operations which are normally protected. What is the minimal set of instructions which must be protected?
    1. Change to user mode.
    2. Change to monitor mode.
    3. Read from monitor memory.
    4. Write into monitor memory.
    5. Instruction fetch from monitor memory.
    6. Turn on timer interrupt.
    7. Turn off timer interrupt.
  3. (15 points) Are there any computing environments in which operating systems might not be necessary or even appropriate? Explain your answer.
  4. (18 points) This problem has you examine the CPU utilization at various types of installations.
    1. Assume a typical job at an open shop requires 10 seconds to be read in from cards, 3 seconds to compute, and 30 seconds to print the results on paper. Programmers sign up for 15 minute blocks and run their jobs twice per block. What is the CPU utilization?
    2. Assume now that those same jobs are run by an operator who always has another job to start as soon as one finishes. The operator takes 30 seconds to remove the output of one job and set up the next job. What is the CPU utilization?
    3. Now assume that spooling is used, that the computer has enough card readers and printers so there are always jobs waiting to be run and printing is not a bottleneck. It takes 1000 times as long to read or write information from or to cards or paper as from or to disk. The computer spends 1% of its time servicing I/O interrupts; this time is not counted as computation time. It takes 0.01 seconds to reset the machine between jobs. What is the CPU utilization?
  5. (20 points) A computer is running a virtual machine. The virtual machine is emulating hardware different than that on which it runs. The virtual machine has an operating system, and the virtual machine is controlled by a virtual machine monitor. The user using the virtual machine runs a compiler. The compiler executes an instruction. How many privileged instructions must each level execute, assuming the instruction can be emulated without the use of privileged instructions by the virtual machine monitor?

Extra Credit Problems

  1. (10 points) The next-to-last long-answer problem uses CPU utilization to illustrate how successive generations made more effective use of the computer. How meaningful is the CPU utilization to the users? What other question (or questions) would users like to know the answer to?
  2. (20 points) In FreeBSD, why is the chroot system call limited to the super-user? (Hint: think about protection problems.)

You can also obtain a PDF version of this. Version of April 3, 2008 at 9:30 AM