CS 430 -- Operating Systems -- The Final
  1. Chapter 1 -- Introductions
    1. What is the most COMMON reason  we want to overlap computation and I/O?
    2. Please connect by a line the application and the type of operating system best suited for that application.

    3.           Word Processing                                 Real Time
                Payroll                                                     Interactive
                Factory Control                                    Batch
    4. Please list one disadvanage of an asymetric multiprocessing system.

    5. __________________________________________________________________________
      __________________________________________________________________________
  2. Chapter 2 -- Computer System Structures
    1. (T/F) One common use hardware interrupts is to notify the operating system that an I/O operation is complete.
    2. Which of the following should be privlidged instructions?  (Cicle all that apply).
    3. Suppose the operating system was placed in ROM.  Would this be suffecient protection in a multiuser operating system?  If not, what else need be protected?

    4. __________________________________________________________________________
      __________________________________________________________________________
      __________________________________________________________________________
  3. Chapter 3 -- Operating System Structures
    1. (Kernel/User) On an operating system such as DOS or UNIX, does the command interpreter run in the kernel or as a user process?
    2. Which of the following should be done on every system call. (Cicle all that apply.)
    3. Place the components listed below into a reasonable layered scheme.  Each layer should be implementable by the layers below.  Feel free to explain your layout to me in person if you think it's not obvious.

    4.            Hardware                         ____________________________ 
                 User Programs                ____________________________ 
                 Virtual Memory               ____________________________ 
                 CPU Scheduling              ____________________________ 
                 Filesystem                         ____________________________ 
                  Timer Interrupts            _____________________________
    5. The Exokernel is closest in idea to (choose exactly one).
  4. Chapter 4 -- Processes
    1. (T/F) A process waiting for an I/O operation to complete but otherwise ready to run is in the READY queue?
    2. One problem with user-level threads (as opposed to kernel implemented threads) is (circle all that apply)
    3. What operation must be done when switching processes that need not be done when switching threads.

    4. _____________________________________________________________________________________
      _____________________________________________________________________________________
    5. What information does a shortest job next scheduler need that first come first serve and round robin does not?
      _____________________________________________________________________________________
  5. Chapter 5 -- CPU Scheduling
    1. Which CPU scheduling algorithm is provably optimal amoung the non-preemptive schedulers? (choose all that apply)
    2. Which of the following algorithms is subject to starvation?  (choose all that apply).
    3. The VMS process scheduler gives processes that just finished waiting for terminal I/O an priority boost.  Why? (pick ONE)
    4. _____ Suppose you have the following processes to run under Shortest Job Next (without premption).  Which process is running at time slice #10?  Low numbers are low priorities.

    5.       Job          Priority         Arival Time    Length
            ---------------------------
              1                10                     1                       5
              2                 5                      2                       3
              3                 12                    3                       17
              4                  6                     4                       8
    6. Suppose a particular process was listed twice in the READY queue of a round-robin scheduler.  What effect would this have ________________________________________________________________________________________

    7. ________________________________________________________________________________________
  6. Chapter 6 and 7  -- Process Synchronization and Deadlocks
    1. (T/F) Suppose two processes are each waiting for a lock held be the other.  Process A will wait 10 minutes for the desired lock, and process B will wait 10 seconds.  Are these processes in a deadlock?
    2. Suppose process A is waiting on B which is waiting on C.  Which of the following actions will completely  break the deadlock.
  7. Chapter 8 -- Memory Managment
    1. Which memory management technique results in the smallest physical memory needs with adaquate runtime performance and no thrashing. 
    2. I'm designing an operating system for a CPU with no MMU.  Thanks to my special compiler that all users will use, I can change the starting address of  both code and data at process load time.  I need to run multiple processes at one time.  Which memory managment  would be best?

    3. ____________________________________________________________________________________
      ____________________________________________________________________________________
    4. (Normal/Inverted) Consider a machine with a HUGE virtual memory size, and a SMALL physical RAM size.  Which type of page table would be best?
    5. What is the average internal fragmentation wastage for a computer with 2K pages? ______________________
    6. ___________________ Where in physical RAM is virtual address 3054.  Assume 1000 byte (not 1kilobyte) pages.

    7.  
      Entry Number 
      Ram Location  5000  3000  5000  1000  7000 
  8. Chapter 9 -- Virtual Memory
    1. Suppose you have a virtual memory system with an access time to memory of 10 ns, and it takes 1000 ns to bring a page into memory off backing store.  Further, assume that 99% of all memory requests are to pages already in RAM, and only 1% are to pages that need to be brought in.  What is the effective access time? __________________________
    2. (FIFO/LRU) Which page replacement algorithm provides better performance, First-in-first-out or Least recently used?
    3. When do page faults occur?

    4. ___________________________________________________________________________________________
    5. Consider a demand-paging system  with the following measurements:

    6.            CPU Utilization                   20%
                 Paging Disk  Utilization     97%
                 Other I/O devices Util        5%
        Which of the following will significantly improve overall system performance. (circle all that apply)
  9. Chapter 10 and 11-- File System Stuff
    1. Why do we have an explicit file open operation?  Why do most file systems not just have you pass the file name to read and write?

    2. _________________________________________________________________________________
      _________________________________________________________________________________
    3. (T/F) A file system supporting only contigiously allocated files will offer high performance for both sequential and random access applications.
    4. (T/F) A file system supporting only files linked block by block will offer high performance for both sequential and random access applications.
    5. Consider a multilevel indexed file allocation method as used in UNIX.  Which of the following statements are true (cicle all that apply)?
    6. (Read/Seek) Which normally costs more time, to seek the disk head to a block or to read that block once seeked?
    7. Which file allocation method makes it hardest to add a block to the FRONT of a file?  Assume the block before the first block of the file is allocated to other uses.
  10. Chapter 12 -- Secondary Storage Structure
    1. Connect with lines the statement on the left and the associated disk scheduling algorithm on the right.

      First Come First Serve              Offers reasonable perfomance with no starving
      Shortest Seek Time First          Often perfoms badly
      Circular-Look                             Can have starvation
    2. ________ Consider the following requests.  If the disk head is at block #125, and and just serviced a request at block #120, which request gets serviced next under C-Look?

    3. Request # 1 2 3 4 5
      Block # 345  2345  12  698  2341 
    4. Where would you rather be right now?