PYQ Analysis & Exam Preparation — Module 5
A strategic analysis of 29 exam questions spanning 2019–2024. Module 5 is the most numerically intensive module in the course — page replacement traces and TLB calculations appear every single year. Know exactly what to practice.
Learning Goals
- Identify the four guaranteed numerical question types: page replacement traces, EAT/TLB calculations, fit algorithms, and address translation.
- Practice with actual MCQ questions from 2019–2024 papers.
- Understand the answer structure for the highest-mark theoretical questions: Thrashing, Belady's Anomaly, and Paging.
The Exam Blueprint: Module 5 PYQ Deep Analysis (2019–2024)
An analysis of 29 exam questions spanning 2019 to 2024 reveals that Module 5 is the most numerically intensive module in the entire OS course. The 2019 paper alone had a 14-mark page replacement question. In 2022, there were 5 separate questions on memory management topics. In 2023 and 2024, Module 5 consistently dominates the exam paper.
Complete PYQ Table (29 Questions)
| Year | Q# | Marks | Topic | Type |
|---|---|---|---|---|
| 2019 | Q1j | 2 | Physical memory fixed blocks = frames | MCQ |
| 2019 | Q7 | 14 | LRU + FIFO with 4 and 3 frames (string: 23 refs) | Numerical |
| 2022 | Q1f | 2 | Belady's anomaly occurs in FIFO | MCQ |
| 2022 | Q1j | 2 | Worst-fit allocates the largest hole | MCQ |
| 2022 | Q3a | 7 | Address binding + various schemes | Theory |
| 2022 | Q3b | 7 | LRU numerical: 16-page string, 4 frames | Numerical |
| 2022 | Q6b | 7 | Thrashing: cause, detection, elimination | Theory |
| 2022 | Q7a | 7 | Fragmentation: internal vs external | Theory |
| 2022 | Q7b | 7 | TLB EAT calculation (hit ratio = 0.6) | Numerical |
| 2022 | Q8b | 7 | TLB in paging hardware + benefits | Theory |
| 2022 | Q9b | 7 | Short notes: Paging | Theory |
| 2023 | Q1a | 2 | Variable partition → external fragmentation | MCQ |
| 2023 | Q1e | 2 | Virtual memory = illusion of large memory | MCQ |
| 2023 | Q1h | 2 | 24KB space, 4096B page → 6 pages | MCQ |
| 2023 | Q4a | 4 | Compare compile/load/execution-time binding | Theory |
| 2023 | Q4b | 3 | Purpose of modify (dirty) bit in page table | Theory |
| 2023 | Q4c | 7 | Paging with TLB + diagrams | Theory |
| 2023 | Q5a | 5 | Thrashing: main cause + how to limit | Theory |
| 2023 | Q5b | 9 | FIFO + LRU + Optimal: 20-ref string, 4 frames | Numerical |
| 2023 | Q9a | 7 | Short notes: Inverted Page Table | Theory |
| 2023 | Q9d | 7 | Short notes: Belady's Anomaly | Theory |
| 2024 | Q1g | 2 | Demand paging: loaded only when required | MCQ |
| 2024 | Q4a | 7 | Virtual memory + implementation + TLB diagram | Theory |
| 2024 | Q4b | 7 | Fixed vs variable partition + compaction | Theory |
| 2024 | Q6b | 7 | Belady's Anomaly + why LRU/Optimal immune | Theory |
| 2024 | Q7a | 7 | Thrashing: what, when, how to avoid | Theory |
| 2024 | Q7b | 7 | FIFO vs LRU comparison: 14-ref string, 4 frames | Numerical |
| 2024 | Q8a | 7 | Address translation in paging + power of 2 | Theory |
| 2024 | Q8b | 7 | First-fit and best-fit with 5 partitions + 4 processes | Numerical |
Total marks tracked: 166 marks across 5 years.
Topic Heat Map
| Topic | 2019 | 2022 | 2023 | 2024 | Total Marks |
|---|---|---|---|---|---|
| Page Replacement Numericals | 14M ✅ | 7M ✅ | 9M ✅ | 7M ✅ | 37M |
| Paging + TLB (theory + numerical) | — | 21M ✅ | 14M ✅ | 14M ✅ | 49M |
| Thrashing | — | 7M ✅ | 5M ✅ | 7M ✅ | 19M |
| Belady's Anomaly | — | 2M ✅ | 7M ✅ | 7M ✅ | 16M |
| Fragmentation + Fit Algorithms | — | 7M ✅ | — | 7M ✅ | 14M |
| Address Binding | — | 7M ✅ | 4M ✅ | — | 11M |
| Virtual Memory | — | — | 2M ✅ | 7M ✅ | 9M |
The Four Guaranteed Question Types
1. 🔴 Page Replacement Numerical (7–14M) — appeared in ALL 4 years The biggest mark earner in the module. Practice all 3 algorithms (FIFO, LRU, Optimal) on the SAME reference string. The 2023 paper asked all three in one 9-mark question. 2019 asked the same string with both 4 AND 3 frames.
2. 🟠 Paging + TLB (7M) — appeared 2022, 2023, 2024 consecutively Either a pure theory question (explain paging with TLB diagram) or a numerical (EAT calculation). Know both. The 2022 Q7b asked for an exact EAT value — solved below.
3. 🟡 Thrashing (5–7M) — appeared 2022, 2023, 2024 consecutively Always the same 3-part structure: define thrashing, explain the cause (working sets exceed available frames), describe the fix (working set strategy / reduce multiprogramming degree).
4. 🟢 Belady's Anomaly (2–7M) — trending: 2022 MCQ → 2023 short notes → 2024 full 7M question The 2024 question specifically asked why LRU and Optimal are IMMUNE. Know the "stack algorithm" explanation.
Solved Numericals: The Exam-Critical Calculations
Numerical 1: TLB Effective Access Time [2022 Q7b — 7 Marks]
"TLB search time = 10ms, memory access time = 80ms, TLB hit ratio = 0.6. Find EAT."
Interpretation: Without TLB (always 2 memory accesses): ms. With TLB at 60% hit rate: 122 ms — a 28% improvement. A modern system with 95%+ hit rate achieves near-ideal performance.
Numerical 2: First-Fit vs Best-Fit [2024 Q8b — 7 Marks]
"Partitions: 100KB, 500KB, 200KB, 300KB, 600KB. Processes: 212KB, 417KB, 112KB, 426KB. Compare First-Fit and Best-Fit."
First-Fit (scan left to right, take first hole that fits):
| Process | Scans | Allocated From | Remaining in Slot |
|---|---|---|---|
| 212KB | 100❌→500✅ | 500KB slot | 288KB |
| 417KB | 100❌→288❌→200❌→300❌→600✅ | 600KB slot | 183KB |
| 112KB | 100❌→288✅ | 288KB slot | 176KB |
| 426KB | 100❌→176❌→200❌→300❌→183❌ | ❌ Cannot allocate | — |
First-Fit fails to place the 4th process (426KB).
Best-Fit (find smallest hole that is big enough):
| Process | Candidates (≥ size) | Best Hole | Remaining |
|---|---|---|---|
| 212KB | 500(288), 300(88), 600(388) | 300KB (smallest gap=88) | 88KB |
| 417KB | 500(83), 600(183) | 500KB (smallest gap=83) | 83KB |
| 112KB | 200(88), 600(488) | 200KB (smallest gap=88) | 88KB |
| 426KB | 600(174) | 600KB | 174KB |
Best-Fit successfully allocates ALL 4 processes.
Verdict: Best-Fit makes more efficient use of memory in this case. Final holes: 100, 83, 88, 88, 174 KB.
Numerical 3: Page Number Calculation [2023 Q1h — 2 Marks]
"Process has 24KB logical address space, page size = 4096 bytes. Number of pages?"
Answer: (ii) 6
Numerical 4: LRU Trace [2022 Q3b — 7 Marks]
"Reference string: 0, 4, 8, 20, 24, 36, 44, 12, 68, 72, 80, 84, 28, 32, 88, 92. 4 frames, LRU policy."
Key observation: All 16 page numbers are distinct — no page is referenced twice. Therefore, LRU (and FIFO and Optimal) all produce the same result: every reference is a page fault = 16 page faults.
Final frames (last 4 pages loaded): 28, 32, 88, 92 ← pages in memory at end of string.
The Ultimate Numerical Challenge [2023 Q5b — 9 Marks]
"Reference string: 7,2,3,1,2,5,3,4,6,7,7,1,0,5,4,6,2,3,0,1. 4 frames. Count faults for FIFO, LRU, and Optimal."
Expected Results (trace yourself — compare with these):
| Algorithm | Page Faults |
|---|---|
| FIFO | ~14–15 faults |
| LRU | ~12–13 faults |
| Optimal | ~8–9 faults |
Hint for Optimal: At each fault, look ahead in the string. The page whose NEXT USE is furthest in the future gets evicted. Pages that never appear again in the remaining string are always evicted first.
Practice strategy: Trace FIFO first (easiest — just a queue). Then trace LRU (maintain order by recency). Then trace Optimal (scan ahead for each eviction). Count faults for each. The examiner wants all three Gantt-chart-style traces shown.
Knowledge Check
[2019 Q1j] Physical memory is broken into fixed-sized blocks called:
High-Yield Subjective Bank: Structure Your Answers
[2022 Q7a / 2024 Q4b — 7 Marks] Fragmentation + Fixed vs Variable Partition
Answer structure:
- Internal Fragmentation (2M): Wasted space INSIDE an allocated partition. Occurs in fixed partitioning. Example: 4KB partition holding a 3KB process wastes 1KB inside.
- External Fragmentation (2M): Wasted space BETWEEN allocated partitions. Occurs in variable partitioning. Total free memory may be sufficient but no single hole is large enough.
- Fixed Partition (1M): Equal/unequal fixed divisions at boot. Advantage: simple. Disadvantage: internal fragmentation.
- Variable Partition (1M): Holes sized exactly to the process. Advantage: no internal fragmentation. Disadvantage: external fragmentation.
- Compaction (1M): Consolidate all free holes into one large block by shuffling processes in memory. Requires execution-time binding. Slow but eliminates external fragmentation.
[2022 Q6b / 2023 Q5a / 2024 Q7a — 5–7 Marks] Thrashing
Answer structure (3-part formula — always works):
- Definition (1M): Thrashing occurs when a process spends more time paging than executing. CPU utilization collapses despite the system being "active."
- Cause (2M): When total demand D = Σ|Wi| (sum of working set sizes) > m (available frames). The OS cannot keep every process's working set in RAM. Processes constantly page fault, causing continuous disk I/O.
- Prevention/Detection/Elimination (3–4M):
- Working Set Strategy: Monitor working set size of each process. If D > m, suspend processes until D ≤ m.
- Page Fault Frequency (PFF): Set upper and lower bounds on the acceptable page fault rate. If a process's rate exceeds the upper bound, give it more frames. If below the lower bound, take frames away. If increasing frames doesn't help, suspend the process.
[2023 Q9d / 2024 Q6b — 7 Marks] Belady's Anomaly
Answer structure:
- Definition (2M): The counterintuitive property of FIFO where increasing the number of available frames can increase the number of page faults.
- Demonstration (3M): Show the standard example — reference string
1,2,3,4,1,2,5,1,2,3,4,5produces 9 faults with 3 frames but 10 faults with 4 frames using FIFO. - Why LRU and Optimal are IMMUNE (2M): They are stack algorithms. A stack algorithm has the property that the set of pages in memory with frames is always a subset of the pages in memory with frames. Adding a frame never removes a page that was previously in memory. FIFO is NOT a stack algorithm.
[2022 Q3a / 2023 Q4a — 4–7 Marks] Address Binding
Answer structure:
- Definition (1M): Address binding is the mapping of instructions/data addresses from one space to another.
- Compile-Time (2M): Absolute physical addresses generated by the compiler. Process must always load at the same location. Not flexible.
- Load-Time (2M): Relocatable code generated; loader translates to physical addresses at load time. Process cannot move after loading.
- Execution-Time (2M): Logical addresses used at runtime; MMU translates every access. Process can be moved in memory. Requires MMU hardware support. Used by all modern OSes.
To view the complete PYQ for Module 5, go here: https://pyqdeck.in/it/it_sem5/it_sem5_106503/practice/chapter