1. How does a real time operating system differ from a normal operating system?

  2. _______________________________________________________________
  3. Should adjusting the memory map be a privliged instruction? ___________
  4. List two things that threads from the same process share.

  5. _____________________________________________________________________
    _____________________________________________________________________
  6. Which is quicker, to switch between threads of the same process, or to switch between processes?  Why?

  7. _____________________________________________________________________
    _____________________________________________________________________
  8. Which type of schedule makes sense for a computer that going to interact with users (like a Windows or a Mac machine) (circle all that apply)

  9. a) FIFO
    b) Shortest Job Next
    c) Round Robin
    d) Dennis Rodman
  10. Which type of scheduler can lock up a computer if a process goes into an infinite loop (circle all that apply)

  11. a) FIFO (FCFS)
    b) Priority
    c) Round Robin
    d) Shortest Job Next
  12. (2 points) Connect the lines to make true statements

  13. Minimal wait times                                              FIFO (FCFS)
    Best of Real Time Operating Systems                Shortest Job Next
    Almost never the best choice                            Round Robin
    Non-premptive                                                   Longest Job Next
    Simple to implement                                            Priority
  14. Putting sixty pounds on your back, getting in a long line with lots of other soldiers, and marching slowly towards the enemy's machine gun nest is
  15. Is there a deadlock?

  16. A holds 4 and wants 1
    B holds 2
    C holds 2 and 5 but wants 4
    D holds 1 but wants 2
    F wants 1
  17. Under what conditions do inverted page tables work better than normal page tables?

  18. _____________________________________________________________________
  19. Who decides to use inverted or normal page tables

  20. a) The operating system writer
    b) The application writer
    c) The CPU designer
    d) The motherboard designer
  21. The computer has 4G of hard drive space.  You have a 32 bit processor with 4K pages.  An application uses a virtual address space of 120K.  There are 2 tape drives.  The system uses normal page tables.  How many page table entries are required? _____________________
  22. Where is address 1 for process 1? ____________________

  23.  
    Address Process ID
    2000 1
    3000 2
    3000 1
    1000 2
  24. Consider the following segment of C++ code.  Is the address refernce a virtual address, or a physical address?

  25. main() {
           char *a = 1000;
           *a = 12;
    }
  26. Using non-premeptive Shortest Job Next, when does job 3 finish?

  27. Process Arrival Time Length
    1 1 3
    2 2 2
    3 3 1
  28. Using the table above, and a round robin scheduler, when does job three finish?
  29. If I have to be wounded in battle, I prefer

  30.                   A spear thru the chest -- I'll see who killed me.
                      A bullet from a civil war musket. It may not move fast, but it leaves a BIG hole.
                      Poisen gas from WWI. I'll have time to think about my life as I pass away.
                      Smart people don't fight -- they work in supply
  31. Suppose that processes are allowed to hold resources.  However, if a lower numbered process wants a resource held by a higher numbered process, the higher numbered process is killed, and the lower numbered process gains the resource.  Is this GUARENTEED to be deadlock free?
  32. Consider a process with multiple threads. Put a 'P' next to those things that all threads in the process share. Put a 'T' next to those things that are not shared.

  33.          1.Stack.
             2.Address space.
             3.Program counter.
             4.Open file descriptors.
             5.Set of registers.
  34. (2 points) Consider the memory map below.  A request is made for 102K of RAM.  Where does each placement strategy allocate these 102K?

  35.       Worst Fit_________________  Best Fit ______________________ First Fit ______________
     
    100 Free 50K Used 150K Free 12 Used 103K Free 100 K Used 200K Free
  36. Which schedulers are starvation free? (circle all that apply)
    a) FIFO (FCFS)  b) Round Robin    c) Shortest Job Next     d) Priority
  37. (True/False) A process does a fork(), creating a parent and a child. The parent and child normally continue to share the same code segment.
  38. (True/False) A process does a fork(), creating a parent and a child. The parent and child normally continue to share the same code segment.
  39. (T/F) A process waiting for an I/O operation to complete but otherwise ready to run is in the READY queue?
  40. Suppose I wanted to write a device driver that accessed a device that could not generate a hardware interrupt.  It can be accessed by reading and writing to special parts of memory.  Could this device be used?  How might the driver work?
  41. Some schedulers divide processes into two categories.  Category one processes offer a large time quantum but are scheduled infrequently.  Category two processes have a small time slice and are scheduled frequently.  In either case the total amount of CPU cycles offered per unit time is the same.  Which category would be best for interactive tasks and why?