CREATE OWN LIBRARY

Logical And Physical Address Space

 

Logical address: An address generated by the CPU is referred to as a logical address.

 

Physical address: An address of the main memory where data are store is called a physical address.

 

Compile Time Binding: After compiler time-binding, symbolic addresses (unresolved symbol) translated to either

 

i) At absolute addresses if we know where the process will reside in main memory at compile time.

Or

ii) Relocatable addresses if we do not know where the process will reside in the main memory at compile time. It is called Static binding.

 

Load Time Binding: When the compiler translates symbolic addresses to relocatable addresses then the loader finally translates symbolic addresses to absolute addresses. It is called dynamic binding.

 

Execution time Binding: It is done when the process can be moved from one memory segment to another one. Here biding must be delayed because of this move during its execution. It needs hardware support for address binding like base and limit register. 

 

The compile-time and load-time address-binding methods generate identical logical and physical addresses. However, the execution time address-binding is differing from logical and physical addresses.

 

Here we refer logical addresses to virtual addresses even we can use logical addresses and virtual addresses names alternatively.

 

# Set of all logical addresses generated by a program is a called logical address space. And the set of all physical addresses corresponding to these logical addresses is called physical address space

 

The run-time mapping from virtual to physical addresses is done by a hardware unit called Memory Management Unit (MMU). There is a different kind of mapping method is used.

 

Initially, here we discuss a simple mapping method by MMU scheme that is generalized to the base-register scheme. This base register is called the relocation register.

 

The value in the relocation register is added to every address generated by a user process at the time the address is sent to memory (see figure below). 

For example, if the base is at 14000and as we know at compile-time, it thinks that the addresses of the user program at main memory starting from 0 (relocatable addresses). 

But when loading programs into the memory the relocatable addresses are converted into  absolute addresses  by adding the base register address.

 

If the logical addresses are 346 (relocatable address) then it converted into 14346 (absolute address) by MMU.

 

The user program never visualizes the real physical addresses. The user program deals with logical addresses. The memory-mapping hardware converts logical addresses into physical addresses.

 

However, these logical addresses must be mapped to physical addresses before they are used. The concept of a logical address space that is bound to separate physical address space is central to proper memory management.

 

Conversion of the logical address to a physical address using relocation register