Difference between Logical and Physical Address in OS

The logical address is the virtual address that is generated by the CPU to handle the memory request the process is making for their execution at that point of time the CPU temporarily and dynamically allocates the address in the primary memory but when the program is done with the execution and is required to be saved in the main memory than dynamic linking is called by the operating system which links the logical or virtual address that is generated by the CPU to the real address that is present in the main memory of the computer system and this physical address can only be accessed by the logical address and user cannot access the physical address directly.

Difference between Logical and Physical Address in OS

Logical Address Physical Address
The logical address is a virtual address and does exist in physical memory The physical address is the actual address that is stored in the computer memory
They are allocated by the CPU during the runtime of the program They are allocated by the CPU to store the data inside the memory address
These addresses are also known as a reference to address in the memory They address are mapped in memory in corresponding to the logical address they are the real address in the memory
The logical address is visible to the user  The physical address is not visible to the user
The logical address is generated by the CPU The physical address is generated by the Memory Unit
The user is able to access the physical address via the logical address by the address translation The user cannot access the logical address directly without the virtual address
The base address in logical addressing is the starting memory block in primary memory The base address in physical addressing is the register in which the memory resides
Load time and compile time methods are used for binding the logical address to the physical address After the binding, the physical address are placed in their respective registers
There is no limit in the logical address and they can range from zero to maximum There is a limit in the physical address as they are actual memory space that can be filled completely
The logical address is only used by the operating system to use find the physical address The physical address is used by both the hardware and the software 
The logical address is dynamic and keeps on changing for optimum performance of the process that is in execution The physical address does not change as the logical address 
The logical address helps to identify the physical address in the memory The physical helps to identify the actual location in the main memory
The logical address is cleared when the computer is booted The physical address remains intact and stored even after being booted
Multiple programs use the logical address to be used at the same time  When all the programs have used the logical address then they are mapped in main memory and stored as physical address
The dynamic loading concept is used in the logical address The dynamic linking concept is not used in the physical address

Leave a Comment