Physical Address - The address that the memory chip operates on. An
application in modern computers never deals with physical addresses. A
special MMU ( memory management unit ) is responsible for converting
logical addresses into physical ones. The totality of all available physical
addresses is called a physical address space. So,
if your computer has a
128MB chipset, then that amount of memory is physically
addressed. Usually, much more memory is logically addressed.
The specifics of converting logical addresses into physical ones are
determined by different approaches to managing memory,
the study of
which will be the topic of this section.
Approach Of Base And Boundary Registers
When implementing virtual memory, it is necessary to protect memory,
move processes in memory, and
share memory across multiple
processes. One of the easiest ways to meet these requirements is to
approach the
base and boundary registers . For each process in two CPU
registers store two values -
the base address ( base ) and
limits
( bounds ). Each access to a logical address is converted to a physical
address by adding a logical address to the base address. If the received
physical address does not fall within the range ( base, base + bounds ),
consider that the address is incorrect and generate an error.
This approach is the simplest example of a dynamic movement of processes
in memory. All the other approaches that will be discussed in this section
are different options for developing this basic scheme. For example, the fact
that each process has its own values of base and boundary registers when
using this approach is the simplest implementation
of the process address
space concept, which is based on the fact that each process has its own
memory mapping.
To organize memory protection in this situation, it is necessary that the use
of the user cannot change the value of the base and border registers. It is
enough to make such changes available only in the preferred mode of the
processor.
The advantages of this approach include simplicity, modest hardware
requirements
(only
two
registers
are
required),
and
high
efficiency. However, today it is practically not used because of a number of
disadvantages, due primarily to the fact that the
address space of the process
is still mapped to one continuous block of physical memory: it is unclear
how to dynamically expand the address space of the process; different
processes
cannot share memory; no code and data distribution.
In this approach, only one pair of base address-limit values is allocated to
the process. The natural evolution of this idea was the mapping of the
process address space through several physical memory ranges, each of
which sets its own pair of the base address and boundary values. That's how
the concept of memory segmentation came about.