Logical Address is generated by CPU while a program is running. The logical address is virtual address as it does not exist physically, therefore, it is also known as Virtual Address. This address is used as a reference to access the physical memory location by CPU. The term Logical Address Space is used for the set of all logical addresses generated by a program’s perspective.
The hardware device called Memory-Management Unit is used for mapping logical address to its corresponding physical address.
Physical Address identifies a physical location of required data in a memory. The user never directly deals with the physical address but can access by its corresponding logical address. The user program generates the logical address and thinks that the program is running in this logical address but the program needs physical memory for its execution, therefore, the logical address must be mapped to the physical address by MMU before they are used. The term Physical Address Space is used for all physical addresses corresponding to the logical addresses in a Logical address space.
Mapping virtual-address to physical-addresses
Differences Between Logical and Physical Address in Operating System
- The basic difference between Logical and physical address is that Logical address is generated by CPU in perspective of a program whereas the physical address is a location that exists in the memory unit.
- Logical Address Space is the set of all logical addresses generated by CPU for a program whereas the set of all physical address mapped to corresponding logical addresses is called Physical Address Space.
- The logical address does not exist physically in the memory whereas physical address is a location in the memory that can be accessed physically.
- Identical logical addresses are generated by Compile-time and Load time address binding methods whereas they differs from each other in run-time address binding method. Please refer this for details.
- The logical address is generated by the CPU while the program is running whereas the physical address is computed by the Memory Management Unit (MMU).
|Paramenter||LOGICAL ADDRESS||PHYSICAL ADDRESS|
|Basic||generated by CPU||location in a memory unit|
|Address Space||Logical Address Space is set of all logical addresses generated by CPU in reference to a program.||Physical Address is set of all physical addresses mapped to the corresponding logical addresses.|
|Visibility||User can view the logical address of a program.||User can never view physical address of program.|
|Generation||generated by the CPU||Computed by MMU|
|Access||The user can use the logical address to access the physical address.||The user can indirectly access physical address but not directly.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Physical and Logical File Systems
- Difference between Physical and Logical Topology
- Difference between Physical and Logical Data Independence
- Difference Between Network Address Translation (NAT) and Port Address Translation (PAT)
- Difference between MAC Address and IP Address
- Difference between 3-address instruction and 1-address instruction
- Difference between 3-address instruction and 0-address instruction
- Difference between 3-address instruction and 2-address instructions
- Difference between 2-address instruction and 1-address instructions
- Mapping Virtual Addresses to Physical Addresses
- Traps and System Calls in Operating System (OS)
- System Protection in Operating System
- User View Vs Hardware View Vs System View of Operating System
- System Programs in Operating System
- File System Implementation in Operating System
- Xv6 Operating System -adding a new system call
- Logical Clock in Distributed System
- Threads and its types in Operating System
- Privileged and Non-Privileged Instructions in Operating System
- Booting and Dual Booting of Operating System
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : VaibhavRai3