Fundamentals of Virtual Memory Technology




Download 6,34 Mb.
Pdf ko'rish
bet61/203
Sana10.01.2024
Hajmi6,34 Mb.
#134102
1   ...   57   58   59   60   61   62   63   64   ...   203
Bog'liq
Linux This Book Includes 4 Manuscripts The Underground Bible

Fundamentals of Virtual Memory Technology
We first consider the prerequisites for introducing the concept of virtual
memory. In this situation, each process is loaded into its own continuous
portion of physical memory, and the next process begins immediately after
the previous one. If you analyze the memory allocation features of this
approach, the following questions may arise.
❖ 
How do I perform processes that require more physical memory
than installed on my computer?
❖ 
What happens when the process performs a write operation at the
wrong address (eg P2- at 0x7500)?
❖ 
What should I do if a process (such as P1) needs more memory to
execute?

When will the process receive information about the specific
physical memory address, which memory will start executing it, and
how should the memory addresses used in its code be converted?



What should I do if the process doesn't need all the memory
allocated to it?
Direct loading of processes into physical memory does not provide an
answer to these questions. Obviously, some memory translation tools are
needed to allow processes to use address sets that are different from
physical memory addresses. Before we understand the peculiarities of these
addresses, let us briefly dwell on the peculiarities of composing and
downloading applications .
The program usually resides on disk as a binary executable file obtained
after compilation and layout. It must be loaded into memory (process
address space) for its execution. Modern architectures allow processes to be
located anywhere in physical memory, and the same program can
accommodate different processes loaded into different memory locations. It
is unknown in advance which memory area the program will be loaded into.
During execution, the process accesses different addresses, in particular,
when a function is called, it uses its address (this is the code address), and
the global variable accesses the memory address to store the value of that
variable (this is the data address).
The programmer does not normally use memory addresses directly in his
program, instead, they use symbolic names (functions, global variables,
etc.). Due to compilation and layout, these names are linked to moving
addresses (such addresses are specified in relative units, such as "100 bytes
from the beginning of the module"). When running the program, the
relocated addresses, in turn, are bound to absolute addresses in memory. In
fact, each bind is a mapping of one set of addresses to another.
❖ 
Memory protection . Addressing errors that occur in a process code
should only affect the execution of that process. When the P2 process
does a write operation at 0x7500, it must be interrupted by an
error. The memory security strategy is that a valid address range is
stored for each process, and each memory access operation is checked
for an address belonging to that range


❖ 
Lack of binding to physical memory addresses . The process can be
performed regardless of its memory location and physical memory
size. The process address space is allocated as a large static address
set, with each address of the set being moved. Processor and hardware
should be able to convert these addresses to physical addresses of
main memory (the same address placeable at different times or for
different processes may correspond to different places including his
address)

Download 6,34 Mb.
1   ...   57   58   59   60   61   62   63   64   ...   203




Download 6,34 Mb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



Fundamentals of Virtual Memory Technology

Download 6,34 Mb.
Pdf ko'rish