CSE 120 Spring 2002 Homework 3

Due 23 May 2002

Problem 1

Consider a system that uses demand paging. The backing store is stored on a disk that is used only for backing store.

Define the utilization of a resource (over some period of time) to be the percentage of time that the resource is being used. When you measure the utilizations of different resources in the system, you find that the utilization of the CPU is 20%, the utilization of the backing store disk is at 99%, and the utilizations of the other devices (such as the other disks and the network adaptor) are 5% or lower.

  1. What phenomenon would most likely result in these characteristics?

  2.  
  3. What effect would each of the following actions have on the CPU utilization?
    1. Increasing the speed of the CPU.
    2. Increasing the capacity of the backing store disk.
    3. Increasing the page size. The effect of this is hard to predict.
    4. Increasing the amount of physical memory.
    5. Decreasing the degree of multiprogramming.

Problem 2

Assume a fixed amount of physical memory and assume LRU demand paging. Give a reference string that has the following two properties:


Problem 3

Consider the following information about a virtual memory system that employs both paging and segmentation. Let |s1|, |s2|, |p| and |w| denote the length, in bits, of each of the four address components. Hence, n = |s1| + |s2| + |p| + |w|.
  1. What is the value of |w|?
  2. What is the maximum number of pages per segment and what is the corresponding value of |p|?

  3.  

     

  4. Using the determined values of |w| and |p|, which of the following is choices for |s1| and |s2| is preferable?
    1. |s1| = |w| and |s2| = n - |p| - |w|
      or |s2| = |w| and |s1| = n - |p| - |w|


    Would either choice result in a larger virtual address space? Explain.


Problem 4

If a large number of programs is kept in main memory, then there is almost always another ready program when a page fault occurs. Thus, CPU utilization is kept high. If, however, we allocate a large memory space to each of a few programs, then each program produces a smaller number of page faults. Thus, CPU utilization is kept high.

Are these two arguments correct? Which policy, if either, should be preferred? Why?


last edited 15 May 2002 by kam