Logical Address vs Physical Address: Difference and Comparison

In an operating system, memory management and huge amounts of data stand as their prime functionality. Thus, each specific item has assigned addresses, which act like a residence for the particular data type.

It helps the operating system in handling and managing the data properly. The two most popular addresses are the logical address and the physical address.

Although these addresses are interlinked to each other, they differ from each other at specific points.

Key Takeaways

  1. The CPU generates logical addresses and represents a program’s virtual memory location.
  2. Physical addresses correspond to actual memory locations within the computer’s hardware.
  3. Address translation occurs between logical and physical addresses, managed by the memory management unit (MMU).

Logical Address vs Physical Address

The difference between logical address and pressure address is that logical address has no real existence, whereas physical address has real existence. The logical address needs to be mapped to its respective physical address. Moreover, the responsibility for the generation of logical addresses rests on the CPU. But, the responsibility of the generation of logical addresses rests on the MMU.

Logical Address vs Physical Address

A logical address is a virtual position that is referred to during the arrangement of positions of other system components. With proper binding methods, it’s used to identify physical addresses.

The address space allocated to all logical addresses is known as logical address space. Due to its virtual existence, it’s visible and viewable to the user. 

The physical address is the real address allocated to any particular item in the storage cell. It’s written in binary form and thus helps the data bus identify and access a particular storage cell.

As it’s generated and managed by MMU, it stays constant and unchanged after rebooting the system. Moreover, it’s not visible to the users.

The address space allocated to all physical addresses is known as physical address space.

Also Read:  Agile vs Scrum: Difference and Comparison

Comparison Table

Parameters Of ComparisonLogical AddressPhysical Address
Definition and existenceA logical address refers to a virtual address where the position of an item is assumed from the view of a occurring program/application. It’s virtual and has no real existence.The physical address is the real address or actual memory location present in the address bus circuitry. It has real validity in the memory. 
Address SpaceAll the logical addresses are stored in a common space known as Logical Address Space.All the physical addresses are stored in a common space known as Physical Address Space.
Source of generationThe CPU is responsible for the generation of the logical address.  The MMU is responsible for the generation of physical addresses.
Visibility to the userThe logical address, although it is a virtual address, is viewable and visible to the user. Despite being a real address, the physical address is unviewable on the part of the user.
Effect of rebootingThe logical address gets lost and is unrecoverable when the system undergoes rebooting.Rebooting of the system affects the physical address in no way.
Pin This Now to Remember It Later
Pin This

What is Logical Address?

The logical address is the virtual address where the position of an item is assumed from the view of a prevailing program/application.

As it’s a virtual position, it’s used to identify positions of other things in the system. The MMU uses various binding methods to curate logical addresses corresponding to the respective physical addresses.

As the process of generation of logical addresses from the CPU starts at 0, the range of logical addresses starts from 0 and extends to the maximum. 

Thus, the logical address becomes useful only when the physical address is mapped using some binding methods. The logical address is viewable by the user.

However, its existence is virtual and, thus, has no real existence in the memory of the computer. Moreover, the logical address keeps varying with the system and is, thus, variable.

Moreover, the logical address, being variable, gets changed when affected by the rebooting of the system. The rebooting of the system erases all the logical addresses.

Also Read:  PGP vs GPG: Difference and Comparison

All the logical addresses are stored in a common space known as Logical Address Space. The space occupied by the logical address should be low in comparison to that of the physical address.

It’s essential so that it fits into the main memory properly. 

What is Physical Address?

The physical address, also known as a binary address, refers to the real address or actual memory location present in the address bus circuitry.

It acts like a key to any storage cell of the main memory, thereby providing access to it. The representation of physical addresses takes place in binary numbers. 

The physical address or the real address corresponding to a particular logical address or the virtual address is computed, managed, and used by the Memory-Management Unit (MMU).

The user handles the virtual or the logical address, which stands corresponds to a physical address. Although the user deals with logical addresses, the program demands physical addresses for execution.

Thus, mapping a logical address into its corresponding physical address is essential. 

The visibility of the physical address, consisting of the physical addresses of all the logical addresses, respectively, remains hidden.

Thus, the necessity of pointers to assign physical addresses to the respective logical addresses becomes crucial. Moreover, the physical address remains unchanged due to its real existence.

Even after rebooting the system, the physical address stays unchanged without any effect. The binding methods of both these addresses are common due to their resemblance in many features.

All the physical addresses are stored in a common space known as Physical Address Space.

Main Differences Between Logical Address and Physical Address

  1. A logical address is a virtual address having existing applications and programs, which act as a reference for the position of items. It’s virtual and has no real existence. In contrast, the physical address is the real address. The address bus circuitry has the actual memory location in it where the physical address is stored.
  2. Logical Address Space is the common space where logical addresses are stored. But, in Physical Address Space, all the physical addresses are stored.
  3. The CPU generates the logical addresses. But MMU generates the physical addresses.
  4. The logical address is viewable and visible to the user. On the other hand, the physical address is unviewable on the user’s part.
  5. During the reboot, the logical address gets lost and is unrecoverable. On the contrary, rebooting of the system involves the physical address in no way. 
References
  1. https://ieeexplore.ieee.org/abstract/document/9043680/
  2. https://ieeexplore.ieee.org/abstract/document/6727105/

dot 1
One request?

I’ve put so much effort writing this blog post to provide value to you. It’ll be very helpful for me, if you consider sharing it on social media or with your friends/family. SHARING IS ♥️

Sandeep Bhandari
Sandeep Bhandari

Sandeep Bhandari holds a Bachelor of Engineering in Computers from Thapar University (2006). He has 20 years of experience in the technology field. He has a keen interest in various technical fields, including database systems, computer networks, and programming. You can read more about him on his bio page.

7 Comments

  1. The satirical tone in some parts of the article was not expected but contributed to making the reading more enjoyable.

Leave a Reply

Your email address will not be published. Required fields are marked *

Want to save this article for later? Click the heart in the bottom right corner to save to your own articles box!