Working-Set Model of Process Memory Behavior According to the working-set theory in operating systems, what does a process’s working set represent?
-
AThe collection of pages the process actively accesses over a recent window of time
-
BThe disk scheduling order for the process’s swap file
-
CThe method used to merge adjacent free blocks in memory
-
DThe rule for assigning CPU time slices to processes
-
ENone of the above
Answer
Correct Answer: The collection of pages the process actively accesses over a recent window of time
Explanation
Introduction / Context:The working-set model explains locality of reference in process memory usage and guides policies for page allocation and load control to minimize thrashing.
Given Data / Assumptions:
- Virtual memory with paging is in use.
- A time window (Delta) defines “recently used”.
- Locality implies clustered page references.
Concept / Approach:The working set W(t, Delta) is the set of distinct pages referenced by a process during the interval of length Delta ending at time t. Ensuring enough frames to hold the working set reduces page faults and prevents thrashing.
Step-by-Step Solution:Define Delta: a tunable window representing recent activity.Track page references within this window.Compute W as the unique set of pages touched in the window.Allocate frames ≥ |W| to meet demand and maintain performance.
Verification / Alternative check:Empirical observations of program phases show stable working sets during phases and changes at phase boundaries, aligning with locality principles (temporal and spatial).
Why Other Options Are Wrong:Option B: Disk scheduling concerns I/O queue order, not working-set content.Option C: Coalescing free holes is a heap/allocator concern, not paging.Option D: CPU scheduling is orthogonal to working-set memory behavior.Option E: Not applicable because Option A is correct.
Common Pitfalls:
- Confusing working set with resident set; working set is a target size, resident set is actual frames held.
- Choosing Delta too small or too large, leading to under- or over-provisioning.
Final Answer:The collection of pages the process actively accesses over a recent window of time.