Virtual Memory Template

Instructions

Consider a demand-paging system with the following time-measured utilizations:

  • CPU utilization 20%
  • Paging disk 97.7%
  • Other I/O devices 5%

For each of the following, say whether it will (or is likely to) improve CPU utilization. Explain your answers.

  1. Install a faster CPU.
  2. Install a bigger paging disk.
  3. Increase the degree of multi programming.
  4. Decrease the degree of multi programming.
  5. Install more main memory.
  6. Install a faster hard disk or multiple controllers with multiple hard disks.
  7. Add preparing to the page fetch algorithms.
  8. Increase the page size.
  9. What is the cause of thrashing?
  10. How does the system detect thrashing?
  11. Once it detects thrashing, what can the system do to eliminate this problem?
  12. A system provides support for user-level and kernel-level threads. The mapping in this system is one to one (there is a corresponding kernel thread for each user thread). Does a multithreaded process consist of (a) a working set for the entire process or (b) a working set for each thread? Explain.
  13. Consider the following page reference string:

7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0, 1.

Assuming demand paging with 3 frames, how many page faults would occur for the following replacement algorithms?

  1. LRU replacement

Answer:

 

  1. FIFO replacement

Answer:

 

  1. Optimal replacement

Answer:

 

  1. 7. Calculate the effective access time for a demand-paged memory given a memory access time of 100 nanoseconds, a page fault service time of 6,000,000 nanoseconds, and a page-fault rate of 1 page fault out of every 10,000 access attempts. You must show your calculations to receive full credit on this question.

 

  1. Using the following page replacement algorithms, determine the number of faults in the following reference string given a physical memory size of 4 frames:

5  6  5  4  4  4  8  2  9  9  0  4  5  3  9  6  8  1  9  1  6  1  0  0  5

 

Replacement algorithm 3 frames
a.       FIFO  
b.      OPT  
c.       LRU  
d.      LFU  
e.      MFU