ECET 2026 Preparation

Day 12 Morning: Operating Systems – Memory Management

Concept Notes: Memory Management in OS

🔹 1. What is Memory Management?

Memory Management is the process by which an OS handles allocation and deallocation of RAM to various processes efficiently and safely.

🔹 2. Objectives of Memory Management

  • Ensure efficient utilization of RAM
  • Prevent memory leaks
  • Provide protection and isolation among processes
  • Enable multiprogramming support

🔹 3. Types of Memory

Memory TypeDescription
Primary MemoryRAM (volatile)
Secondary MemoryHDD/SSD
Cache MemoryHigh-speed memory in CPU
Virtual MemoryPart of HDD used as fake RAM

🔹 4. Allocation Techniques

MethodDescription
ContiguousMemory blocks are adjacent
Non-contiguousMemory is divided across locations (paging etc.)

🔹 5. Paging

  • Divides memory into fixed-size blocks: Pages (logical) and Frames (physical)
  • Each process has a page table
  • Helps in reducing fragmentation

🔁 Example: If page size = 1KB and process = 5KB → needs 5 pages

🔹 6. Segmentation

  • Divides memory based on logical units like functions, arrays
  • Segment Table maintains base and limit for each segment

🔁 Example: Code segment, Data segment, Stack segment

🔹 7. Fragmentation

TypeDescription
InternalWasted space inside a block
ExternalFree memory scattered, not contiguous

🔹 8. Virtual Memory

  • Uses part of secondary memory as additional main memory
  • Enables running large programs
  • Implemented using paging + swapping

🔹 9. Swapping

  • Moving inactive processes to disk to free up RAM
  • Restores them when needed

🔹 10. Memory Protection

  • Prevents processes from accessing each other’s memory
  • Done using base and limit registers or paging protections

🧠 10 MCQs – Memory Management

1️⃣ What is the main purpose of memory management?
A) Managing hard disk
B) Allocating CPU time
C) Managing RAM for processes
D) Cleaning cache

2️⃣ Which technique breaks memory into fixed-sized blocks?
A) Segmentation
B) Contiguous allocation
C) Paging
D) Scheduling

3️⃣ In paging, pages are mapped to:
A) Tables
B) Frames
C) Segments
D) Registers

4️⃣ What type of memory is used in virtual memory?
A) ROM
B) HDD
C) Cache
D) Flash

5️⃣ Which of these causes internal fragmentation?
A) Small page size
B) Variable block size
C) Fixed-size allocation
D) External memory

6️⃣ What is a segment in segmentation?
A) Part of a file
B) Logical unit like code or stack
C) Hardware
D) Disk partition

7️⃣ What is the main difference between paging and segmentation?
A) Paging uses tables, segmentation doesn’t
B) Segmentation is logical, paging is physical
C) Both are same
D) Paging uses segments

8️⃣ What are base and limit registers used for?
A) CPU scheduling
B) Address translation
C) Memory protection
D) IO control

9️⃣ Which memory is fastest?
A) RAM
B) HDD
C) SSD
D) Cache

🔟 Which of the following causes external fragmentation?
A) Paging
B) Fixed-size memory
C) Non-contiguous allocation
D) Variable-sized allocation

✅ Answer Key

Q.NoAnswer
1C
2C
3B
4B
5C
6B
7B
8C
9D
10D

📖 Explanations

  • Q1: OS manages RAM among running processes.
  • Q2: Paging divides memory into fixed-size units.
  • Q3: Pages are stored in physical memory frames.
  • Q4: Virtual memory uses HDD space.
  • Q5: Fixed blocks lead to unused internal gaps.
  • Q6: A segment can be a function, array, stack, etc.
  • Q7: Paging = physical division, Segmentation = logical.
  • Q8: Used to restrict memory access.
  • Q9: Cache is closest and fastest to CPU.
  • Q10: External fragmentation occurs with variable allocations.

📥 Download Notes + MCQs PDF

📲 Telegram – @learnnewthingsoffcial
Includes: Diagrams + tables + solved problems

💬 Comment Challenge

💬 Write one line:
“What is the difference between internal and external fragmentation?”

Loading

Leave a comment

Your email address will not be published. Required fields are marked *