Hardware Reference
In-Depth Information
The traditional solution to this problem was the use of secondary memory,
such as disk. The programmer divided the program up into a number of pieces,
called overlays , each of which could fit in the memory. To run the program, the
first overlay was brought in and it ran for a while. When it finished, it read in the
next overlay and called it, and so on. The programmer was responsible for break-
ing the program into overlays, deciding where in the secondary memory each over-
lay was to be kept, arranging for the transport of overlays between main memory
and secondary memory, and in general managing the whole overlay process with-
out any help from the computer.
Although widely used for many years, this technique involved much work in
connection with overlay management. In 1961 a group of researchers in Man-
chester, England, proposed a method for performing the overlay process automat-
ically, without the programmer even knowing that it was happening (Fothering-
ham, 1961). This method, now called virtual memory , had the obvious advantage
of freeing the programmer from a lot of annoying bookkeeping. It was first used
on a number of computers during the 1960s, associated mostly with research
projects in computer systems design. By the early 1970s virtual memory had be-
come available on most computers. Now even single-chip computers, including
the Core i7 and OMAP4430 ARM CPU, have highly sophisticated virtual memory
systems. We will look at these later in this chapter.
6.1.1 Paging
The idea put forth by the Manchester group was to separate the concepts of ad-
dress space and memory locations. Consider, as an example, a typical computer of
that era, which might have had a 16-bit address field in its instructions and 4096
words of memory. A program on this computer could address 65536 words of
memory. The reason is that 65536 (2 16 ) 16-bit addresses exist, each corresponding
to a different memory word. Please note that the number of addressable words de-
pends only on the number of bits in an address and is in no way related to the num-
ber of memory words actually available. The address space for this computer
consists of the numbers 0, 1, 2, ..., 65535, because that is the set of possible ad-
dresses. The computer, however, may well have had fewer than 65535 words of
memory.
Before virtual memory was invented, people would have made a distinction be-
tween the addresses below 4096 and those equal to or above 4096. Although
rarely stated in so many words, these two parts were regarded as the useful address
space and the useless address space, respectively (the addresses above 4095 being
useless because they did not correspond to actual memory addresses). People did
not make a distinction between address space and memory locations, because the
hardware enforced a one-to-one correspondence between them.
The idea of separating the address space and the memory locations is as fol-
lows. At any instant of time, 4096 words of memory can be directly accessed, but
 
 
Search WWH ::




Custom Search