CS 110 Homework Assignment 3
Due: Friday, April 12, 2002, at 9 PM

Turn in your assignments in the bin outside Geoff's office. Late homework will be penalized; see the late policy for more information. We also will not accept handwritten material or printouts in which long lines are wrapped in the middle of a word. We prefer that you use a text processor. You might try troff or latex in combination with xfig.

  1. 3 points:
    Suppose you were designing a computer with a very deep pipeline, such that it took two machine cycles after fetching a branch instruction before the outcome of the branch was known. In a SPARC-like model, such a design would require two branch delay slots rather than one. What implications would a double delay slot have for programs that make three-way decisions, such as:
        if (x < 0)
        else if (x == 0)
  2. 3 points:
    The SPARC sliding window design requires that one window always be marked invalid while a user process is running. Why is it not wasteful to always have one window unavailable to the user?
  3. 3 points:
    We have discussed in class how the width of the SPARC Current Window Pointer limits the architecture to having a maximum of 32 register sets. There is another element of the SPARC design that limits the processor to having 32 register sets. What is it?
  4. 6 points:
    Which of the following instructions should be privileged?
    1. Set value of timer
    2. Read the clock
    3. Clear (all of) memory
    4. Turn off interrupts
    5. Switch from user to monitor mode
  5. 3 points:
    Some early computers protected the operating system by placing it in a memory partition that could not be modified by either the user job or the operating system itself. Describe two difficulties that you think could arise with such a scheme.

Last modified April 6, 2002 by geoff@cs.hmc.edu