🎓 BookMCQ
← Back to 9. Virtual Memory

📝 Performance of demand paging (18 MCQs)

Page-Fault Rate as a Performance Factor

The performance of demand paging depends primarily on memory-access time, page-fault frequency, and the cost of handling each fault. Ordinary references are completed through hardware address translation, while faults may require operating system intervention and storage access. Even a small page-fault rate can noticeably affect execution because retrieving a page from secondary storage is considerably slower than accessing RAM.

Why Occasional Page Faults Have Significant Costs

Demand paging saves physical memory, but its performance advantage depends on keeping most references resident. A fault requires saving processor state, validating the address, obtaining a frame, retrieving data when necessary, and updating translation structures. Storage access can take thousands or millions of times longer than a normal memory access, making fault frequency a critical performance variable.

Effective Access Time Calculation

Effective access time combines ordinary memory access with the probability and additional cost of a page fault. A simplified expression is EAT = (1 - p) × ma + p × pf, where p is the page-fault probability, ma is memory-access time, and pf is total average fault service time. The fault cost must include all relevant handling and storage delays.

Calculating Access Time with a Small Fault Rate

Assume memory access takes 200 nanoseconds, page-fault probability is 0.001, and average fault service time is 8 milliseconds. The effective time is approximately 0.999 × 200 + 0.001 × 8,000,000, producing 8,199.8 nanoseconds. Despite only one fault per thousand references, average access time becomes substantially higher than ordinary memory latency.

Balancing Resident Pages and Storage Overhead

Low page-fault rates allow demand paging to provide efficient memory utilisation without excessive storage traffic. More available frames and good locality can reduce faults, while insufficient memory may cause repeated eviction and reloading. SSDs improve transfer performance compared with traditional disks, but neither removes fault-handling overhead. System performance also depends on TLB behaviour, dirty-page writes, and concurrent storage activity.

Common Errors in Effective Access Time

'Page-fault probability is always zero after startup' is incorrect because new memory references can require additional pages. 'A fault costs exactly one memory access' is incorrect because service may involve storage and kernel operations. 'A 0.1 percent fault rate has negligible impact' is incorrect because a single storage-backed fault can cost millions of nanoseconds.

Exam Focus: EAT Formula and Fault Probability

Use the supplied memory latency, fault probability, and complete fault service time to calculate effective access time. Convert milliseconds, microseconds, and nanoseconds into consistent units before substitution. Compare the resulting time with ordinary memory-access time and evaluate whether the fault rate is acceptable. Distinguish fault probability from the percentage of time spent servicing faults.

Key Terms of Demand-Paging Performance

  • EAT - Average effective access time.
  • Fault rate - Probability of a page fault.
  • Memory latency - Time for memory access.
  • Fault service time - Total page-fault handling duration.
  • Page transfer - Movement of page contents.
  • Overhead - Additional processing cost.
3
Easy
7
Medium
8
Hard

📝 All Performance of demand paging MCQs

Q1. A system has a memory access time of 100 ns, a page‑fault service time of 8 ms, and a fault rate of 0.001. What is the effective access time (EAT) in microseconds?

A.0.1 µs
B.8.1 µs ✅
C.80 µs
D.800 µs
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The effective access time follows EAT=(1−p)⋅ma+p⋅pfEAT=(1-p)·ma+p·pf. Substituting ma=0.1 µsma=0.1 µs, pf=8000 µspf=8000 µs and p=0.001p=0.001 gives EAT≈0.999⋅0.1+0.001⋅8000≈8.1 µsEAT≈0.999·0.1+0.001·8000≈8.1 µs. Option B matches this calculation. Options A, C, and D either ignore the fault cost or over‑estimate it, leading to unrealistic access times. This shows how even a tiny fault rate can dominate performance when faults are expensive.

Q2. What factor most directly determines the overhead introduced by demand paging?

A.Page‑fault rate ✅
B.Page size
C.TLB hit ratio
D.CPU clock speed
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The overhead of demand paging is primarily caused by the frequency of page faults; each fault incurs a costly service time. While page size, TLB performance, and CPU speed affect overall system behavior, they do not directly control how often the system must pause for a fault. Therefore, the page‑fault rate (option A) is the key determinant, whereas the other choices influence secondary aspects of memory access.

Q3. Which term describes the event when a referenced page is not currently in a frame and must be brought from secondary storage?

A.Page fault ✅
B.Cache miss
C.TLB miss
D.Branch misprediction
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A page fault occurs whenever the required page is absent from physical memory, forcing the operating system to retrieve it from disk. This definition distinguishes it from a cache miss (which concerns smaller, faster caches), a TLB miss (relating to address translation), or a branch misprediction (CPU control flow). Understanding the term clarifies why demand paging can dramatically affect execution speed.

Q4. A computer has a memory access time of 200 ns, a page‑fault service time of 5 ms, and wants an effective access time of 2 µs. What is the maximum allowable page‑fault rate?

A.0.0004
B.0
C.0.0036
D.0 ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Using EAT=(1−p)⋅ma+p⋅pfEAT=(1-p)·ma+p·pf with ma=0.2 µsma=0.2 µs, pf=5000 µspf=5000 µs and EAT=2 µsEAT=2 µs, we solve 0.2+p⋅(5000‑0.2)=20.2+ p·(5000‑0.2)=2 → p≈3.6×10−4p≈3.6×10^{-4} or 0.036%. Option D expresses this value correctly. The other options misplace the decimal point, leading to either far too high or far too low fault rates, which would violate the target EAT.

Q5. How does increasing the number of available page frames generally affect the frequency of page faults?

A.It decreases the fault rate ✅
B.It increases the fault rate
C.It has no effect
D.It depends on the workload
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: More frames give the system more room to keep pages resident, so the chance that a needed page is already in memory rises, reducing the fault rate. Option A captures this direct relationship. Options B and C contradict basic paging theory, and while D hints at workload dependence, the primary effect of additional frames is a reduction in faults for most typical programs.

Q6. A program references 10 000 pages; each page fault costs 10 ms and a normal memory access costs 100 ns. If 2% of accesses cause faults, what is the average memory access time?

A.0.1 µs
B.2 µs
C.200 µs ✅
D.2 000 µs
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Effective time is EAT=(1‑p)⋅ma+p⋅pfEAT=(1‑p)·ma+p·pf. With ma=0.1 µsma=0.1 µs, pf=10 000 µspf=10 000 µs and p=0.02p=0.02, we get EAT≈0.98⋅0.1+0.02⋅10 000≈200 µsEAT≈0.98·0.1+0.02·10 000≈200 µs. Option C matches this result. Option A ignores the fault cost, option B underestimates it, and option D overestimates by an order of magnitude, illustrating how even a modest fault probability can dominate access time.

Q7. Why does the choice of page‑replacement algorithm matter for demand‑paging performance?

A.It influences the page‑fault rate
B.It only affects CPU utilization
C.It is irrelevant once pages are loaded
D.It only matters for pre‑paging schemes ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: A good replacement algorithm keeps frequently used pages in memory, thereby lowering the fault rate and improving overall performance. Options B and C misstate the algorithm’s impact, and option D limits its relevance incorrectly. Understanding this relationship helps designers select algorithms that match program access patterns.

Q8. A two‑level paging system uses a TLB with a 90% hit ratio. TLB lookup takes 20 ns and a memory access takes 100 ns. Ignoring page faults, what is the effective access time?

A.120 ns
B.130 ns ✅
C.140 ns
D.150 ns
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Effective time = TLB lookup + hit·mem + miss·(2·mem). Calculation: 20+0.9⋅100+0.1⋅200=20+90+20=130 ns20+0.9·100+0.1·200=20+90+20=130 ns. Option B is correct. The other options either add or subtract the miss penalty incorrectly, showing the importance of accounting for both hit and miss cases when evaluating address translation performance.

Q9. How does the “working‑set” model improve demand‑paging performance?

A.It keeps frequently used pages resident ✅
B.It reduces context‑switch overhead
C.It increases page size
D.It eliminates the need for page tables
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The working‑set model tracks the set of pages a process actively uses, ensuring those pages stay in memory and thus lowering fault frequency. Options B, C, and D describe unrelated mechanisms; they do not explain why the working‑set concept directly enhances paging efficiency.

Q10. A system has a page‑fault service time of 6 ms and a memory access time of 150 ns. To keep CPU utilization above 95%, what is the maximum permissible page‑fault rate?

A.0
B.0.0001
C.0.001
D.0 ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: Utilization ≈ ma/(p⋅pf+ma)≥0.95ma/(p·pf+ma)≥0.95. Solving for pp gives p≤(0.05⋅ma)/(0.95⋅pf)p≤(0.05·ma)/(0.95·pf). Substituting ma=0.15 µsma=0.15 µs and pf=6000 µspf=6000 µs yields p≈1.3×10−6p≈1.3×10^{-6} or 0.00013%. Option D matches this tiny rate. Larger percentages would cause the CPU to stall far more often, dropping utilization below the 95 % threshold.

Q11. A demand‑paging system has an average page‑fault service time of 8 ms and a measured effective access time of 25 µs. Assuming a normal memory access time of 100 ns, what is the page‑fault rate?

A.0.0003
B.0.0031 ✅
C.0.031
D.0.31
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Using p=(EAT‑ma)/(pf‑ma)p=(EAT‑ma)/(pf‑ma) with EAT=25 µsEAT=25 µs, ma=0.1 µsma=0.1 µs, pf=8000 µspf=8000 µs gives p≈24.9/7999.9≈0.00311p≈24.9/7999.9≈0.00311 or 0.311%. Option B is correct. The other choices misplace the decimal point, leading to fault rates that would produce dramatically different effective times.

Q12. How does the “prepaging” technique affect effective access time compared with pure demand paging?

A.It reduces the fault rate at the cost of extra I/O ✅
B.It increases the fault rate
C.It has no effect on performance
D.It only works for sequential access patterns
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Prepaging brings in likely‑needed pages before they are actually referenced, lowering the probability of a fault and thus reducing effective access time, though it may cause some unnecessary I/O. Options B and C contradict the purpose of prepaging, while D limits its applicability incorrectly.

Q13. A program exhibits 80% of its references to a set of 200 pages, with the remaining 20% spread uniformly over 800 other pages. The system provides 300 page frames. Assuming optimal replacement, what is the approximate overall page‑fault rate?

A.0.05
B.0.1
C.0.15
D.0.175 ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The 200 hot pages occupy 200 frames and stay resident. The remaining 100 frames hold a subset of the 800 cold pages, so a cold access faults with probability 1‑100/800=0.8751‑100/800=0.875. Overall fault rate = 0.2⋅0.875=0.1750.2·0.875=0.175 or 17.5%. Option D reflects this calculation; the other percentages underestimate the impact of the limited frames for cold pages.

Q14. In performance analysis of demand paging, what does the abbreviation “EAT” stand for?

A.Effective Access Time ✅
B.Estimated Average Throughput
C.Extended Allocation Table
D.Error Analysis Technique
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: EAT is the standard acronym for Effective Access Time, which combines normal memory access time with the additional cost of page faults. The other expansions are unrelated to paging performance, so they are distractors designed to test whether the student knows the common terminology.

Q15. Why does a larger page size tend to reduce page‑fault overhead but increase internal fragmentation?

A.Larger pages hold more data, so fewer faults occur, but unused space inside each page grows
B.Larger pages improve TLB coverage, eliminating faults
C.Larger pages speed up disk I/O, reducing faults ✅
D.Larger pages decrease the number of page‑table entries, causing fragmentation
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: When pages are larger, each fault brings in more memory, so the frequency of faults drops, which lowers overhead. However, the larger block may not be fully utilized, leaving unused bytes within the page—this is internal fragmentation. Options A and B mix up causes, and D mischaracterizes the effect of page‑table entry count.

Q16. A system uses a TLB with 95% hit ratio (lookup 15 ns), memory access 120 ns, page‑fault service time 7 ms, and a fault rate of 0.001. What is the effective access time?

A.0.14 µs
B.1.4 µs
C.7.14 µs ✅
D.71.4 µs
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: First compute the base time without faults: 15+0.95⋅120+0.05⋅240=141 ns15+0.95·120+0.05·240=141 ns. Fault contribution: 0.001⋅7 000 000 ns=7 000 ns0.001·7 000 000 ns=7 000 ns. Total =7 141 ns≈7.14 µs=7 141 ns≈7.14 µs. Option C matches this sum. The other options either omit the fault cost or misplace decimal factors, illustrating how even a tiny fault probability can dominate total latency.

Q17. How does the “working‑set window” parameter influence the balance between thrashing and memory utilization?

A.A larger window smooths short‑term spikes, reducing thrashing at the cost of using more memory ✅
B.A smaller window always improves performance
C.The window size has no impact on thrashing
D.It only affects CPU scheduling, not paging
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The working‑set window determines how many recent page references are considered; a larger window captures longer‑term behavior, preventing rapid eviction of pages that cause temporary spikes, thus lowering thrashing but using more frames. Options B, C, and D misinterpret the role of the window, showing why careful tuning is essential for stable performance.

Q18. A computer with 4 GB of RAM uses 4‑KB pages. A process needs a 1‑GB address space. If the average page‑fault rate is 0.5% and each fault costs 9 ms, what is the effective memory access time? Assume normal memory access is 200 ns.

A.0.2 µs
B.2 µs
C.45 µs ✅
D.450 µs
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Effective time EAT=(1‑p)⋅ma+p⋅pfEAT=(1‑p)·ma+p·pf. With p=0.005p=0.005, ma=0.2 µsma=0.2 µs, pf=9 000 µspf=9 000 µs: EAT≈0.995⋅0.2+0.005⋅9 000≈0.199+45≈45 µsEAT≈0.995·0.2+0.005·9 000≈0.199+45≈45 µs. Option C reflects this result. Options A and B ignore the fault cost, while D over‑estimates by a factor of ten, demonstrating the dramatic impact of even a modest fault rate on overall latency.

🔗 Related Topics (MCQs)