\documentstyle[]{article}
\addtolength{\oddsidemargin}{-1in}
\addtolength{\evensidemargin}{-.5in}
\addtolength{\textwidth}{1.75in}
\addtolength{\textheight}{1.75in}
\begin{document}
\noindent
David Golombek\\
6.033 Section 6, David Wetherall\\
Paper \#2: The Value of Virtual Memory\\

Virtual memory has become a core component of modern operating systems
because it allows for efficient distribution of memory between
multiple processes, a fair distribution of load between hardware and
software, and good memory protection.  Although all of these results can
be obtained individually using techniques other than virtual memory,
none can match all of them as elegantly.  Nor can we count on buying
physical memory to remove the need for such techniques -- software
memory requirements have a firm history of rising even faster than
hardware solutions.  Thus, I would follow modern trends and include
virtual memory in a system of my own design.

Early attempts at sharing system memory between multiple processes
centered around dynamic memory management, in which the OS would
maintain tables of current memory, including which areas were free and which
were being used.  Such techniques included linked lists of free blocks
and a buddy system of reclaiming used memory.  However, these and
others could not avoid fragmentation of memory and inefficient use of
what was allocated.  Virtual memory on the other hand allows an
allocation-on-demand system which leads to highly efficient use of
existing memory, and fairly trivial reclamation of used memory.

An OS that takes more than a couple milliseconds to respond to any
user input will fail commercially.  Users are no longer content
to wait for the OS to respond to their keystrokes.  One of the keys to
virtual memory is that its implementation can be cleanly split between
hardware and software.  By building page tables directly onto the
silicon, an OS can efficiently swap between memory pages.  It can also
respond to faults in a flexible manner due to this distribution of
burden.  One demonstration of this is the layering of multiple OS's on
top of a common processor.  The DEC Alpha 21x64 has 4 level page tables
built onto it's silicon, but supports efficient virtual memory under
Linux and OSF/1, which have very different methods of allocating this
memory to user level programs.  This combination of speed and
flexibility is hard to match in other designs.

A final advantage of virtual memory is that it allows a clean and
simple implementation of memory protection.  By attaching a few extra
bits to the page tables, the OS may easily insure that processes
trying to access a word of memory are allowed to do so.  Although this
may seem a trivial goal to accomplish under many other memory
management systems, efficient implementation is more difficult than it
first appears.  A software implementation adds several instructions to
every attempt to access memory, while a hardware implementation may
incur similar penalties as the OS is required to set and clear bits of
memory every time memory is swapped between processes.  Thus, while
virtual memory is by no means simple, it provides the simplest {\it
overall} memory management.

Although physical memory is getting cheaper by the month (forgetting
fires in Japan), programmers at Microsoft and other companies can
bloat code even faster.  Thus, an efficient method of managing the
limited memory available on a computer must be used.  Virtual memory
allows multiple processes to run simultaneously in memory, with
reasonable speed, and a safe environment.  No other solution presented
so far can offer these characteristics.  Thus, until one is found, I
must choose the complex and silicon-intensive virtual memory.

\end{document}
