Logical Address vs. Physical Address in Operating System

The difference between a logical address and the physical address is that logical address is a virtual address that is generated by the CPU whereas physical address is located in the memory unit of a computer.

There are memory and registers in the computer system, there is an address of registers, and these registers are used to store data and information. The registers are called by their address; there are two types of addresses one is logical address and second is a physical address. There is a lot of difference between a logical address and physical address it can be right to say that both logical address and physical address are two different things which play an important role in our computer system. If we talk about the main difference, then the main difference between a logical address and the physical address is logical address is a virtual address that is generated by the CPU whereas physical address is located in the memory unit of the computer. The registers are identified by using the address. Physical address in the computer system identifies a physical location in memory. The Memory management unit of computer system computes physical address. The physical address is generated for every logical address by using a memory management unit. The user has to deal with a logical address and have to never use a physical address. The program that is generated by the user can be executed by physical address; users are confused because they think that logical address is responsible for the generation of code, but this is not true. The most important part is the mapping of the logical address to physical address. The memory management unit plays are a very important role in the mapping of logical address and physical address.

The logical address is viewed by the user as it is a virtual address on the other hand user cannot see physical address directly because it is not a virtual address. The reference in the computer is known as a logical address and the logical address is used to access physical address.  CPU generates an address, and this address is used to call data from the registers, and the address generated by CPU is known as a logical address. The logical address is virtual because it does not exit physically and this is also one of the main difference between a logical address and physical address.  There is a term logical address space; this term is the set of the logical address that is generated by a program. Every logical address has its own physical address, and there is a correspondence between the logical address and its physical address. This correspondence is shown by a hardware system that is a memory management unit. The role of the memory management unit is to generate identical logical and physical address, and these identical logical and physical address are generated during compile time and load time.

Comparison Chart

Basis Logical address Physical address
Meaning the logical address is a virtual address that is generated by the CPU The physical address is located in a memory unit of the computer.
User The user can view logical address The user cannot view physical address
Access The user has access to the logical address The user has no access to the physical address
Generated The logical address is generated by CPU The physical address is generated by the Memory management unit

 What is Logical address?

CPU generates an address, and this address is used to call data from the registers, and the address generated by CPU is known as a logical address. The logical address is virtual because it does not exit physically and this is also one of the main difference between a logical address and physical address.  There is a term logical address space; this term is the set of the logical address that is generated by a program. Every logical address has its own physical address, and there is a correspondence between the logical address and its physical address. This correspondence is shown by a hardware system that is memory management unit. The role of the memory management unit is to generate identical logical and physical address, and these identical logical and physical address are generated during compile time and load time.

What is Physical address?

Physical address in the computer system identifies a physical location in memory. The Memory management unit of computer system computes physical address. The physical address is generated for every logical address by using memory management unit. The user have to deal with logical address and have to never use physical address. The program that is generated by the user can be executed by physical address; users are confused because they think that logical address is responsible for the generation of code, but this is not true. The most important part is the mapping of the logical address to physical address. The memory management unit plays are a very important role in the mapping of logical address and physical address.

Key Differences between Logical Address and Physical Address in Operating System

  1. The logical address is a virtual address that is generated by the CPU whereas Physical address is located in the memory unit of the computer.
  2. The user can view logical address whereas the user cannot view physical address.
  3. The user has access to logical address whereas user has no access to a physical
  4. The logical address is generated by CPU whereas physical address is generated by the Memory management unit

Conclusion

In this article above we see the difference between a physical address and a logical address.

Explanatory Video

1 thought on “Logical Address vs. Physical Address in Operating System”

Leave a Comment