Test 3 - Memory Management

CS 438, Operating Systems Concepts


  1. If a process's page table is stored in virtual memory, then there's a bootstrapping problem: to access the page table, the MMU needs the page table to know if the page table's been paged in or not, but if the page table hasn't been paged in, then the MMU can't access it.

    Can we avoid this whole mess by going to inverted page tables? Explain.


    Yes. An inverted page table maps a page-frame index to a page number. Before a process starts executing, it can't possibly what page frames its pages will occupy (or even what pages it will use), so there's no point in storing the inverted page table with process. If it can't be stored with processes, the only place left is in the operating system. Further, because it's not a per-process data structure, only one copy is needed.

    Rather than observing that the bootstrapping problem disappeared with inverted page tables, many people continued to wrestle with the bootstrapping problem, which was the wrong track.


  2. Explain how page tables allow each process to have its own virtual memory.


    A page table maps page indices into page-frame indices. Each process (even when running copies of the same program) will have it's own copy of a page table because the mapping will (must) be different between processes. It is these separate page tables that give each process a separate virtual address space.

    This question was perhaps too simple, because many people gave over-elaborate answers that drifted further away from being correct the longer they went on.


  3. Explain how it is that virtual memory avoids external fragmentation problems.


    External fragmentation occurs when storage gets chopped into pieces too small to usefully run any process. Virtual memory eliminates external fragmentation by dividing programs into identical sized pages, which means that any page can fit anywhere in storage.

    Most people got this right, although with varying degrees of crispness.


  4. Explain how virtual memory can provide better self-protection for process than can partition-less memory management.


    A process under partition-less memory management is a single segment containing all the process's storage resources. Because all storage resources are stored in a single segment, the segment must be assigned the most general protection possible to ensure all resources can be accessed.

    A process under virtual-memory management is divided into pages, and various kinds of memory resources can be stored in various pages, which allows finer-grain protection.

    Many answers ignored the self part of "self-protection"; others concentrated on providing processes with big address spaces. Both were more or less true, but besides the point.



This page last modified on 22 November 2003.