OPERATING SYSTEM-1

Page 55

EDUPROZ INSTITUTE OF PROFESSIONAL STUDIES (YOUR EDUCATION YOUR WAY) Increase in the total amount of physical memory allocated to X. 2. Local policies

When process X needs to fault in a new page, the set of candidates for replacement includes only those pages currently belonging to process X. Note that this means that the total amount of physical memory allocated to X will not change.

3. In general, a system will have to incorporate both kinds of policy:

a. At startup, we must use a global policy When a process is just starting up, a global policy will have to be used since the new process has few pages available as replacement candidates. b. Local paging may be used to keep a particular process from using too much memory Eventually, however, a local policy may have to be imposed to keep a given process from consuming too much of the system’s resources. 4. The working set of a process

Many of the policies to be discussed below can be applied either locally or globally. The notion of a process’s working set can be used to help decide whether the process should be allowed to grow by taking pages from other processes or should be required to page against itself. a. The working set is the set of pages that a process has accessed in the time interval [T - T, T] The working set for a process is defined in terms of some interval T back from the current time T. Building on the principle of locality of reference, it is assumed that this is a good approximation to the set of pages that the process must have physically resident in order to run for an interval T into the future without a page fault. (The interval T is chosen to keep the percentage of memory accesses resulting in a fault to an acceptable level. A time corresponding to around 10,000 memory accesses being a good rule of thumb.) b. During the life of a process, there are times when the working set changes slowly and other times when it changes rapidly Studies of the memory access behavior of processes show that typically there are periods of time during which the working set of a given process changes very little. During these periods, if sufficient physical memory is allocated to the process then it can page locally against itself with an acceptably low rate of page faults. These periods are separated by

__________________________________________________ EDUPROZ INSTITUTE OF PROFESSIONAL STUDIES (YOUR EDUCATION YOUR WAY) SECTOR-7, DWARKA 55


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.