Operating Systems
Sample Exam 2: Memory Management and File Systems

  • (30 pts) Short Answer.

    1. (10 pts) List 3 algorithms for managing memory with contiguous segmented allocation. Do these algorithms require compaction to work? Why or why not?

    2. (10 pts) Explain the difference between logical and physical addresses.

    3. (10 pts) What is swapping and when is it used?

  • (20 pts) Performance of Paged Systems. This question asks you to compute the effective memory access time (ema) in symbolic terms for different hardware implementations of paging with and without virtual memory. Let ma be the time to read or write a value in memory. Define other terms as you need them. First assume the process and its page table fit and stay in memory while the program executes, and there is no TLB.

    1. (5 pts) What is the ema for this system?

    2. (5 pts) Now assume there is a TLB. What is the ema for this system? Include l, the time for the TLB look up in your equation.

    3. (5 pts) Now consider a virtual memory system with a TLB where the process can grow larger than the memory, and the page may not be in memory. What is the ema now? Assume that the page table is always in memory.

    4. (5 pts) Now what is the ema for the same system except that the page table entry itself may not be in memory?

  • (25 pts) Segmentation with Paging. Design a memory management scheme that uses segmentation with paging.

    1. Specify and justify the number of segments.

    2. Specify the translation of logical to physical addresses.

    3. Specify hardware support to make address translation fast. (Draw a picture.)

  • (25 pts) Memory Management versus Disk Management. Memory management and disk management have some key similarities and differences that result from their physical characteristics and from the access patterns each expects and supports well. Using at least 3 points of comparison, describe some of their similarities and differences.