Working Set in Paging Last Updated : 11 Sep, 2025 Comments Improve Suggest changes Like Article Like Report The working set model is a memory management technique used to prevent thrashing. It's based on the locality model of execution, which observes that a process tends to repeatedly use a small subset of its pages over a short period. This subset of pages is called the working set.Working Set ModelThe working set model aims to keep a process's working set entirely in main memory. It does this by:Defining the Working Set: The model uses a working set window (Δ), which is a time-based parameter (e.g., the last 1000 memory accesses). The working set for a process is the set of all unique pages referenced within this window. The size of this set is called the working set size (WSS).Dynamic Frame Allocation: The operating system allocates a number of frames to a process equal to its working set size. This ensures that all the pages a process is actively using are in main memory, minimizing page faults and preventing thrashing.Adapting to Change: As a process's locality of reference changes over time, its working set size also changes. The operating system dynamically adjusts the number of frames allocated to the process, giving more frames when its working set grows and reclaiming frames when it shrinks.Handling Memory Shortage: If the total frames required by all active processes (the sum of all their working set sizes) exceed the total available frames in main memory, the operating system may suspend one or more processes to free up frames for others, thus preventing the entire system from thrashing.Example:Example of a working set model sampling at 3 time instances with delta = 7Window Size (Δ = 7): At each point in time, the working set is calculated from the last 7 page references.1. At t₀:Recent references: 4,7,3,7,4,7,7Unique pages = {3,4,7}, WSS = 3Frames allocated = 3 2. At t₁:Recent references: 1,3,2,4,5,3,2Unique pages = {1,2,3,4,5}, WSS = 5Frames allocated = 5 3. At t₂:Recent references: 8,9,8,8,9,9,9Unique pages = {8,9}, WSS = 2Frames allocated = 2 Create Quiz Comment A advaits2z4r Follow 0 Improve A advaits2z4r Follow 0 Improve Article Tags : Operating Systems Explore OS BasicsIntroduction to Operating System5 min readTypes of Operating Systems7 min readKernel in Operating System3 min readSystem Call2 min readWhat happens when we turn on computer?3 min readProcess ManagementIntroduction of Process Management4 min readCPU Scheduling in Operating Systems7 min readIntroduction to Process Synchronization4 min readSolutions to Process Synchronization Problems4 min readClassical IPC Problems2 min readIntroduction of Deadlock in Operating System3 min readHandling Deadlocks2 min readMultithreading in OS - Different Models4 min readMemory ManagementIntroduction to memory and memory units2 min readMemory Management in Operating System5 min readBuddy System - Memory Allocation Technique4 min readOverlays in Memory Management4 min readVirtual Memory in Operating System7 min readPage Replacement Algorithms in Operating Systems5 min readOperating system based Virtualization5 min readI/O ManagementFile Systems in Operating System4 min readImplementing Directory Management using Shell Script3 min readSecondary Memory7 min readDisk Scheduling Algorithms9 min readDifference between Spooling and Buffering5 min readImportant LinksLast Minute Notes â Operating Systems15+ min readOperating System Interview Questions15+ min read Like