Qwestrum Engineering360 · IT & Software · Operating Systems
Memory Management
Memory management gives each process a virtual address space mapped to physical frames through page tables; the TLB caches recent translations, and demand paging with a replacement policy lets the working set exceed physical memory.
Exam tip: keep SI units consistent end-to-end, write the governing relation symbolically before substituting, and sanity-check magnitude and sign.
Key formulas & points
Skim these first — then read the full notes below.
- Demand paging loads a page only on a page fault
- Replacement policies: FIFO, LRU, optimal
- Segmentation plus paging: segment table then page table
Topic details
Introduction
This Galvin topic covers virtual memory. You translate virtual to physical addresses through page tables, compute effective access time with a TLB, analyse page-replacement algorithms (FIFO, LRU, optimal) and page-fault behaviour, and compare paging with segmentation.
Key relations & formulas
Formulas (Indian textbook notation)
(with TLB hit ratio h)
Formulas (Indian textbook notation)
Notation and sign conventions
Relation 1 —
Formulas (Indian textbook notation)
Write this relation with symbols exactly as in Operating System Concepts — Silberschatz, Galvin & Gagne before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Relation 2 —
(with TLB hit ratio h)
Write this relation with symbols exactly as in Operating System Concepts — Silberschatz, Galvin & Gagne before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Relation 3 —
Formulas (Indian textbook notation)
Write this relation with symbols exactly as in Operating System Concepts — Silberschatz, Galvin & Gagne before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Concept in depth
Virtual memory decouples a program’s address space from physical RAM, so each process sees a large contiguous space while the OS maps its pages to scattered frames on demand. Because a page-table lookup for every access would be slow, the TLB caches recent translations; a high hit ratio keeps effective access time near raw memory speed. Demand paging loads pages only when referenced, and when memory is full a replacement policy evicts a page — LRU approximates the optimal (evict the page used furthest in the future) using recency, while FIFO can suffer Belady’s anomaly where more frames cause more faults. Paging’s only waste is internal fragmentation in the final partial page.
Assumptions and validity limits
State assumptions explicitly before using any relation for memory management — steady state, uniform properties, linear elastic material, ideal gas, incompressible flow, etc., as applicable.
Wrong assumptions invalidate the entire solution even when the formula is correct. In Operating Systems viva and GATE descriptive questions, listing valid assumptions often earns separate marks.
Step-by-step problem approach
1. Read the question and list given data with SI units (common in Operating Systems papers).
2. Draw a neat labelled diagram where applicable — examiners in Indian universities award diagram marks even when arithmetic slips.
3. Identify which relation from this topic applies to memory management.
4. Use equation 1:
5. Use equation 2:
6. Substitute values, compute, and verify units and sign (direction).
7. State conclusion in one line — e.g. safe/unsafe, stable/unstable, feasible/infeasible.
2. Draw a neat labelled diagram where applicable — examiners in Indian universities award diagram marks even when arithmetic slips.
3. Identify which relation from this topic applies to memory management.
4. Use equation 1:
.
5. Use equation 2:
.
6. Substitute values, compute, and verify units and sign (direction).
7. State conclusion in one line — e.g. safe/unsafe, stable/unstable, feasible/infeasible.
Applications & exam relevance
Memory Management appears in systems software and backend. In Indian it software curricula this topic is tested because it connects theory to process, memory, and file management.
GATE and semester exams often combine memory management with earlier units — revise prerequisites before attempting mixed problems.
Industry interview panels sometimes ask: "Where did you use memory management?" — answer with a lab, mini-project, or plant visit example if possible.
Common mistakes in exams
Students confuse internal fragmentation (paging) with external fragmentation (segmentation), forget the TLB term in effective-access-time calculations, and mishandle page-replacement traces (especially LRU recency). Overlooking Belady’s anomaly for FIFO is a subtle exam point.
Quick revision checklist
Before attempting memory management problems, confirm you can:
1. Demand paging loads a page only on a page fault
2. Replacement policies: FIFO, LRU, optimal
3. Segmentation plus paging: segment table then page table
2. Replacement policies: FIFO, LRU, optimal
3. Segmentation plus paging: segment table then page table
Revise the solved examples in Operating System Concepts — Silberschatz, Galvin & Gagne and one previous-year GATE or university paper for this unit.
Worked examples
Try the problem first — open the solution when you are ready to check.
Effective access time
Problem
TLB hit ratio h = 0.9, TLB lookup = 10 ns, memory access = 100 ns. Compute EAT using h·t + (1−h)(t + memory).
Solution
EAT = 0.9×10 + 0.1×(10 + 100) = 9 + 11 = 20 ns. The high hit ratio keeps EAT close to a single memory access despite the extra lookup on misses.
Conceptual check — Memory Management
Problem
In a Operating Systems semester or GATE paper you are asked: "State the main assumption, the governing relation, and one practical consequence of memory management." What should a complete answer include?
📖 Standard books (India)
Operating System Concepts — Silberschatz, Galvin & Gagne
Read: Syllabus unit
Processes, memory, and file systems
Explore related topics
See real it & software careers
After exams and interviews, see how engineers actually built careers — milestones and decisions from people in the field.