Assignment 4

CS 325

50 points, due May 1, 2009 at noon

  1. (5 pts.) What is the effect of allowing two entries in a page table to point to the same frame of memory? Explain how this effect could be used to decrease the amount of time needed to copy a large amount of memory from one place to another. What effect would updating some byte on the one page have on the other page?

  2. (5 pts.) Compare the memory organization schemes of contiguous memory allocation with variable partitions and pure paging with respect to the following issues:
    1. External fragmentation.
    2. Internal fragmentation.
    3. Ability to share code across processes.

  3. (10 pts.) Consider a simple paging system with the following parameters: $2^{32}$ bytes of physical memory; page size of $2^{10}$ bytes; $2^{16}$ pages of logical address space.
    1. How many bits are in a logical address?
    2. How many bytes in a frame?
    3. How many bits in the physical address specify the frame?
    4. How many entries in the page table?
    5. How many bits in each page table entry? Assume each page table entry contains a valid/invalid bit.

  4. (10 pts.) A group of operating system designers for the Gigasloth Computing Company are thinking about ways of reducing the amount of swap space needed in their new, disk-hungry operating system: Tiptoes $6+1$. The head guru has just suggested not bothering to save the text segment in the swap file at all, but just swap it in directly from the program file whenever necessary. (He is now cavorting about the room shouting ``Developers!'' at the top of his lungs.) Discuss the advantages and disadvantages of this approach.

  5. (10 pts.) Consider a system that uses pure demand paging.
    1. When a process first starts execution, how would you characterize the page fault rate?
    2. Once the working set for a process is loaded into memory, how would you characterize the page fault rate?
    3. Assume that a process changes its locality and the size of the new working set is too large to be stored in available free memory. Identify some options system designers could choose from to handle this situation.

  6. (10 pts.) Consider a demand-paged computer system which uses a paging drum, global LRU replacement, and an allocation policy which shares frames equally among processes (i.e., if there are $m$ frames and $n$ processes, then each process gets $\lfloor \frac{m}{n} \rfloor$ frames). The degree of multiprogramming is currently fixed at four. The system was recently measured to determine utilization of the CPU and the paging drum. Consider each of the following to be the results of the measurement. For each case, what is happening? Can the degree of multiprogramming be increased to increase the CPU utilization? Is the paging helping?
    1. CPU utilization 13%; disk utilization 97%.
    2. CPU utilization 87%; disk utilization 3%.
    3. CPU utilization 13%; disk utilization 3%.



Thomas P. Kelliher 2009-04-21
Tom Kelliher