3
$\begingroup$

My question is in the context of a paging virtual memory system.


THE PREMISES:

  • The function of resident set management (RSM) is to:
    • Impose an upper bound on the cardinality of a process' resident set.
  • The ostensible benefits of RSM are:
    • Reduce the overall page fault rate by preventing one process from dominating memory.
    • Increase the probability that the process scheduler will find a "ready" process at any particular time by increasing number of processes that can reside in main memory.
  • The potential drawbacks of RSM are:
    • Increase a process' page fault rate if the upper bound on its resident set is smaller than its working set.
    • More overhead.
  • When a page fault occurs, the thread of execution that caused the page fault is blocked and another thread(s) is allowed to execute in the meantime.

THE QUESTION:

Isn't resident set management superfluous?

Here's why I think it's superfluous:

  • A single process would not be able to "dominate" memory at the expense of other processes anyway. This is because whenever a single large process creates a memory fault and causes a non-resident of its own to be swapped in and some other process' page to be swapped out, then another process(es) would be able to execute while the large process is blocked due to the memory fault. If the other processes' working sets grow too small due to the single large process, then they will cause memory faults of their own and be able to reclaim pages. This should eventually result in an appropriate equilibrium state.
    • (Or more realistically, frames would be reclaimed according to some LRU algorithm or the like, and so wouldn't be needed anyway. And if they were needed, then the system is probably in a state of thrashing, and the total number of processes should be constrained, rather than the number of resident pages per process.)
  • There should be enough processes in memory for the process scheduler to find a "ready" process at any particular time anyway. This is because without RSM there are no specific limits to the number of processes that can be in main memory at one time. New processes can be added simply by replacing current resident pages (e.g. LRU). The number of resident pages per process would then result automatically from the interaction of the number of active processes, the size of the working set of every process, and the replacement algorithm. No additional limit on the number of resident pages per process is necessary in a virtual memory system (vs. an overlay system).

Disclaimer: I'm a student in an "intro to OS concepts" course right now. My information comes from my textbook and my professor. However, neither my textbook nor the professor was able to answer this question, and I wasn't able to find a pre-existing similar question on StackExchange in a cursory search. I'd appreciate any corrections if my question is nonsensical or has already been answered!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.