Introduction to Physical Address vs Logical Address
- A physical address is an address that is used to identify the physical location of the memory. MUM that is the memory management unit does not access physical address directly, instead, it uses the logical address to access the physical address. For computing physical address MUM use logical address. Like memory management unit users cannot access physical address directly. A physical address is accessed by using their corresponding logical address. When a user runs the program, the program is run on the logical address, but to run a logical address i.e. program it needs a physical address to store the program. So, there is a need to map the logical address to physical address before they are going to be used in the program. To map a logical address to physical address, memory management unit hardware is used.
- A logical address is generated by a CPU (central processor unit) when the program runs on the computer. A logical address is also known for virtual address as they do not exist physically. This address is used as a reference to access the physical address of the CPU.
At run-time memory management unit generate different physical and logical address, while at load and compile-time memory management unit generates the same physical address and logical address.
Head to Head Comparison between Physical Address vs Logical Address (Infographics)
Below is the top 9 Comparison between Physical Address vs Logical Address:
Key Difference between the Physical Address and Logical Address
Let us discuss some of the major key differences between Physical Address vs Logical Address:
- A physical address is an address that shows the location of memory while a logical address shows the address of the CPU i.e. central processor unit generates the Address.
- One device can have only one physical address. They are constant so they cannot be changed. One device can have a variety of logical addresses. Whereas logical addresses are dynamic they can be changed.
- The memory management unit generates the physical address, while the CPU generates the logical address.
- The mapping of physical address to logical address is considered as a physical address. For programs, CPU generates the set of logical addresses known as a logical address space.
- A physical address cannot be accessed directly while we can access logical addresses directly.
- Users cannot view physical addresses while they can view logical addresses easily.
- Physical Addresses Space is a set of all Physical addresses generated in a program. Also, Logical Addresses Space is a set of all Logical addresses generated in a program.
- Physical addresses and Logical addresses need the same time for compiling and load time addresses binding schemes. On the other hand, physical addresses and logical addresses take different times for execution.
- A physical address is used to identify the location of the memory while on the other hand logical address is used to access physical address.
Comparison Table of Physical Address vs Logical Address
The table below summarizes the comparisons between Physical Address vs Logical Address:
|Basics for comparison||Physical Address||Logical Address|
|Definition||The physical address is a location of memory/storage.||Logical addresses are generated by the CPU.|
|Generated By||The physical address is generated by MUM (Memory management unit)||The logical address is generated by the CPU (Central processor unit).|
|Accessed By||Users cannot access physical addresses directly. It uses a logical address to access physical addresses.||Users can access logical addresses directly. It is used to access physical addresses.|
|Space for Address||A set of the physical address is mapped into the logical address and is considered as a physical address.||CPU generates a set of the logical address corresponding to programs are considered as logical address space.|
|Visibility||It is not visible to the user. Users cannot view the physical address.||It is visible to the user. Users can view logical addresses easily.|
|Variation||There is only one physical address for one device. Physical addresses are constant.||The logical addresses can be varied. There are variations for the logical address.|
|Access to Change||A physical address cannot change.||The logical address can be change.|
|Uses||It is used to find the physical location of the memory.||It is used to view the physical address.|
|Time for compilation and load time address binding schemes||Same as Logical addresses.||Same as Physical addresses.|
In this article, we have seen differences between Physical addresses and Logical addresses with their key differences. I hope you will find this article helpful.
This has been a guide to the top difference between Physical Address vs Logical Address. Here we also discuss the Physical Address vs Logical Address key differences with infographics, and comparison table. You may also have a look at the following articles to learn more–