In last post we learned that the memory management in the operating systems in necessary in order for the relocation, protection and sharing of data between the running processes. Each process is a program in execution and each program is a piece of code that is translated into machine code and instructions for execution by the CPU. Each process has its own instructions in the memory and are executed according to these instructions.
A process has a logical address space. It is a linear set of locations per program code, variables and stacks. All or some part of the logical address space is then converted into physocal addresses in the main memory. The address space is a product of translation-linking-loading process and the physical address is a subset of the main memory.
Translators from the source code generate relocateable object code modules and then these modules are linked with each other to form another single module called a load-module. This module is loaded into the main memory. The process of converting addresses generated by the translator to physical addresses in the memory is called adrress binding and must be done at some time in the process execiton. This binding can be done at compile time, run time or load time. The most common time for modern systems is run time.
Types Of Addresses
Following are the different types of addresses.
Symbolic Addresses
The variable names and named instructions in the source code. The translator translates them into logical addresses.
Logical Addresses
Logical addresses are assigned independent of the physical locations and may require more mapping operatins to be bound to the absolute addresses.
Relative Addresses
This address is assigned by the transaltor and is kind of a logical address. This address is expressed as a location to some known point such as the beginning of the process.
Physical Addresses
It is also called absolute address and is the actual space in the main memory where instructions and variables are loaded.