BCA / B.Tech 12 min read

Logical and Physical Address in Operating System

Logical and Physical Address in Operating System:


In a computer system's memory management, logical and physical addresses are two key concepts. To execute a program, the processor (CPU) fetches data and instructions from memory, which are located at specific addresses. Logical and physical addresses determine how the processor accesses memory and executes the program.

Logical Address (or Virtual Address):

A logical address is an address viewed from the program's perspective. It is generated by the CPU when a program is executing an instruction. This address is what the programmer sees and is available at the user level.
Characteristics:
  • It is a virtual address, not directly understood by the hardware. It must be translated to a physical address.
  • Each process has its own separate logical address space, independent of physical memory.

Physical Address:

A physical address is the address actually used to store or access data in the computer's physical memory (RAM). It is the address communicated between the CPU and the memory unit.
Characteristics:
  • It is the real address in the computer's RAM.
  • It is at the hardware level and not directly controlled or accessed by the user.
  • The physical address space represents the actual memory of the computer.

Difference between Logical and Physical Address:

A logical address is virtual and generated by the CPU during program execution, visible at the user level. A physical address is the real address in the computer's RAM, at the hardware level. The Memory Management Unit (MMU) translates the logical address into a physical address.

Translation from Logical to Physical Address:

The Memory Management Unit (MMU) is used to convert a logical address into a physical address. This process is called address translation. The main goal is to ensure each process gets the memory it needs without interfering with another process's memory.
Translation Process:
  1. Logical Address Generation: The CPU generates a logical address when a program tries to access memory.
  2. Memory Management Unit (MMU): The MMU takes the logical address and converts it into a physical address. A common method is to add a `base address` to the logical address.
  3. Physical Memory Access: The processor uses the physical address to access the data or instruction from RAM.

In this Chapter

Logical and Physical Address in Operating System
Distributed System in Operating System
Real-Time System in Operating System
System Calls in Operating System
System Programs in Operating System
Structure of an Operating System
Layered Design of an Operating System Structure
UNIX in Operating System
Virtual Machine in Operating System
Kernel-Based Operating System
Process Concept in Operating System
Interacting Processes in Operating System
Threads in Operating System
Fundamentals of Scheduling in Operating System
Scheduling Criteria in Operating System
Long, Medium, and Short-Term Scheduling
Scheduling Algorithms in Operating System
Structure of a Concurrent System
Critical Region in Operating System
Critical Section in Operating System
Inter-process Communication (IPC) in Operating System
Monitors in Operating System
Semaphores in Operating System
Semaphore Implementation & Uses in Operating System
Swapping in Operating System
Contiguous Allocation in Operating System
Segmentation in Operating System
Paging in Operating System
Virtual Memory using Segmentation in Operating System
Interprocess Communication Protocol in Operating System
Network Operating System
Design Issues in Distributed File System
Network Structure in Operating System
Structure of a Distributed System
File System and Coordination in Operating System
History of Linux in Operating System
Linux Commands
Programmer Interface & File Manipulation in Linux
Process Control in Linux
Kernel & Signals in Linux
File System in Linux
Blocks and Inodes in Linux
System Editors in Linux
Character Transliteration in Linux
The `ed` Line Editor in Linux
The `vi` Editor and Its Commands
Shell Scripting in Linux
Looping & Decision Making in Linux Shell Scripting
Variables & File Name Expansion in Linux
Arrays in Linux Shell Scripting
Subprograms (Functions) in Linux Shell Scripting
C Interface with Linux
Simple Shell Programs in Linux
BCA Part-1 | Operating Systems | Semester-I | MDSU Exam Paper 2023 (Held in 2024)
What is an Operating System (OS)
Operating System (OS) All Important Questions and Answers in English (MDSU)
BCA || Operating System 2025 Paper || MDSU Exam Paper
BCA | OS(Operating System) 2023 Paper | MDSU Exam Paper
Types of Operating Systems
Goals of an Operating System
Operations of an Operating System
Resource Allocation & Functions in an Operating System
Classes of Operating System
Batch Processing in Operating System
Multiprocessing in Operating System
Time-Sharing in Operating System