Memory Management in Operating Systems - Easy Notes
1. Basic Bare Machine
Imagine a computer without any OS - just a bare machine. No safety, no interface. Programs access
hardware directly, but one crash can crash the whole system.
2. Resident Monitor
A small part of the OS that stays in memory permanently. It helps in scheduling and basic I/O. Like a mini
manager always watching.
3. Fixed Partitioning
Memory is divided into equal-sized parts. Each program gets one block. Wastes memory if program is small
(internal fragmentation).
4. Variable Partitioning
Partitions created as per program size. Less waste, but causes external fragmentation (free memory
scattered).
5. Protection Scheme
OS prevents one program from accessing another's memory. Adds security and stability.
6. Paging
RAM divided into fixed-sized frames, and process into pages. Pages fit into any frame. No external
fragmentation, but needs page table.
7. Segmentation
Memory divided based on logical program parts (code, data, stack). Can cause external fragmentation.
8. Segmented Paging
Memory Management in Operating Systems - Easy Notes
First divide into segments, then pages. Combines logical structure and efficient memory use.
9. Virtual Memory
Use hard disk as extra memory. Allows running big programs in small RAM. Implemented using paging.
10. Demand Paging
Only load required pages into memory. Others stay in disk. Saves RAM but may cause page faults.
11. Performance of Demand Paging
Measured by page fault rate. Lower the rate, better the performance.
12. Page Replacement Algorithms
When memory is full, choose which page to replace:
- FIFO: First In First Out
- LRU: Least Recently Used
- Optimal: Ideal but theoretical
13. Thrashing
Too many page faults slow the system down badly. Happens when memory is overloaded.
14. Cache Memory
Fast memory between CPU and RAM. Stores frequently accessed data. Speeds up processing.
15. Locality of Reference
Programs access nearby or recently used memory repeatedly. Used to improve caching and performance.