Operating System
OS Part-1
OS Part-2
- File Concepts and Access methods
- Free Space Management and Allocation methods
- Directory Systems and Protection
- File Organization, Sharing and Implementation issues
- Disk and Drum Scheduling
- I/O Devices Organisation & I/O Buffering
- I/O Hardware, Kernel I/O subsystem and Transforming I/O Requests to Hardware Operations
- Device Drivers and Path Management
- Device Driver Sub Modules and Procedure
- Device Scheduler and Handler
- Interrupt Service Routine (ISR)
- File System in Linux and Windows
OS Part-3
- Process and Process Control Block(PCB)
- Process Scheduling( Preemptive and Non Preemptive)
- Scheduling Algorithms
- Algorithm Evaluation
- Multiple Processor Scheduling
- Real Time Scheduling
- Operations on Processes
- Threads
- Inter-Process Communication
- Precedence Graphs
- Critical Section Problem
- Semaphores
- Classical Problems of Synchronization
- DeadLock
- Deadlock Prevention and Avoidance
- Deadlock Detection and Recovery
- Process Management in Linux
OS Part-4
- Memory Hierarchy in OS
- Concepts of Memory Management
- MFT and MVT
- Logical and Physical Address Space
- Swapping
- Contiguous and Non Contiguous Memory Allocation
- Paging
- Segmentation
- Paging Combined with Segmentation
- Structure and Implementation of Page Table
- Virtual Memory in OS
- Cache Memory Organization
- Demand Paging
- Page Replacement Algorithms
- Allocation of Frames and Thrashing
- Demand Segmentation
OS Part-5
- Distributed Operating System: Introduction and Types
- Distributed OS: Design Issues
- Distributed OS: File System
- Distributed OS: Remote File Access
- Remote Procedure Call(RPC)
- Remote Method Invocation(RMI)
- Distributed Shared Memory
- Parallel Processing and Concurrent Programming
- Security and Threats Protection in Distributed OS
- Security Design Principles and Authentication in Distributed OS
- Sensor Network and Parallel OS
Logical and Physical Address Space in Operating System
Addressing ek important concept hai jo memory management aur process execution me use hota hai. Jab ek program execute hota hai, toh uske liye memory addresses ka use hota hai. Ye addresses two types ke hote hain:
Logical Address (Virtual Address)
Physical Address
What is Logical Address?
Logical Address wo address hota hai jo CPU generate karta hai kisi program ke execution ke time par.
Ye address User ko dikhai deta hai aur Process ke perspective se memory location ko represent karta hai.
Logical Address Space ka matlab hai poore program ke execution ke dauraan jo logical addresses generate hote hain unka set.
MMU (Memory Management Unit) Logical Address ko Physical Address me convert karta hai.
Example:
Agar ek program execute ho raha hai aur usme int a = 10;
declare kiya gaya hai, toh: CPU is variable
a
ko logical address 1001 assign karega. Lekin RAM me ye physical address 5001 par store ho sakta hai.
What is Physical Address?
Physical Address wo actual address hota hai jisme data RAM me store hota hai.
Ye hardware level ka address hota hai jo OS aur MMU handle karti hai.
Users ko physical address ka pata nahi chalta, kyunki unhe sirf logical address dikhai deta hai.
Example:
Agar ek process ka logical address 0x1234
hai aur Memory Management Unit (MMU) base address 0x4000 use karti hai, toh:
Physical Address = Logical Address + Base Address
0x1234 + 0x4000 = 0x5234
Logical vs Physical Address – Key Differences
Feature | Logical Address | Physical Address |
---|---|---|
Definition | CPU ke dwara generate kiya gaya address | Actual RAM ka address jisme data store hota hai |
Visibility | User ko dikhai deta hai | User ko nahi dikhai deta |
Conversion | MMU Logical Address ko Physical me convert karta hai | Ye RAM me actual store hota hai |
Modification | OS ke dwara modify kiya ja sakta hai | Directly modify nahi hota |
Security | More secure | Less secure compared to Logical Address |
How Logical Address is Converted to Physical Address?
Logical Address se Physical Address ka conversion MMU (Memory Management Unit) karta hai.
Base Register aur Limit Register ka use hota hai address translation ke liye.
Example (Address Translation with MMU)
Agar ek process ka Base Address = 5000 aur Logical Address = 200, toh:
Physical Address = Base Address + Logical Address
5000 + 200 = 5200
Diagram (Address Mapping)
Logical Address → MMU → Physical Address
(200) (Base = 5000) (5200)
Why Do We Need Logical and Physical Address?
Process Isolation: Har process apne logical address space me kaam karta hai, jo security provide karta hai.
Memory Management: OS virtual memory ko efficiently manage karta hai.
Multitasking Support: Multiple processes execute ho sakte hain bina physical address conflicts ke.
Conclusion
Logical Address CPU generate karta hai aur user ke perspective se hota hai.
Physical Address actual RAM location hota hai jisme data store hota hai.
MMU Logical Address ko Physical Address me convert karta hai.
Address translation se Memory Management easy aur efficient banta hai.