operating-systems

Definition

Resident Set Management

Resident set management refers to the strategy used by the operating system to determine how many frames of physical memory should be allocated to a specific process at any given time.

The resident set is the collection of pages of a process that are currently in RAM.

Allocation Strategies

  • Fixed Allocation: Each process is given a fixed number of frames. While simple, this can lead to excessive page faults if the allocation is too small or wasted memory if too large.
  • Variable Allocation: The number of frames allocated to a process changes over time based on its behaviour (e.g., its page fault rate).

Working Set Strategy

The working set model is a dynamic approach based on the principle of locality.

Working Set

The working set of a process at time is the set of pages referenced by the process during the last time units (the working set window).

  • Logic: If the OS ensures that the resident set of a process contains its working set, the process will have very few page faults.
  • Management:
    • If Resident Set Working Set: Allocate more frames.
    • If Resident Set Working Set: Reclaim unused frames.
    • If the sum of all working sets exceeds available RAM: Suspend one or more processes (Swapping).

Performance Impact

Effective management prevents thrashing, where the OS spends more time handling page faults than executing user instructions. In practice, many systems monitor the Page Fault Frequency (PFF) as a proxy for the working set size.