AfterAcademy Tech
•
30 Mar 2020

The addresses identify a location in the memory. In the operating system, when we talk about memory we discuss a location where the actual code resides in the system. Like we have the address of our house so that anyone can reach out to us. In the same way, we store the data in the memory at different locations with addresses so that we can access the data again whenever required in the future. There are two types of addresses that are used for memory in the operating system i.e. the physical address and logical address about which we will learn in this blog. So, let's get started.
The physical address refers to a location in the memory. It allows access to data in the main memory. A physical address is not directly accessible to the user program hence, a logical address needs to be mapped to it to make the address accessible. This mapping is done by the MMU. Memory Management Unit(MMU) is a hardware component responsible for translating a logical address to a physical address.
A logical address or virtual address is an address that is generated by the CPU during program execution. A logical address doesn't exist physically. The logical address is used as a reference to access the physical address. A logical address usually ranges from zero to maximum (max). The user program that generates the logical address assumes that the process runs on locations between 0 to the max. This logical address(generated by CPU) combines with the base address generated by the MMU to form the physical address.
The diagram below explains how the mapping between logical and physical addresses is done.

This was about the differences between logical and physical addresses. Hope you learned something new today.
Do share this blog with your friends to spread the knowledge. Visit our YouTube channel for more content. You can read more blogs from here.
Keep Learning 🙂
Team AfterAcademy!
AfterAcademy Tech
In this blog, we will learn what an Operating System is and what are the goals of an Operating System. We will also learn the functionalities of an Operating System that helps in achieving the goal of the OS.

AfterAcademy Tech
In this blog, we will learn about the difference between Mutex and Semaphore in the Operating System. We will first learn about Mutex and Semaphore and after that, we will find the difference between them.

AfterAcademy Tech
In this blog, we will learn about Process in Operating System and we will also learn about the various states of a Process during its life cycle.

AfterAcademy Tech
In this blog, we will learn about the Multicore and Multiprocessor Systems and we will also see the difference between these two confusing terms.
