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
Memory Hierarchy in Operating System
Memory Hierarchy ek structured arrangement hai jo different types ki memory ko speed, cost, aur size ke basis par organize karta hai. Yeh hierarchy ensure karti hai ki CPU fastest memory ko access kare aur overall performance optimize ho.
Memory Hierarchy Levels
Memory Hierarchy ko sabse fast aur costly memory se lekar sabse slow aur cheap memory tak divide kiya jata hai.
Diagram of Memory Hierarchy:
+------------------+ Fastest, Expensive, Smallest
| Registers |
+------------------+
| Cache Memory |
+------------------+
| Main Memory |
+------------------+
| Secondary Storage (HDD, SSD) |
+------------------+
| Tertiary Storage (Magnetic Tape) |
+------------------+ Slowest, Cheapest, Largest
Types of Memory in Hierarchy
1. Register
-
Fastest memory jo CPU ke andar hoti hai.
-
Direct CPU access karta hai.
-
Size bahut chhoti hoti hai (kuch bytes tak).
-
Example: Program Counter (PC), Stack Pointer (SP).
Example:
Agar ek CPU addition perform kar raha hai, toh values registers me store hongi:
MOV AX, 5 ; (Register AX me 5 store karo)
MOV BX, 3 ; (Register BX me 3 store karo)
ADD AX, BX ; AX = AX + BX (5 + 3 = 8)
2. Cache Memory
-
Registers ke baad sabse fast memory hoti hai.
-
CPU aur RAM ke beech ka buffer hai jo frequently used data ko store karta hai.
-
L1, L2, L3 Cache levels hoti hain (L1 fastest but smallest hoti hai).
Example: Jab aap frequently koi software open karte hain, toh uska data cache me store hota hai taki fast access ho sake.
3. Main Memory (RAM)
-
CPU ka direct access hota hai.
-
Programs execution ke waqt RAM me load hote hain.
-
Volatile Memory hai (power off hone par data delete ho jata hai).
Example: Jab aap Google Chrome chalate ho, toh uska execution RAM me hota hai. Agar RAM full ho jaye toh system slow ho jata hai.
4. Secondary Storage (HDD, SSD)
-
Hard Disk aur SSD data permanently store karne ke liye use hoti hai.
-
Slower than RAM, par non-volatile hoti hai.
-
SSD (Solid State Drive) faster hoti hai HDD se.
Example: Aapke laptop ka operating system HDD ya SSD me store hota hai. Booting ke time pe ye RAM me load hota hai.
5. Tertiary Storage (Magnetic Tape, Optical Disk)
-
Cheapest aur slowest storage hoti hai.
-
Mostly backup aur archival purposes ke liye use hoti hai.
Example: Data centers me old backups magnetic tapes me store kiye jate hain.
Memory Hierarchy Optimization
-
Caching: Frequently used data ko fast memory me store karna.
-
Paging & Segmentation: RAM me efficiently data store karne ke liye use hota hai.
-
Virtual Memory: Agar RAM full ho jaye toh secondary storage ka ek part use hota hai.
Conclusion
Memory Hierarchy CPU performance ko optimize karta hai.
Faster memory (Registers, Cache) costly aur chhoti hoti hai, aur slower memory (HDD, Magnetic Tape) cheap aur badi hoti hai.
Caching aur Virtual Memory jaise techniques system performance improve karne me help karti hain.