« Container-based operating system virtualization: a scalable, high-performance alternative to hypervisors. | Main | Practical, transparent operating system support for superpages »

The working set model for program behavior

Peter J. Denning. The working set model for program behavior. In Communications of the ACM 11(5), May 1968.Pages 323 - 333.

Reviews due Tuesday, 2/14 at 8:00 am

Comments

1. Summary

The paper considers the importance of modeling the program behavior for efficient resource allocation and introduce one such model, the Working set model and examine its properties. They then introduce the notion of "memory demand" and "processor demand" and how resource allocation can be achieved by balancing these demands against available resources.

2. Problem
This paper compares various paging policies using page traffic as one of the important performance metric. They explain that paging policies such as Random, FIFO although easy to implement suffer from high page traffic where as paging policies such as LRU and ATLAS Loop detection method, although had better performance suffered from overloading and was costly to implement respectively. Thus there was a lack of a paging algorithm at that time that extended well to all scenarios which was simple enough and relied on minimum historical data. The working set model alleviates these issues and at the same time being more accurate and suiting to general allocation scenarios.

3. Contributions

a.The Working set model and its properties such as size, prediction, reentry rate and sensitivity. The working set is defined as the collection of most recently used pages and it helps in determining the memory demands of a process.
b. The idea of closely tying the memory management and process scheduling. The working set model takes into account the demand on the memory as well as the demand on the processors in order to minimize the page traffic.
c. Finally, tackling the resource allocation problem by posing the problem as the one of balancing "memory demand" (working set) and "processor demand" (processor requirements) for near future.

4. Evaluation
The paper provides a good mathematical analysis of the concepts of Working set and Balancing "memory demand" and "processor demand", however it doesn't provide any evaluation of real world implementations of these concepts.

5. Confusion
a. The paper hinges on the value of tao for estimating the various important calculations such as traffic function, but doesn't provide a way to dynamically estimate the value of tao.
b. The paper raises an open question at that time about how processes should be charged for memory usage when the working sets overlap? Can you shed some light on the relevance of this question? How useful is this concept?
c. I am curios to know if there is any implementation of concepts introduced in this paper particularly the concept of balancing "memory demand" and "processor demand" in any Modern OS?

1. Summary
The author presents a Working Set model, an alternative approach to estimating demand for processor and memory. Using this model, Operating systems can reason about resource allocation based on observed program behavior, without any hints from the user or the compiler.

2. Problem
The paper analyzes commonly used paging algorithms such as random selection, FIFO, and LRU, and argues that these algorithms overload the processors and only add to the overall thrashing performance. The primary problem identified is how memory management can efficiently decide which page to remove. The author wants to combine the efficiency of the existing methods with some recognition of patterns and history to eliminate some of the waste of page faults.

3. Contributions
The working set model is a major contribution. The working set of a program is defined as the set of pages used in the last tau seconds. According to this model, the pages in the working set must be kept in memory, while pages outside this set can be demand paged. The model accounts for the locality of reference in the program, and thus reduces traffic between the main memory and auxiliary memory and results in fewer faults. The value of tau represents the level of aggression to be employed in paging out data. The paper also presents the problem of managing processor and memory allocations as a joint demand balancing problem.

4. Evaluation
This paper doesn't have an experimental evaluation and only presents the theoretical proofs supporting the model and analysis of its properties. The author argues that the intention of this paper is to stimulate a new kind of thinking and not to present a final model.

5. Confusion
1. What is the historical significance of the contributions of this paper? Did it influence a lot of future papers through its model or was it influential because of its elegant formulation of previous ideas?
2. How do we decide the appropriate level of aggression or tau in paging out data?

1. summary
The paper introduced 'working set model' to decide which part of information is in use by a process and which part is not. They defined 'processor demond' and 'computation demond' corresponding to demand for processor and memory, and model the problem of resource allocation as a balance of this two demand. They also provided a implementation support this model by sampling the page table entries.

2. Problem
Unified approach to tackle process scheduling and memory management is in need because they are highly coupled. But at that time, this way is hard because lacking of such model. It is mentioned that, overcommitment and thrashing is a problem that can be solved through proposed resource allocation of working set model.

3. Contributions
a). The model looks elegant and intuative for thinking about paging and virtual memory management problem.
b). Working set model can solve the tharshing problem.
c). Specifically, the definition of W, w, compromise for choosing t, the residency model and sampling the page tables.

4. Evaluation
a). The model is kind of theoratical and proposed with a lot of equations.
b). As for practice, a paper is sited to refer a simulation work using similary concept to improve system performance.

5. Confusion
a). How is the working set initialized?
b). The model is still in use today, but is there some improvement for this model, like tuning t in practice, avoid foolishing the model that changes the working set explosively?

Summary: The paper posits that lack of a proper model for program behavior hinders system’s ability to have a general treatment of allocating the resources. It lists the merits and demerits of various page replacement policies and introduces a new policy (Working Set Model) that contains pages referenced by a process in a given time window, to minimize page traffic by considering the demands on both resources – processor and memory, and does not require dynamic suggestions from user or compiler regarding resource requirements. The paper also derives formulae to predict approximate memory amount required and probability of a page being required by a computation.

Problem: Earlier systems approached the problem of allocating various resources such as CPU, memory independently and lacked a unified approach to solve these problems in a more general fashion. Page replacement policies used at that time for memory management had multiple issue. Random policy has high page fault rate. FIFO is based on sequential instruction fetch pattern assumption which is not true generally and it is also susceptible to overloading (thrashing). LRU as well is susceptible to overloading. ATLAS policy is useful only for loops and has high implementation cost. These problems motivator author to come up with a model which considers multiple resources (processor and memory, in this case) for resource management (paging in this case).

Contributions: 1. The papers introduces an algorithm that allocates resources by monitoring program behavior and does not seek dynamic suggestions from external agents such as users or compiler citing various reasons.
2. Introduces the concept of working set - smallest collection of information that must be present in main memory to assure efficient execution of his program. Working_Set(t, tau) is set of information requested by the process between time t-tau and t.
3. Characterizes working set by four general properties: a) size – page references increases with time separation parameter tau, b) prediction – similar to LRU, immediate past reference increases the likelihood of future references for small time separation tau, c) re-entry rate – rate with which a page reinters to memory, and d) sensitivity – to measure sensitivity of re-entry rate with respect to changes in tau.
4. Describes how various factors such as tau, and residency time etc affect resource allocation policy. For best value of tau, it recommends a value comparable to memory traverse time T. Too small tau results in pages being removed very frequently (even if useful) and too large leads to page staying in main memory even if they are not useful and thus wasting memory.
5. Describes implementation of scheduling with working set model.
6. Considers both resources – processor demand and memory demand to balance system demands.
7. Uses the idea of calculating page traffic between memory and auxiliary storage as a way to measure efficiency of these algorithms.

Evaluation: Although a bit mathematical, this paper is an easy read and presents various concepts well. It also describes in details various parameters affecting the performance. However, the paper lacks a simulation or real-world evaluation of working set model on a computer utility. It is difficult to comment on performance of WSM with absence of concrete performance improvement data.

Confusion(s): What factors determine the value of alpha and beta which are used to equate summation of all processor demands and memory demands respectively, while balancing system demand?

Summary

The paper attempts to design a unified mechanism for general resource allocation (mainly process scheduling and core memory management). Before this paper independent research was conducted to tackle management of different resources.

Problem

The reason for not having a unified approach for resource allocation is because the OS has no knowledge of a program’s behavior(it’s demands to be more precise) in the future.

The paper argues that relying for this information on the user is not a good idea mainly because a. The user can game the system b. The user has no idea about the requirements of the external modules it depends on. Reliance on compiler is also not encouraged because a. Data dependence means compiler doesn’t have complete information like run time does b. Compiler is an important piece of code which used very frequently and any additional burden can slow it down affecting the system performance adversely.

So, it is up to the OS to figure out what the program needs and that is the main challenge for this paper to solve.

Contributions

Firstly the paper compares various commonly used page replacement policies and qualitatively describes the shortcomings of each one of them.

The paper then defines a model called “working set” W(t, tao) for a process which are the most recently used pages in the process. It also introduced a random variable “x” which is the process time interval between successive references to the same page. Four useful properties, namely: 1. Size of the working set, 2. Prediction, 3. Reentry rate of pages and 4. Tao-sensitivity were also defined in terms of the working set and the random variable “x” which are subsequently used to determine the working set sizes w(t, tao) of running processes which are in-turn used for memory allocation for processes. Any process with working set size greater than the memory size is suspended. Processes demands are expressed in terms are conditional expectations of the time a process would take between “interactions”. Where an interaction is communication with a user or another process. With both memory and process demands defined a combined “system demand” is also defined. A system is said to be “balanced” if the total demand of all the processes just consumes a fraction of all resources “alpha” for memory and “beta” for processor.

Evaluation

The paper used a lot of probability theory to define new variables and mechanisms and subsequently it proposed new policies for memory management and scheduling using the mechanisms. But surprisingly it has never really evaluated and compared the performance of the proposed policies with the existing systems.

Confusion

The paper did not describe what happens to the processes which are suspended because their working set size is greater than the memory size. Are the sizes reset to some default value and

1. Summary
This paper proposes a new page replacement algorithm which maintains a working set for each process in memory. The Algorithm then selects best candidate based on the working set. Authors describe how this algorithm is theoretically better than other known algorithms. This Algorithm also helps OS in resource allocation among processes.
2. Problem
The paper claims that the known page replacement algorithms like FIFO, LRU, ATLAs, Random do not predict future page requirements accurately. This adds paging-in and paging-out overheads. Also, these algorithms do not play any role in scheduling strategies.
3. Contributions
Authors make an argument that page replacement algorithms that attempt to predict future page requirement of a process are not reliable. Also, any external inputs cannot be expected to predict page allocation strategies. Hence, authors proposed a mathematical model that uses working set of a process to choose pages for replacement. The working set is defined as minimum set of pages required in memory for process to run. The working set has four important properties: Size, Prediction, Re-entry Rate and working set parameter sensitivity. The authors have described every property with a mathematical model to quantify its impact on the page selection. The working set size is a good measure for understanding memory demand of the process. The Working Set has useful role in Scheduling policies. OS records working set for every process after every sampling interval. Number of such sampling interval constitute one working set parameter.
The authors also tried to address Resource allocation problem by defining memory demand and processor demand. Authors have described a mathematical model based on Working set to define Memory demand. Similarly, a mathematical model based on random variable of processor time used by each process. The conditional expectation function of this random variable is useful for predicting future CPU usage of the process. The authors have also assigned a priority for both these factors. As per paper, Memory demand should be considered before CPU demand as the former factor can adversely affect overall performance. The authors have described this balance policy as a minimization problem.
4. Evaluation
Authors have described and explained mathematical models for page replacement, resource allocation and scheduler policies. However, no empirical evaluation is available to prove if the model indeed performs better than known algorithms like LRU, FIFO, Random, etc. Also, the overhead of calculating and maintaining Working set hasn’t been discussed.
5. Confusion
The design of Working set is not clear. What things need to be stored in this set and what data-structure can be used for it.

Summary
The paper introduced the working set model, which relays on mathematically modeling to capture the properties of “memory demand” and “processor demand” of a process. With the working set model, the author discussed resource allocation, scheduling and sharing mechanisms and tried to unify memory management and resource management.

Problem
Even though studies on both process scheduling and core memory management has been developed back by 1968, there was a lack of unified techniques of memory management and resource management.

Poor memory management lead to thrashing. According to the paper, when there are not enough core memory to contain most of a program, considerable paging activity will interfere with efficiency.

At the same time, both users and compiler are not good advice source for resource management.
Users are not good advice source of resource requirements because:
1. Not knowing requirements for other's program from which the users' program is built on.
2. Advice not reliable, not the best choice the system should make.
3. Advice can bias toward the users' own program.
Compiler cannot be good source of advice as well because:
1. Programs will be modular in construction; information about other modules may be unavailable at compilation time.
2. Users' desire for rapid compilation.

Contribution
The paper introduced the concept of working set. Built concrete mathematically representations of the properties of working sets regarding to size, prediction, reentry rate and working set parameter sensitivity. With the working set model, people can effectively observe and measure the “processor demand” and “memory demand” of a process. The paper further discussed the considerations when choosing the working set parameter and the detection of the working set. The paper also discussed balance policies for resource allocation, which tries to keep system balanced by release jobs whose demand can restore the system balance first.

Evaluation
It is interesting to see most of the evaluation of the paper are done with the form of mathematical proof. Most times, a property or conclusion is based on mathematically reasoning. The good part is the math logic is coherent in the paper. However, test results or a comparison has not been seen in the paper.

I also liked the figures used in the paper, for example figure 2., which I think really helps the reader to visualize and understand the math model.

Confusion
What are the lasting impact of this paper? How does the working set model shaped today’s operating systems?


Summary
In this paper, a new program behavior model called "Working set model" is introduced that represents the set of most recently used pages by a particular process. Using this model, they define the notion of "memory demand" and similarly "processor demand". With the demands defined, the problem of resource allocation is now the task of balancing these two demands.


Problem
To achieve the goal of having multiple processes sharing the same system with limited main memory, earlier systems used some eviction method such as Random, FIFO, LRU, ATLAS loop detection etc, which were generic algorithms that didn't work good for all cases. Previously, processing and memory were treated two different aspects of OS whereas they are related (can't run a process without the pages it needs).

Contribution
The main contributions of this paper is the idea of "unifying" the Memory management & Process Scheduling and, the mathematical model of "working set". Working set is a minimal collection of pages that must reside in core memory for the process to run. The operating system analyzes the paper reference patterns to determine which are the most recently reference pages for a particular process. The author explains four properties of working set viz, size, prediction, reentry rate and sensitivity. For a working set, Size is the number of pages referenced in a time interval; Prediction: Immediate past page reference gives a good prediction of immediate future page reference behavior; Reentry Rate is the rate at which pages are recalled to memory. With smaller τ the number of pages in memory decreases thus increasing the reentry rate. Sensitivity is the measure of how sensitive is the reentry rate with changes in τ.

The author also provides basic idea of scheduling-- A ready list in which all the processes that are waiting for CPU are kept; a blocked list in which processes waiting for I/O reside. These concepts can still be seen in today's OSes (after almost half a century). After defining all these, author uses the memory demand and the processor demand to "balance" the resources.

Evaluation
The author provides a proof of concept with mathematical analysis and support. As the author himself says "interactions such as those between process and working set, and between balance and good service, are not yet fully understood", the idea of working set needs more evaluation and comparison of actual implementation with existing OSes.

Confusion
1. After defining all the properties with mathematical rigor, I was expecting these to be used to dynamically decide the value of τ, which for me, seemed absent.
2. To keep the system "balanced", when a new process is introduced to the system, the pages from another process which has similar "Memory demand" is swapped out. Doesn't it seem too much ? Like removing an entire process ?

1. Summary
This paper talks about working set model for system demand which is the unified demand for memory and processor. The working set of a process is the minimum collection of pages that must be present in memory for program’s execution.

2. Problems
Previously all the systems treated memory management and CPU scheduling separately. This sometimes resulted in high performance degradation due to thrashing and sticky congestion. There were several shortcomings with the previous page replacement policies like FIFO, LRU, random selection and ATLAS loop detection method. These policies focused only on memory management. FIFO and random selection were very easy to implement but they sometimes removed useful pages from memory leading to high page traffic. On the other hand, random selection gave better performance but was costly to implement and was susceptible to overloading. Similarly, ATALS loop detection gave good performance for programs involving loops but not for other programs. Moreover, it was very expensive to implement.

3. Contribution
The author introduced working set model, a mathematical model intended to provide efficient resource management. Working set of a process is defined as the set of most recently referenced pages. There are four properties associated with a working set: size, prediction, reentry rate and “t”-sensitivity. Based on these properties, the author observed that the working set size increases very slowly after a certain time, working set can be predicted for a next small interval based on the current working set and reentry rate decreases as “t” increases. Author also observes that the value of “t” should be comparable to memory traverse time (T) so that residency of a page does not reduce severely as the interreference time increases. This paper also proposes a software mechanism for detecting the unreferenced pages over an interval of time “t” and an efficient scheduling mechanism.

4. Evaluation
This paper provides only the mathematical model for the working set and does not provide any experimental evaluation.

5. Confusion
Can you please explain the purpose of separate running list and ready list in the scheduler part? Why can’t the processes present in the running list (waiting to run) be placed in the ready list?

1. Summary
This paper introduces the working set model as a paging policy. It provides a mathematical explanation for why the working set model works, as well as details about how to implement it in the kernel.

2. Problem
Operating systems needed a paging policy to manage which physical pages belonged to which processes. Existing paging policies were ad-hoc and prone to thrashing. Random selection was simple to implement, but it often chose pages currently in use to be written to disk. FIFO was also simple to implement, but it failed when many processes demanded pages. LRU was slightly more difficult to implement, and slightly more successful than LRU, but still prone to thrashing. Alternatives to demand paging, such as algorithms that incorporated information from users or compilers, also presented limitations.

Operating systems also needed to allocate CPU time to different processes. CPU allocation is intertwined with memory allocation; a process is in a running state if it is assigned to a processor, a ready state if it is able to be assigned to a processor, or a blocked state if it is blocked by another operation (such as a memory access).

3. Contributions
The authors do not implement an operating system with the ideas they describe; they simply provide the mathematical theory and propose future design decisions. The working set W(t, tau) is the set of all pages referenced by a process from time (t-tau) to t. After making certain assumptions, the authors show that the working set size is monotonically increasing with respect to increasing tau, and the working set is a good predictor for working sets in the near future. The authors also compute the re-entry rate of pages being paged in from disk, and explain how the choice of tau trades off page traffic to/from disk with the amount of wasted memory. The working set of a process can be determined by adding several use bits to a page table entry, setting the first bit to 1 when a page reference occurs, and shifting all bits during each sampling interval. If all use bits are 0, then the page is not in the working set.

Further calculations show how to compute the processor and memory demands of each process. The system is considered "unbalanced" if the total processor and memory usage are too high. The system can use an appropriate policy to limit processes that are hogging resources, but this topic is beyond the scope of this paper. The authors defend their limited treatment of this topic by claiming, "We do not intend that the proposed model be considered 'final'". As Emerson supposedly said, "Life is a journey, not a destination."

4. Evaluation
Since the authors did not implement their ideas in code, they did not have an evaluation section. They assume that the working set size has "statistical regularity", that references to a page have temporal locality, that the amount of time between references to a page is an independent and identically distributed random variable, and that only the working sets are stored in memory.

5. Confusion
How accurate are the assumptions about page accesses that the authors make? Are the ideas from the paper implemented as described, or have modern systems made changes?

1. Summary
The lack of an adequate model for program behaviour has led to differential treatment of resource allocation in a system. Working set of a computational activity is just another representation of a process in terms of memory demand. And paging out is the crux of this memory demand problem. Once we satisfy the inadequacies of memory demand with working set, one can try to strike balance between processor demand and memory demand.
2. Problem
Resource allocation has been traditionally treated as a set of different problems. But there is a way to develop a unified approach where resource allocation can be considered as a balancing problem between processor demand and memory demand. We need a building block which can satisfactorily encompass both these demands, which gives rise to the development of idea of ‘Working Set’. Rather than trying to solve this problem, the paper aims at stimulating thought in this new direction.
3. Contributions
The paper stimulates us to think that process and the information required to run a computational activity are nothing but two faces of the same coin. To satisfy the memory demand of a process, the paper propose a new model called the “Working Set Model”. Working set is defined as the minimum amount of information required by a computational activity to run successfully.
The process gives detailed mathematical description of how a working set should be formulated. The authors define working set parameter as the main parameter over which various important measures depend upon. So to choose an ideal working set parameter, one has to consider how the properties such as size, prediction, re-entry rate and residency are affected. The paper provides a concrete mathematical derivation for the dependency between these factors.
Once the working set is defined, the paper gives us an overview of how to detect and maintain it by making little modification to PTEs. Scheduling model is achieved by maintaining different lists for different states, assigning a quantum of time to each process and having a perennial checker process to monitor and manage these tasks. Finally the paper establishes that the allocation problem is nothing but a balancing problem between processor demand and memory demand.
4. Evaluation
The paper is concentrated more on developing an idea rather than implementing it and evaluating it. The paper compares and tries to evaluate different memory allocation policies to provide a context to the problem of paging out. Also the paper provides theoretical analysis of dynamic resource requirement advice. On their path to developing the working set model, the authors evaluate the effects of ‘working set parameter’ (Ƭ) on the defining factors of a working set such as size, prediction, re-entry rate and residency. But this is just a representation of mathematical proof rather than the practical experimental values. Also it seems, the authors themselves couldn’t understand the interactions between the process and working set thoroughly and left it open-ended. As the authors themselves say, their aim is to sow the seeds of new idea, which I think is achieved through this paper.
5. Confusion
1. Though the paper suggests how to derive the working set parameter, it is unclear how it is set in the implementation. Can you please shed some light on this?
2. How are the balance constants alpha and beta determined? How can one achieve balance by adjusting these two values?
3. Can you please explain how the prediction is achieved intuitively in the working set model?

Summary:
This paper proposes a resource allocation policy which takes in account both memory demand and processor demand of the processes and balances demands against available resources. It introduces “working set model” which refers to a collection of most recently used pages, as a smallest amount of information that must reside in the memory to ensure good performance.
Problem:
The paper exposes flaws in the existing memory management policies like Random selection, FIFO, LRU and ATLAS Loop detection model in terms of page traffic. Thus there was a need to minimize page faults, by identifying the right set of pages to reside in the memory. In, addition this task should be done by the operating system itself and cannot rely on user or compiler.
Contributions:
The big idea is the concept of working set model and how resource allocation is formulated as a balance of system demands (memory & processor demand).
Page replacement policy uses the idea of working set, which is a minimum set of pages that must be in the memory for a process to run efficiently.
The paper explains how the choice of tau (time period during for which the working set is calculated) influences the working set properties : size, prediction and reentry rates. The sensitivity function measures the influence of changes in tau to process-time re entry rate. The reentry rates along with sensitivity make sure tau is not too small. Considering the interference interval of the page against tau reveals that tau value should be close to 2*disk transfer time.
Each process is assigned a time quantum for scheduling purpose, the process runs for its time quantum or blocks on I/O and returns to the ready list. Finally a process can be accommodated only if its process and memory demands can be satisfied.
Evaluation:
The paper provides theoretical evaluation using mathematical equations. It does investigate the impact of the parameters (tau) it chooses. But, it lacks practical performance comparison of the proposed system which the existing ones on real workloads.
Confusion:
Not clear about the way processor demand is defined.

Summary
Paper presents a unified approach to tackle the resource allocation problem - process scheduling and memory management. Paper introduces Working set model which provides a way to determine what information is in use by a computation and which is not, simplifying resource decisions. The authors explain various properties of this model using a series of mathematical formulas. They define working sets as the smallest collection of information that must be present in main memory to assure efficient execution.

Problem
Paper tries to solve the problem with existing page replacement policies (random selection, FIFO, ATLAS loop detection and LRU). LIFO and random page-out policies are easy to implement, but can contribute to thrashing. ATLAS loop detection is limited and works well only for looping programs. Working sets attempts to solve these issues.

Contributions
The working set model is the main contribution of this paper.
The paper describes the limitation of hardware based approach to be impractical to determine the working set and proposes the software-based approach where page table entries are sampled at process-time intervals of a tunable parameter called sampling interval. Paper then explains scheduling implementation with Working Set which complies with properties like 1. memory management and process scheduling must be closely related activities 2. sampling of page tables, only on changing working sets, and as infrequently as possible 3. able to provide measurements of current working set sizes and processor time consumption for each process. It then formulates resource allocations as a problem of balancing processor and memory demands against available resources.

Confusions
Do today’s operating systems care much about thrashing?
Using this model seems to be a lot work. Is this model used in practice in today’s OSs?

1.Summary:
The authors claim that the problem of processor allocation and memory allocation to a process are closely related and both the problems can be solved efficiently by having a unified approach to solve the problem of resource allocation. The paper introduces a concept of system demand which is the combination of processor demand and the memory demand of each process. A working set is defined for each process based on which the memory demand is calculated. Resources are allocated to each process such that the system demand of all the processes must always be balanced with the available resources in the system.

2. Problem
Previously the problem of resource allocation to a process was divided into allocating processors to the process and allocating memory to the process and were solved independently. Various memory management policies for evicting the pages from the main memory were designed like Random, FIFO, LRU or the ATLAS which worked well for only particular set of workloads. Likewise even the processor allocation policies were developed without taking the memory demand of the process into account. Thus when these policies which were individually optimized for processor allocation and memory allocation are used together for solving the problem of resource allocation, might not be the optimal solution for the whole resource allocation problem.

3. Contribution
The main contribution of the paper is the concept of system demand. And every time the OS has to balance the system demand with the available resources in the system.

Working set of a process is the minimum set of pages that must be in the main memory for the efficient execution of a process. Working set is defined for a particular interval of time. First this interval is chosen such that the page traffic is minimized and the main memory is not wasted. After selecting an interval, the working set of a process is determined by altering the page tables of the process to store the use bits for each page. Each time the interval is elapsed the use bits of the page are checked to see if the page has been accessed in the interval, if not that particular page is marked as the page that can be removed in case any process demands for memory. To allocate the memory to a process, knowing the size of the working set is sufficient.
A checker process, which is always in the running list check the page table and removes the pages whose in-core bits are unset.
While allocating resource to a process, memory demand of a process has to be considered first followed by the processor demand.

4. Evaluation
This approach of solving the problem of resource allocation is not compared with any other similar approaches.

5. Confusion
Are there any other approaches which tries to solve the problem of processor allocation and memory allocation together as this paper does?

Summary
In this paper, a new program behavior model called "Working set model" is introduced that represents the set of most recently used pages by a particular process.


Problem
To achieve the goal of having multiple processes sharing the same system with limited main memory, earlier systems used some eviction method such as Random, FIFO, LRU, ATLAS loop detection etc, which were generic algorithms that didn't work good for all cases. Previously, processing and memory were treated two different aspects of OS whereas they are related (can't run a process without the pages it needs).

1. Summary
The paper proposes a mathematical model for categorizing program behavior which allows for coupling of memory allocation and scheduling.
2. Problem
The authors try to develop a model to enable unified approach to process scheduling and memory management. The problems had been dealt with independently and most unifying approaches were not provable and led to thrashing in an overcommitted memory scenarios. The paper goes in detail about the previous solutions and the opportunities they present for the model developed.
3. Contributions
The mathematical model developed and the outline combined scheduling and memory allocation approach seems to form the foundations for how we model program behavior today. This paper has been very influential because of its elegant and simplified approach and its acceptance of the fact that these are foundational concepts and open to change and updating. This is demonstrated by the authors efforts to improve and develop a Generalized Working Set Model in his later work which provides an optimal solution to the problem. Another point to note is that this was the first solution of its kind to make use of process time (virtual time) to make predictions and policy decisions [1].
4. Evaluation
The paper seems like a modeling and ideology paper and hence has a more mathematical evaluation. They focus on correctness of the model based on theoretical proofs. But in my opinion this paper doesn’t provide a working implementation and hence doesn’t have an empirical or statistical analysis of this algorithm for a real multi program environment.
5. Confusion
The paper talks about using an adaptive control prespective to developing a solution for the resource allocation problem, what happened to the use of this approach ?

1. Summary
The paper defines ‘working set’ model to understand program behavior. Such a working set (collection of process’s most recently used pages) can be used to do better resource allocation.

2. Problem
Back in late 1960s, the usual paging techniques did not suffice to avoid thrashing on multiprogramming systems. Since there was no adequate model to understand the computational requirements for each program, resource allocation was not efficient. A need to understand processor and memory resources in a unified approach also became important.

3. Contributions
The formulation of ‘working set’ for a process and subsequent definition of resource allocation as a balancing problem are important contributions of this paper. By definition, a working set is the minimum collection of most recently referenced pages that should be kept in memory for a process to operate efficiently. A working set is defined by four properties (related to program or computational activity) - size, prediction, reentry rate, tau-sensitivity. The author also talks about ‘system demand’ (memory demand + processor demand) and resource allocation, which balances system demand against available resources.

4. Evaluation
The paper primarily talks about the mathematical formulation of working set for a process and the details involved therein. An experimental evaluation of working set is missing.

5. Confusion
I came across this link on WSS and RSS :http://stackoverflow.com/questions/30756698/how-to-know-process-working-set-size-in-linux-proc. Is it true that modern day linux uses RSS as opposed to WSS ?
Are there other modern day systems that actually use the concept of ‘working set’ on per-process basis ?
This paper is too mathematical for me. Are there simple empirical estimates of WSS , say maybe for some particular system/programs?

1. Summary
This paper proposes the working set model to quantify the memory requirements of a process, and also defines the resource allocation problem as a balancing problem to control both the total memory and total processor demands of all process within the limit that hardware can provide.
2. Problem
Previous memory management algorithms are flawed. Random algorithm could cause eviction of useful pages frequently. FIFO performs poorly when the process does not follow the linear page scan pattern and is subject to overloading in multiprogram environments, when multiple programs share pages and ‘consume’ pages at different speeds. LRU catches the temporal locality but is also subject to overloading (in multiprogramming). Atlas proposes a page turning policy to detect loop behavior but the policy is only successful for looping programs.
3. Contributions
The author assumes that normal programs exhibit temporal locality and propose the working set, which is the unique pages referenced by the program in a short interval just before the current moment, to quantify the process memory requirement. Based on statistical modeling, the author suggests the time interval of working set to 2 times the page transfer time to provide a decent residency ratio. The author also proposes an implementation method for working set memory management algorithm. A checker process periodically sample the page table and use a per page shifting ‘register’ to determine if the page is referenced during the past interval, and marks the un-referenced page as replaceable. The author also models the processor demand with processor time and uses different status queues to schedule processes. At the end of the paper, the author finalizes the resource management problem as a balancing problem to control both the total memory and processer time requirements of all processes within the ability of hardware.
4. Evaluation
This paper lacks solid evaluation or experiments and focus on mathematical modeling solely. The authors mentions data from other paper but does not present them

5. Confusion
- The author does not give an approach to combine the priority scheduling and memory centric scheduling (based on working set), since there two requirements are not necessarily orthogonal.
- Working set can be overkill in some cases. For example, if the process sequentially scans pages in the last interval, and is continuing to do so, there is no need to reserve the working set size amount of memory for the process
- The author rejects page preloading due to the complexity of program behavior. But I think this is a problem of how we can do it wisely with available hints, like branch prediction.

1) Summary

The authors write at a time when multi-programmed time-sharing two-level memory systems were beginning to be designed. They propose a mathematical model for reasoning about resource consumption and allocation. Based on this model, they propose a scheduler and formulate the problem of balancing resource availability with resource demands by processes.

2) Problem

Systems have to multiplex resources between different processes. In particular, processor cycles and memory pages form two of the most common resources for programs to use. However, reasoning about availability and demand of these resources in a system is non-trivial.

3) Contributions

The authors propose a simple and elegant mathematical model to reason about system resources, particularly processor and memory scheduling. They make several important observations based on their model. First, they note that over short intervals, the working set of pages of a program is relatively predictable. Second, they observe that a significant amount of time can be spent paging memory in and out from disk. Third, they analyze based on their model at what granularity memory working sets should be tracked.

In addition, the authors propose a simple process scheduling framework which strongly resembles what we still use today.

4) Evaluation

The paper does a pretty good job of defining a simple and elegant mathematical model. Generally, the math is also pretty easy to follow and is well explained. Meanwhile, the model is also robust; even today, the model closely resembles what we view as a traditional system design. Likewise, the basic scheduler design described by the paper is still recognizable in today's operating systems. Finally, the working set algorithm described by the paper slightly resembles modern techniques to keep track of which pages have been referenced.

It is interesting to note how familiar many of the concepts in the paper are, even though it was written almost 50 years ago when technology was very different. For example, even though schedulers have come a long way since this paper was written, they often still resemble the design described in the paper, with processes existing in a ready, blocked, or running state. It just go to show... it's a journey, not a destination.

However, while the paper does discuss the assumptions of its model, it never tries to justify these assumptions. For example, the authors assume that the inter-reference intervals are independent and conform to a well-known statistical model, but they never explain why this is a reasonable assumption.

5) Confusion

I am under the impression that this paper invented or heavily influenced a lot of the current ideas about how a scheduler or memory allocator works; i.e. it was the first in a long line of works in this area. Is this correct? Or is this paper simply an elegant formulation of work that came before it?

1. Summary
This paper created the working set model for unifying memory management and process scheduling. This working set is defined in the paper as the amount of pages a program used in a sampling period.

2. Problem
It had just become evident that thrashing of memory was going to cause significant cuts to throughput. There was no unified approach for scheduling programs and managing memory so on shared machines competing programs would cause serious page traffic.

3. Contributions
The main goal of the paper’s proposed model was to minimize page traffic. The working set is a model that describes the minimum amount of memory that a program needs to execute efficiently. To prevent thrashing a program should only be run if there is enough memory for its working set. In this way programs that can fit in memory will be scheduled ahead of programs that cannot at the moment. Since the working set is the collection of pages referenced within a certain time period the paper creates a residency model to show the optimal timing length of the working set. If the timing is too short then you could cause lots of page traffic but if timing is too long then you hold too many pages in core memory.

4. Evaluation
The paper used several mathematical models to present the idea behind the working set model but has no quantifiable results as its just a theory paper. If I did not know the impact from this working set model I would have concluded that this was just an academic model with little practical application.

5. Confusion
It was unclear to me how the system could know the size of a program’s working set before running it therefore making it hard to know when a program could run if its based on the size of its working set. It seems like a circular problem.

1. Summary
The paper develops a Working Set model, a mathematical formulation of demand for processor and memory placed by processes on operating systems. This model can help operating systems reason about resource allocation based on observed behavior of a program, without any hints from the user or the compiler.

2. Problem
A program running on a system places demands for processor and memory jointly. There existed no unified approach towards process scheduling and memory management. There also did not exist any model for program behavior to help operating systems designers to reason about resource allocation.

3. Contributions
The paper develops a working set model, based on most recently used pages, to enable decisions regarding which pages are in use by the system, and to determine which pages must be in main memory for efficient execution. It calculates the rate at which pages can move between main memory and backing store, based on probabilities with which pages are re-referenced. The residency ratio of a page in main memory can help decide the amount of look-back in time required to minimize traffic to the backing store, while at the same time not consuming too much main memory. It is shown that working set size is enough information for the operating system and it need not know all the pages in the working set. Since a running process demands processor and memory jointly, a policy to balance demand for these resources is expressed as a minimization problem.

4. Evaluation
Since the working set is a mathematical model rather than an implementation, it is not evaluated as in other operating systems papers. However, some of the assumptions made in developing this model seemed too simplistic or unrealistic to me. For example, the intervals with which a page is re-referenced are considered independent and identically distributed random variables, which is not true for real programs.

5. Confusion
How is this mathematical model used by operating systems to determine resource allocation?

1. Summary
Denning discusses memory management solutions at the time of the writing in 1968. He consequently proposes the working set model aimed at stimulating new thinking around some of the shortcomings of prior approaches.

2. Problem
Resource allocation was not well defined at the time and thus memory management and process scheduling techniques were being developed independently. Denning discusses the shortcomings of LRU, FIFO and other methods trying to do prefetching.

3. Contribution
The change in thinking is probably the most important contribution here as to how process scheduling and memory management should work in concert. The key observation for FIFO and LRU is that they don’t scale with high contention resulting in overloading. For obvious reasons, anticipatory page-loading is not viable due to the lack of reliable foresight and the potential to be detrimental to the whole system.

The primary goal behind the working set is to ensure thrashing isn’t an issue among currently active processes. The working set is described by 4 main properties: size, prediction, reentry rate, and tau-sensitivity. Denning goes into detail quantifying the issue using probabilistic variables and a generalization/assumption regarding program execution.

4. Evaluation
It’s quite interesting to see the insights provided by Denning. I think it does a good job at what he set out to accomplish, to change the way we think about process management. The mathematical analysis generalizes the process, and while it does not answer every question, it sufficiently demonstrates the problem space.

5. Discussion
This paper is quite cognizant of where it falls short and prefaces the discussion as to be “sowing seeds of ideas”. He doesn’t dictate how the balance policies should work in favor of maximizing use of the system, but I assume an extension to this would evaluate other aspects such as fairness on real workloads.

1. summary
This paper describes a model for describing a program’s memory usage. It models the behavior based on working sets containing the set of all pages in use by the program.
2. Problem
If programs on a system were time-shared, it was found that normal paging techniques were not entirely sufficient. They often resulted in memory thrashing as they competed to bring pages in and out of the main memory. This problem could at times become self-intensifying as every program began to thrash and compete with one another limiting all progress on the system.
3. Contributions
The paper introduces the concepts of a working set. The working set of a program being the smallest collection of data required for the program to be able to perform efficient execution. In the model presented the working set is defined by the set of pages that have been accessed over a given time increment. The working set is more abstractly defined by four properties: size, dependent over the time increment used; prediction, intuitively recent past page behavior will be similar to that in the near future; reentry rate, as the time increment is decreased pages drop out of the set and must be re-added; and sensitivity, how reactive the reentry rate is to changes in the time interval. The working set is intended as a requirement for execution such that programs for which the entire working set would not fit in free memory are not allowed to be scheduled. This, in theory, eliminates memory thrashing as it can be guaranteed that the required memory will already fit within what’s available.
4. Evaluation
The supporting evidence arguing for working sets is unfortunately demonstrated only through mathematical models. An analysis applied to a working system and its memory patterns would have been interesting.
5. Confusion
How is a working set initially determined? When a program initially starts there can obviously be no working history of what is in use.

1. Summary

This paper presents and discusses the Working Set Model for modeling program behavior. In a Computer System, a computation activity manifests itself as a process for processor demand and as a working set for memory demand. The overall system demand then consists of both the processor and the memory demand. The major focus of this paper is analyzing working set model to manage memory demand of a process and how different properties of this model affect program behavior.

2. Problem

There doesn't exist a model to analyse program behavior in terms of its memory demand (at the time of this paper). The adhoc ideas in use such as FIFO and Random page replacement are far from optimal. One idea is to leave that to the user or to the compiler which provide the hints for the memory behavior of the program as part of the program itself. However, that is not adequate since a user would only try to optimize the local instead of global behavior of a program. Similarly, adding memory demand info in the compiler would be very complicated due to modular nature and hard to predict run time memory behavior of the program. Hence Operating System manages this by means of a unified approach that handles both the memory and processor demands of a program.

3. Contribution

The major contribution of this paper is the proposal that memory demand of a program should be managed as a working set model. A working set of a program at time t is the set of pages which were referenced by the program in the most recent past time window tao. According to Working Set Model, these pages should always be in memory while the pages outside this set can be paged in on demand.

A working set model has four basic properties. The first of these properties states that the size of the working set is a monotonically increasing function of tao. This is a fairly obvious conclusion since by increasing the time window tao, the number of pages referenced in that window can never decrease. The second property is prediction, which intuitively states that for small time delta, the working set of the program is very likely to remain unchanged. This property is rooted in the temporal memory affinity of programs since instructions close to each other tend to refer to the same piece of data. The third property of Working Set Model states that the rate of reentry of a page into main memory depends directly on the value of tao. Finally the fourth property measures how sensitive is the rate of reentry of a page into main memory on the value of tao.

The paper also recommends that value of tao should be comparable to the Time taken to fetch a page from disk to memory. This paper also proposes a hardware based approach for the implementation of Working Set Model which attaches a hardware timer with each memory page. That approach is clearly not very practical, however, this model can be implemented with software timers although this would incur an additional performance penalty.

4. Evaluation

This paper doesn't have experimental evaluation but it mathematically analyses the properties of the working set model.

5. Confusion

Is the value of tao a system constant or can be separate for every process? can tao by dynamic? say a process needs a bigger working set during a small execution window but then it iterativly operates on some small data. Would this model do well there if tao is static?

1. Summary

This paper presents and discusses the Working Set Model for modeling program behavior. In a Computer System, a computation activity manifests itself as a process for processor demand and as a working set for memory demand. The overall system demand then consists of both the processor and the memory demand. The major focus of this paper is analyzing working set model to manage memory demand of a process and how different properties of this model affect program behavior.

2. Problem

There doesn't exist a model to analyse program behavior in terms of its memory demand (at the time of this paper). The adhoc ideas in use such as FIFO and Random page replacement are far from optimal. One idea is to leave that to the user or to the compiler which provide the hints for the memory behavior of the program as part of the program itself. However, that is not adequate since a user would only try to optimize the local instead of global behavior of a program. Similarly, adding memory demand info in the compiler would be very complicated due to modular nature and hard to predict run time memory behavior of the program. Hence Operating System manages this by means of a unified approach that handles both the memory and processor demands of a program.

3. Contribution

The major contribution of this paper is the proposal that memory demand of a program should be managed as a working set model. A working set of a program at time t is the set of pages which were referenced by the program in the most recent past time window tao. According to Working Set Model, these pages should always be in memory while the pages outside this set can be paged in on demand.

A working set model has four basic properties. The first of these properties states that the size of the working set is a monotonically increasing function of tao. This is a fairly obvious conclusion since by increasing the time window tao, the number of pages referenced in that window can never decrease. The second property is prediction, which intuitively states that for small time delta, the working set of the program is very likely to remain unchanged. This property is rooted in the temporal memory affinity of programs since instructions close to each other tend to refer to the same piece of data. The third property of Working Set Model states that the rate of reentry of a page into main memory depends directly on the value of tao. Finally the fourth property measures how sensitive is the rate of reentry of a page into main memory on the value of tao.

The paper also recommends that value of tao should be comparable to the Time taken to fetch a page from disk to memory. This paper also proposes a hardware based approach for the implementation of Working Set Model which attaches a hardware timer with each memory page. That approach is clearly not very practical, however, this model can be implemented with software timers although this would incur an additional performance penalty.

4. Evaluation

This paper doesn't have experimental evaluation but it mathematically analyses the properties of the working set model.

5. Confusion

Is the value of tao a system constant or can be separate for every process? can tao by dynamic? say a process needs a bigger working set during a small execution window but then it iterativly operates on some small data. Would this model do well there if tao is static?

1. Summary

This paper presents and discusses the Working Set Model for modeling program behavior. In a Computer System, a computation activity manifests itself as a process for processor demand and as a working set for memory demand. The overall system demand then consists of both the processor and the memory demand. The major focus of this paper is analyzing working set model to manage memory demand of a process and how different properties of this model affect program behavior.

2. Problem

There doesn't exist a model to analyse program behavior in terms of its memory demand (at the time of this paper). The adhoc ideas in use such as FIFO and Random page replacement are far from optimal. One idea is to leave that to the user or to the compiler which provide the hints for the memory behavior of the program as part of the program itself. However, that is not adequate since a user would only try to optimize the local instead of global behavior of a program. Similarly, adding memory demand info in the compiler would be very complicated due to modular nature and hard to predict run time memory behavior of the program. Hence Operating System manages this by means of a unified approach that handles both the memory and processor demands of a program.

3. Contribution

The major contribution of this paper is the proposal that memory demand of a program should be managed as a working set model. A working set of a program at time t is the set of pages which were referenced by the program in the most recent past time window tao. According to Working Set Model, these pages should always be in memory while the pages outside this set can be paged in on demand.

A working set model has four basic properties. The first of these properties states that the size of the working set is a monotonically increasing function of tao. This is a fairly obvious conclusion since by increasing the time window tao, the number of pages referenced in that window can never decrease. The second property is prediction, which intuitively states that for small time delta, the working set of the program is very likely to remain unchanged. This property is rooted in the temporal memory affinity of programs since instructions close to each other tend to refer to the same piece of data. The third property of Working Set Model states that the rate of reentry of a page into main memory depends directly on the value of tao. Finally the fourth property measures how sensitive is the rate of reentry of a page into main memory on the value of tao.

The paper also recommends that value of tao should be comparable to the Time taken to fetch a page from disk to memory. This paper also proposes a hardware based approach for the implementation of Working Set Model which attaches a hardware timer with each memory page. That approach is clearly not very practical, however, this model can be implemented with software timers although this would incur an additional performance penalty.

4. Evaluation

This paper doesn't have experimental evaluation but it mathematically analyses the properties of the working set model.

5. Confusion

Is the value of tao a system constant or can be separate for every process? can tao by dynamic? say a process needs a bigger working set during a small execution window but then it iterativly operates on some small data. Would this model do well there if tao is static?

1. Summary

This paper presents and discusses the Working Set Model for modeling program behavior. In a Computer System, a computation activity manifests itself as a process for processor demand and as a working set for memory demand. The overall system demand then consists of both the processor and the memory demand. The major focus of this paper is analyzing working set model to manage memory demand of a process and how different properties of this model affect program behavior.

2. Problem

There doesn't exist a model to analyse program behavior in terms of its memory demand (at the time of this paper). The adhoc ideas in use such as FIFO and Random page replacement are far from optimal. One idea is to leave that to the user or to the compiler which provide the hints for the memory behavior of the program as part of the program itself. However, that is not adequate since a user would only try to optimize the local instead of global behavior of a program. Similarly, adding memory demand info in the compiler would be very complicated due to modular nature and hard to predict run time memory behavior of the program. Hence Operating System manages this by means of a unified approach that handles both the memory and processor demands of a program.

3. Contribution

The major contribution of this paper is the proposal that memory demand of a program should be managed as a working set model. A working set of a program at time t is the set of pages which were referenced by the program in the most recent past time window tao. According to Working Set Model, these pages should always be in memory while the pages outside this set can be paged in on demand.

A working set model has four basic properties. The first of these properties states that the size of the working set is a monotonically increasing function of tao. This is a fairly obvious conclusion since by increasing the time window tao, the number of pages referenced in that window can never decrease. The second property is prediction, which intuitively states that for small time delta, the working set of the program is very likely to remain unchanged. This property is rooted in the temporal memory affinity of programs since instructions close to each other tend to refer to the same piece of data. The third property of Working Set Model states that the rate of reentry of a page into main memory depends directly on the value of tao. Finally the fourth property measures how sensitive is the rate of reentry of a page into main memory on the value of tao.

The paper also recommends that value of tao should be comparable to the Time taken to fetch a page from disk to memory. This paper also proposes a hardware based approach for the implementation of Working Set Model which attaches a hardware timer with each memory page. That approach is clearly not very practical, however, this model can be implemented with software timers although this would incur an additional performance penalty.

4. Evaluation

This paper doesn't have experimental evaluation but it mathematically analyses the properties of the working set model.

5. Confusion

Is the value of tao a system constant or can be separate for every process? can tao by dynamic? say a process needs a bigger working set during a small execution window but then it iterativly operates on some small data. Would this model do well there if tao is static?

1. Summary

This paper presents and discusses the Working Set Model for modeling program behavior. In a Computer System, a computation activity manifests itself as a process for processor demand and as a working set for memory demand. The overall system demand then consists of both the processor and the memory demand. The major focus of this paper is analyzing working set model to manage memory demand of a process and how different properties of this model affect program behavior.

2. Problem

There doesn't exist a model to analyse program behavior in terms of its memory demand (at the time of this paper). The adhoc ideas in use such as FIFO and Random page replacement are far from optimal. One idea is to leave that to the user or to the compiler which provide the hints for the memory behavior of the program as part of the program itself. However, that is not adequate since a user would only try to optimize the local instead of global behavior of a program. Similarly, adding memory demand info in the compiler would be very complicated due to modular nature and hard to predict run time memory behavior of the program. Hence Operating System manages this by means of a unified approach that handles both the memory and processor demands of a program.

3. Contribution

The major contribution of this paper is the proposal that memory demand of a program should be managed as a working set model. A working set of a program at time t is the set of pages which were referenced by the program in the most recent past time window tao. According to Working Set Model, these pages should always be in memory while the pages outside this set can be paged in on demand.

A working set model has four basic properties. The first of these properties states that the size of the working set is a monotonically increasing function of tao. This is a fairly obvious conclusion since by increasing the time window tao, the number of pages referenced in that window can never decrease. The second property is prediction, which intuitively states that for small time delta, the working set of the program is very likely to remain unchanged. This property is rooted in the temporal memory affinity of programs since instructions close to each other tend to refer to the same piece of data. The third property of Working Set Model states that the rate of reentry of a page into main memory depends directly on the value of tao. Finally the fourth property measures how sensitive is the rate of reentry of a page into main memory on the value of tao.

The paper also recommends that value of tao should be comparable to the Time taken to fetch a page from disk to memory. This paper also proposes a hardware based approach for the implementation of Working Set Model which attaches a hardware timer with each memory page. That approach is clearly not very practical, however, this model can be implemented with software timers although this would incur an additional performance penalty.

4. Evaluation

This paper doesn't have experimental evaluation but it mathematically analyses the properties of the working set model.

5. Confusion

Is the value of tao a system constant or can be separate for every process? can tao by dynamic? say a process needs a bigger working set during a small execution window but then it iterativly operates on some small data. Would this model do well there if tao is static?

Summary:
Working set model for program behavior provides a convenient way to determine which information is in use by a computation and which is not. It enables simple determination of memory demands.

Problem:
In 1960s, multiprogramming systems observed thrashing. Thrashing was a sudden, unexpected drop in throughput of a multiprogrammed system. This problem can be tackled by a unified approach to allocate resources i.e. process scheduling and memory management. But such unified approach was absent because there was no adequate model for program behavior.

Contributions:
Working set of a program is the small collection of information that must be present in main memory to ensure its efficient execution. Set of most recently referenced pages constitute working set. The paper presents a mathematical model of working set. If the working set is too small, then there will be a lot of page traffic. If the working set is too large, then it may result in wasted memory. The paper describes a hardware-based approach to detect the working set of a program but it is not practical to add hardware to existing systems. So the paper proposes software-based approach where page table entries are sampled at process-time intervals of a tunable parameter called sampling interval. A program is run only when there is enough space for it’s working set. The author also presents an implementation of scheduling with working sets. The author formulates resource allocations as a problem of balancing memory and processor demand against available resources. In summary, the paper lays foundation to the concept of locality of memory references.

Confusion:
The paper states that a program will be run only if there is enough memory available to fit it’s working set. The approach suggested in the paper to determine working set seems to contradict with this assumption. I did not understand how working set size would be determined before the program starts to run for the first time?

1. Summary
This paper formulates the resource management problem in terms of working set. It gives a page replacement policy (working set), and proposes an idea to control CPU and memory allocation together.

2. Problem
The problem comes from the drawback of previous memory management policies (including random, FIFO, LRU and ATLAS Loop Detection). Random and FIFO are not satisfying because the important pages (the one will be referenced shortly) will be erroneously paged out to disk. LRU is not good when multiple processes cause memory overloading (thrashing), page replacement will take over most of CPU time. In my opinion, precise LRU is also hard and expensive to implement, because we have to maintain and update per-page information. ATLAS Loop Detection applies only well for looping programs, so it is less general than others. The author introduces working set method to tackle thrashing, and gives a cheaper way than LRU for memory replacement (like clock algorithm).

3. Contributions
The author defines the memory occupied by process as working set. Same as LRU, the author claimed that based on process's history behavior (how much memory it has touched), we could better predict process's future behavior (how much memory it will touch). The memory working set is the pages that one process has referenced during e.g. last several seconds. Maintaining this working set information precisely is expensive. The author proposes a sampling method to get a approximate working set information. Each page has a set of (e.g. K) use bits, and after a certain time, these bits shift. The page can be paged out if all bits are zero. For me, it is a generalized version of clock algorithm. In general clock algorithm, we have only one bit to indicate the page was recently referenced or not, here we have arbitrary K bits.

Another interesting thing for me is Figure 6 where the author uses it to criticize page-in look-ahead method. User sends requests to one procedure A, then A interprets request, and call one of other procedures B1, ..., Bn to do the job with data D. The called Bi procedure will return control back to A for next user request. It is the same with shell workflow, while the author didn't point out each procedure run in the same address space or not.

4. Evaluation
This paper mostly gives math formalization of its method instead of implementing concrete system experiment. While it may be more interesting to see some benchmark that the authors can vary the use bits (integer K as above) of working set method, and justify how efficiency of page replacement policy would be if we have K larger than one. In appendix, the author sketch out how to implement working set with hardware support. I am not very sure how efficiency would be if we maintain so-called timer per page.

5. Confusion
Before section 4, the author stated "before running a process we insure that there are enough pages of memory free to contain its working set W(t, r)". How to calculate the working set before process running?

1. Summary
This paper introduces the working set model to analyze the memory usage and execution behavior of program. It uses mathematical formulas to provide a theoretical view of what is the ‘working set’ of a program and use this to solve some problems like resource allocation and scheduling.

2. Problems
In 1968, when this paper was published, the memory and CPU resource of computer is really limited, but we need multiple programs to share the same memory and CPU resource. Thus, how to efficiently allocate resources, swap memory pages and scheduling multiple programs is very important. Existing algorithms like random selection and FIFO does not consider the program behavior, algorithms like LRU also has its problems. So, this paper tries to propose a general model to model the program behavior and solve resource allocation problems.

3. Contributions
The core of this paper is working set. It is the smallest collection of information (memory pages) to assure efficient execution of a program, which can also be expressed as the information referenced in a time interval. For memory usage, this paper uses working set model and some probability theory to define the reentry rate and return traffic rate, which are important for memory management and swapping. It defines the memory demand by the size of working set memory usage over the total memory of the system. For CPU usage, there is also a lot of mathematical formulas that finally leads to the processor demand, which is the processor time over the tolerable response time. Finally, this paper combines processor and memory demands to make system demands, and defines balanced demands as the total demands of processes is bounded by a certain fraction of total resource. For scheduling and sharing, this paper also proposes frameworks using this working set model.

4. Evaluation
This paper does not have a performance evaluation section like traditional OS papers. This is because it is a theoretical paper and mainly focuses on providing a configurable and general model to model the program behavior. There are too many parameters and assumptions thus makes it nearly impossible to do some experiment to evaluate this model. Maybe some models that are derived from this model will have some evaluations.

5. Confusion
(1). Is the tau parameter in working set model differs among different programs? How can this model decide (or dynamic adjust?) how long should the time interval be?
(2). The model in this paper seems only to work as a theoretical model, not a real model in real systems. Are there some specific model or scheduling policies based on this model?

1. Summary
In order to effectively manage memory in a system running multiple programs, we need a way to measure and reason about how a process uses memory over time. This paper presents the concept of a process’ “working set”, a set of pages touched by a process within a sliding window of time.

2. Problem
With a limited amount of fast memory and multiple programs sharing a single machine, what policy should one follow for page eviction? Previous solutions such as random replacement, FIFO, and LRU are too simple and based on heuristics. A way to reason about a program’s dynamic memory requirements is needed.

3. Contributions
The main contribution of this paper is the precise definition of a program’s working set, the minimum number of pages it needs to hold in memory at a given time to run effectively. Given each programs’ working set, a user or OS can keep the system from becoming overcommitted by making sure the total size of all running programs’ working set does not exceed the total size of memory.
This definition of working set provides a simple diagnosis for the performance cliff caused by thrashing – it means memory cannot hold the working sets of all running programs and some programs should be killed.

4. Evaluation
The author provides some data based on a probabilistic model of memory access. He also suggests some plausible mechanisms for implementing working set as a page replacement policy in hardware. Beyond this, there is no evaluation through simulation or prototype hardware. The author mentions the “working set” idea has been used in another recent work.

5. Confusion
The author defines the working set as a dynamic measure of a program’s memory usage. At the same time, he assumes that a program is not run unless its working set will fit in memory. This seems like a catch-22, as well as an unreasonable assumption. How is one to figure out working set size before running a program if it is measured dynamically?

1. Summary
This paper is theoretical. It proposes the working set model for memory and processor resource allocation.

2. Problem
- Resource allocation. There are many allocation techniques, but a unified approach is needed.
- Constraints. OSs should only rely on the runtime programs. Outside help such as compilor and user information are prohibited.
- Minimize the page traffic.
- Thrashing. Overcommitment of memory should be avoided. Otherwise most of the time would be wasted on memory-auxiliary traverses and most processes would be stalled.

3. Contributions
- model
Working-set model defines a working set size $w(t, \tau)$, which is the number of pages referenced in the time interval $(t - \tau, t)$. Then it defines the reentry rate and residency to characterize the rate of page traverse and set $\tau \approx 2T$ so that the residency rate is not too low while maintain a good prediction.
- scheduling
See Figure 7. It satifies the following properties
1) memory management and process scheduling must be closely related activities
2) efficiency should be of prime importance
3) be capable of providing measurements of current working set sizes and processor time consumptions
- resource allocation
Two parameters, the processor demand and memory demand are defined. The Working-set model balance the demand of all processes (Eq 23,24). It applies dynamic maintenance and balance policies (Eq. 26)

4. Evaluation
N/A. Theoretical paper. No evaluation.

5. Confusion
On p.326, P2 Prediction, the authors say W(t, \tau) is a good predictor to W(t+ \alpha, \tau) when \alpha is less than \tau. However on p.329 the authors say "past paging policies have eschewed look-ahead". It seems these two claims are contradictary.

Summary

Memory and scheduling are not independent and shoud be coupled
together to improve efficieny. Authors come up with the notion of a
working set to minimise the global average number of page faults. In addition to that they come up with a notion of processor demand, and finally define total demand as a combination of memory demand and processor demand and optimise over two variables.

Problem :

  • There isnt an adequate model to model program behaviour. Previous work has treated scheduling and memory management independently, however they are correlated.

  • Cannot enlist the help of user or compiler to help model program
    behaviour: - user doesn't know what's going on, infact he doesn't even
    know there are other processes. Besides we never trust the user!! -
    compiler: cannot model dynamic data dependencies. Also will slow down
    compiler.

Contribution

Memory management:

The authors agree that best known solution to paging in is to
just page in on demand. They provide evidence that algorithms that try
to look ahead optimization can have terrible performance in many case
e.g, one of the modules blocks and memory isn't accessed for a long
time by that process(we'd have wasted time and energy bringing those
pages into main memory)

Thus the important question boils down to which page shall should be
paged out? Previous work included random, FIFO, LRU and loop
detection. FIFO and LRU are both susceptible to overloading[**refer to
confusion**]. Loop detection is no good for random references and
implementation is expensive

Develop a new model known as working set model which helps understand
what information is being used by running program. The goal is to
keep the working set of every process in main memory all the time,
process doesn't run unless theres enough space for its working set.

W_i(t, \tau) : working set of information of a process i at time t. It
consists of all pages the process has referenced between the time
interval [t-\tau, t]. Tau is the working set parameter. If tau is big
then we'll have more history for the process, so the liklihood for
pagefaults is reduced. Vice versa, for when tau is small.

How to select tau
They recommend the right value tau has a function of T(time take to
write page to aux memory/time taken to write page from aux to main,
they assume they are symmetric for the sake of analysis)

x: how long page has been memory, p(x): chances of page being in main
memory
Do some simple math (look at three piecewise linear functions)

They want to the drop from p(x) =1 to p(x) = tau/(tau + T) to be less severe,
so they pick tau = 2T.

How to keep track of which pages memory has referenced in order to
keep working set active:Could be done with hardware but that's
impractical so they choose to do it with software, by sampling each
process page table every \sigma seconds, but sample only if working
set has been changed for that process (want to do it as infrequently
as possible)

Balance processor and memory demand:

memory demand for process is defined as the fraction of main memory
the working set includes. If the working set is bigger than the main
memory then set demand to 1 (very unlikely)

processor demand: a function of a standard interval a process is
expected to use before it blocks. If q is the random variable that
measures the time used by a process between interactions, then q has a
hyper exponential distribution ( simply put has really long tail)

With the help of some elementary probability theory, they set the
processor demand p_i = as Q(gamma)/NA where gamma is the elapsed since
last interaction. Q(gamma) is the conditional expectation of q given
gamma seconds have already elapsed, N is the number of processors and
A is the standard interval[** REFER CONFUSION***]

Total demand = (m_i, p_i)
Balance formula: Given parameters alpha and beta, sum of all P_i's in running list sum to alpha and sum of m_i's in
running list sum to beta.


Evaluation

I like the heuristic. Essentially its saying keep track of some sort
of history, for each process. The proofs seem contrived and a bit
unneccessary. To me it seems they came up with a method, then made
assumptions about distributions that made the method look good
formally.

The processor demand bit seems very hand wavy to me too.

Confusion

1) The paper describes overloading as:
It says when core demand is high one cycle of the list completes
rapidly and the pages deleted are still needed by their processes.
Which list? Not quite sure how this works.

2) In the calculation for processor demand where did "A" or standard
interval come from?

3) min S - (a,b) is the equation. But S = \sum{D} = (a,b). So what is
the variable here?

Post a comment