Operating Systems - Exam #3

Write your answers on the answer sheets provided.
  1. (3 pts each) Briefly define each of the following terms:
    1. TLB
    2. thrashing
    3. RAID
    4. symbolic link

  2. (4 pts) Explain how a virtual memory system differs from a non-virtual paging system.

  3. (4 pts) Name two reasons why virtual memory is used.

  4. (4 pts) Explain the difference between demand paging and pre-paging.

  5. (4 pts) Describe an optimal page replacement policy.

  6. (4 pts) Describe the ``second chance'' page replacement policy.

  7. (2 pts) What is the purpose of the base register and limit register in the context of memory management?

  8. (4 pts each) Suppose you have a system with 3 page frames and that the following pages are requested (in this order): 4,3,2,4,5,4,1,5,4,3,1,4. For each page replacement method below, make a table showing which pages are placed and replaced. Also state the total number of page faults.
    1. LRU
    2. FIFO

  9. (4 pts) Name an advantage that binary, structured files have over unstructured text files. Name an advantage that unstructured text files have over binary, structured files.

  10. (4 pts) Explain how block size affects performance and disk utilization.

  11. (4 pts) Describe two methods for keeping track for free disk blocks.

  12. (4 pts) Explain the ``elevator'' approach to disk scheduling.

  13. (4 pts) What is ``rule number one'' of computer security?

  14. (3 pts each) For each system threat below, give a brief definition and then name a precaution or remedy for dealing with the threat.
    1. trojan horse
    2. virus
    3. root kit

  15. (8 pts) Name the three methods discussed in class for accomplishing mutual exclusion in a distributed environment. Which of the three methods would you select? Explain.

  16. (8 pts) Suppose a binary data file named weather.bin contains 365 entries (one for each day of the year) of the following type:
      class Stats {
        public int	rainfall;
        public int	pressure;
        public int	windSpeed;
      }
    
    Write a section of code (along with any needed variable declarations) that will update the ``pressure'' entry from January 20 (in weather.bin) to be 27 points higher than its previous value. To do this you will need to read the current value from the file, update that value, and then write the updated value back to the file. Don't forget to close the file.

  17. (12 pts) What I learned in Operating Systems IS ...