In virtual memory management, which condition most effectively prevents thrashing by respecting process working sets?

Difficulty: Medium

Correct Answer: The pages belonging to the working set of the programs are in main memory

Explanation:


Introduction / Context:
Thrashing occurs when the system spends more time paging than executing, typically because active pages of processes do not fit in physical memory. The working-set model provides a principled way to allocate frames to keep each process's most frequently used pages resident, reducing page faults.


Given Data / Assumptions:

  • Demand paging is used with finite physical memory.
  • Processes have identifiable working sets that vary over time.
  • Replacement and admission policies influence residency.


Concept / Approach:
Ensuring that each process's working set is resident stabilizes locality and minimizes fault frequency. Increasing CPU or I/O speed does not address the root cause; the bottleneck is excessive page faults due to insufficient resident locality, not raw compute or I/O throughput.


Step-by-Step Solution:

1) Measure or estimate each process's working set size over a window.2) Allocate frames to cover these sets (or reduce degree of multiprogramming).3) Monitor page-fault rate; if high, adjust allocations or suspend processes.4) Maintain stability by avoiding oscillation in replacement decisions.


Verification / Alternative check:
After ensuring working sets are resident, CPU utilization rises and page-fault rate drops sharply, confirming thrashing mitigation independent of CPU/I-O speeds.


Why Other Options Are Wrong:

  • Increase CPU speed: A faster CPU still stalls on page faults.
  • Increase I/O processor speed: Faster I/O helps marginally but does not fix locality mismatch.
  • All of the above: Incorrect; only working-set residency tackles the cause.
  • None of the above: Incorrect because working-set residency is effective.


Common Pitfalls:
Tuning disk hardware without adjusting memory allocation or degree of multiprogramming, which leaves the fundamental locality problem unresolved.


Final Answer:
The pages belonging to the working set of the programs are in main memory

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion