CSE 451

Operating Systems

Spring 1998


Quiz #5

Distributed :  5/12/98 (Tuesday)
Due            :  5/14/98 (Thursday -- in the beginning of the Section)


 1.  Suppose a system has a virtual address  containing  28  bits. Suppose that the page size is 1024 bytes, that physical addresses contain 24 bits, and that the system uses  a  segmented-and-paged scheme with 256 segments and variable segment sizes.
  1. Describe the address translation mechanism, using a  picture to  show  the  relevant  tables and operations.  Don't worry about a TLB.  Be sure to show the exact size of  each  table (how many entries, how many bits wide).
  2. What is the maximum size of a segment ?
  3. What is the maximum number of memory accesses required to access a word in memory if: (Assume no page faults)
    1. the page tables are stored in physical memory ?
    2. the user page tables are stored in virtual memory of the kernel and the kernel page tables are stored in physical memory ?
  4. Suppose that a byte of physical memory is to  be  shared  by two processes.  Describe how the tables could be arranged to permit this.
  5. Suppose that a particular segment in  this  system  contains 4800  bytes.   How  much memory will the segment cause to be wasted in internal fragmentation?   Consider only  the  memory  allocated  to the segment itself;  do not worry about memory used in the mapping tables.
  6. Now suppose that the owner of the 4800-byte  segment  wishes to  expand  it by 200 bytes.  What must the operating system do in order to increase its size?  Compare this to a  system based on pure segmentation.
  7. Suppose that the segment is expanded again, from 5000  bytes  to  5500 bytes.  What must the operating system do to accomplish this?