CMSC 412 - Spring 1998

Midterm #1 review questions

Here are a few suggested problems to help you prepare for the midterm.

  1. Chapter 1: 1.7
  2. Chapter 2: 2.3, 2.4, 2.11
  3. Chapter 3: 3.5, 3.9, 3.11, 3.12
  4. Chapter 4: 4.7, 4.6
  5. What is a process and why might I want one?
  6. Chapter 6: 6.7, 6.8, 6.17, (solution to barber problem)
  7. Chapter 7: 7.1, 7.5, 7.15
  8. Assume that we are going to design a processor that makes a very large number of registers of various types available to an operating system. Assume that the goal is to support extremely fast (just a few cycles at most) thread switching.
    1. What kinds of registers would you want to replicate, and how would you design your operating system to enhance the prospect of being able to carry out fast thread switching?
    2. Will it always be possible to ensure that a thread switch will take place within just a few cycles? If not, give some examples of where difficulties might arise.
  9. In your project 2, in the interrupt handler for system_service, the case statement for yield did a gen_interrupt call. Why was it done that way? Explain how to remove this "extra" interrupt.
  10. When setting up your stack segment, you pushed the address of proc_term on the stack. Why did you do this? Will this item always be used? When will it be used?
  11. How many bits are there in address returned by safe_malloc?