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
- The CPU generates logical addresses and represents a program’s virtual memory location.
- Physical addresses correspond to actual memory locations within the computer’s hardware.
- 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.
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.
Comparison Table
Parameters Of Comparison | Logical Address | Physical Address |
---|---|---|
Definition and existence | A 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 Space | All 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 generation | The CPU is responsible for the generation of the logical address. | The MMU is responsible for the generation of physical addresses. |
Visibility to the user | The 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 rebooting | The logical address gets lost and is unrecoverable when the system undergoes rebooting. | Rebooting of the system affects the physical address in no way. |
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.
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
- 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.
- Logical Address Space is the common space where logical addresses are stored. But, in Physical Address Space, all the physical addresses are stored.
- The CPU generates the logical addresses. But MMU generates the physical addresses.
- The logical address is viewable and visible to the user. On the other hand, the physical address is unviewable on the user’s part.
- 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.
The satirical tone in some parts of the article was not expected but contributed to making the reading more enjoyable.
The author has done an excellent job of simplifying a complicated subject. Kudos to them!
I have a hard time understanding these concepts, but this article provided a clear explanation.
This was a very well explained article. All the information you need is right there.
Totally agree with you! This article is a great source of information on the subject.
The comparison table is quite helpful, and the article is well structured and informative.
Although the information provided is very comprehensive, the writing style makes it feel a bit dry and academic.