
In ECET 2026 CSE, Operating System questions on Virtual Memory and Page Replacement are very common. If you understand these concepts and practice a few problems, you can score easy marks.
📘 Concept Notes
🌐 What is Virtual Memory?
- Virtual Memory is a memory management technique that gives an illusion of a very large main memory.
- It allows programs to execute even if they are larger than the actual physical RAM.
- Implemented using demand paging and page replacement.
⚙️ Key Concepts
- Pages & Frames
- Logical memory is divided into pages.
- Physical memory is divided into frames.
- A page from logical memory is mapped to a free frame in physical memory.
- Page Table
- Maintains mapping between logical pages and physical frames.
- Page Fault
- Occurs when a requested page is not present in memory.
- The OS loads it from disk into a free frame.
- Effective Access Time (EAT) Formula
If:
= page fault rate
= memory access time
= page fault service time
Then:
🔄 Page Replacement Algorithms
When a page fault occurs and no free frame is available, page replacement is needed.
- FIFO (First In First Out)
- Replace the oldest page in memory.
- Simple but may suffer from Belady’s Anomaly (more frames may cause more faults).
- LRU (Least Recently Used)
- Replace the page that has not been used for the longest time.
- Better than FIFO but needs tracking history.
- Optimal (OPT)
- Replace the page that will not be used for the longest time in the future.
- Theoretical best but not practical.
📐 Example – Page Replacement
Reference String = [7, 0, 1, 2, 0, 3, 0, 4], Frames = 3
- Using FIFO, page faults = 6
- Using LRU, page faults = 5
🔟 10 Expected MCQs – ECET 2026
Q1. Virtual memory gives an illusion of:
A) Infinite secondary storage
B) Very large main memory
C) CPU speedup
D) None
Q2. A page fault occurs when:
A) Page is in main memory
B) Page is in secondary memory
C) Page is in CPU cache
D) None
Q3. Virtual memory is implemented using:
A) Segmentation
B) Paging
C) Demand Paging
D) Contiguous allocation
Q4. Which algorithm may suffer from Belady’s anomaly?
A) FIFO
B) LRU
C) Optimal
D) None
Q5. Formula for Effective Access Time (EAT) is:
A)
B)
C)
D) None
Q6. Optimal page replacement is:
A) Practical
B) Theoretical best
C) Same as FIFO
D) None
Q7. If ,
,
, then
A) ≈ 220 ns
B) ≈ 82 μs
C) ≈ 200 ns
D) ≈ 1 ms
Q8. Which replacement policy uses “not used for longest time”?
A) FIFO
B) LRU
C) Optimal
D) Clock
Q9. Which is the best practical algorithm?
A) FIFO
B) LRU
C) Optimal
D) Random
Q10. Thrashing is caused by:
A) Too many processes, high page faults
B) Large cache
C) Low I/O
D) CPU scheduling
✅ Answer Key
Q.No | Answer |
---|---|
Q1 | B |
Q2 | B |
Q3 | C |
Q4 | A |
Q5 | B |
Q6 | B |
Q7 | B |
Q8 | B |
Q9 | B |
Q10 | A |
🧠 Explanations
- Q1 → B: Virtual memory extends main memory size.
- Q2 → B: Page fault = page not in RAM.
- Q3 → C: Virtual memory is implemented with demand paging.
- Q4 → A: FIFO may cause Belady’s anomaly.
- Q5 → B: Standard formula for EAT.
- Q6 → B: Optimal is theoretical best.
- Q7 → B: Calculation:
- Q8 → B: LRU uses longest unused replacement.
- Q9 → B: LRU is best practical approach.
- Q10 → A: Thrashing = too many page faults.
🎯 Why Practice Matters
- Virtual Memory and Page Replacement are repeated topics in ECET exams.
- Questions are often direct formulas (EAT) or conceptual (FIFO vs LRU).
- Easy scoring if practiced well.