Operating Systems - Exam #3
Write your answers on the answer sheets provided.
- (3 pts each) Briefly define each of the following terms:
- TLB
- thrashing
- RAID
- symbolic link
- (4 pts) Explain how a virtual memory system differs from a
non-virtual paging system.
- (4 pts) Name two reasons why virtual memory is used.
- (4 pts) Explain the difference between demand paging and pre-paging.
- (4 pts) Describe an optimal page replacement policy.
- (4 pts) Describe the ``second chance'' page replacement policy.
- (2 pts) What is the purpose of the base register and limit register in
the context of memory management?
- (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.
- LRU
- FIFO
- (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.
- (4 pts) Explain how block size affects performance and disk
utilization.
- (4 pts) Describe two methods for keeping track for free disk blocks.
- (4 pts) Explain the ``elevator'' approach to disk scheduling.
- (4 pts) What is ``rule number one'' of computer security?
- (3 pts each) For each system threat below, give a brief definition and then
name a precaution or remedy for dealing with the threat.
- trojan horse
- virus
- root kit
- (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.
- (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.
- (12 pts) What I learned in Operating Systems IS ...