working set
also: resident set, active set
The set of memory pages that a process actively uses within a given time window. The kernel tracks this to optimize page replacement and predict memory demand.
The working set is a concept in virtual memory management that represents the subset of a process's virtual address space that is currently being accessed. Rather than tracking all allocated memory, the kernel focuses on pages that are actually in use, which helps it make smarter decisions about which pages to keep in physical RAM versus swap to disk.
For example, a program with 1 GB of allocated memory might only actively use 50 MB at any given moment. That 50 MB is the working set. If the system runs low on physical memory, the kernel will preferentially keep working set pages in RAM and swap out less-used pages, because evicting a page that's about to be accessed causes expensive disk I/O and a page fault.
Working set size varies over time as a process's execution changes phases. Monitoring tools use heuristics like page reference frequency and recency to estimate the working set, and some systems track it via hardware access bits or software instrumentation. Understanding working set behavior is crucial for system tuning and predicting whether a workload will fit comfortably in available memory.