Memory Management Techniques Explained
Memory Management Techniques Explained
Address Binding:
Programs are stored on the secondary storage disks as binary executable files. When the
programs are to be executed they are brought in to the main memory and placed within a process.
The collection of processes on the disk waiting to enter the main memory forms the input queue.
One of the processes which are to be executed is fetched from the queue and placed in the main
memory. During the execution it fetches instruction and data from main memory. After the process
terminates it returns back the memory space. During execution the process will go through different
steps and in each step the address is represented in different ways. In source program the address is
symbolic. The compiler converts the symbolic address to re-locatable address. The loader will
convert this re-locatable address to absolute address.
Binding of instructions and data can be done at any step along the way:
Compile time:-If we know whether the process resides in memory then absolute code can be
generated. If the static address changes then it is necessary to re-compile the code from the
beginning.
Load time:-If the compiler doesn‟t know whether the process resides in memory then it
generates the re-locatable code. In this the binding is delayed until the load time.
Execution time:-If the process is moved during its execution from one memory segment to
another then the binding is delayed until run time. Special hardware is used for this. Most of
the general purpose operating system uses this method.
1
Logical versus physical address:
The address generated by the CPU is called logical address or virtual address. The address
seen by the memory unit i.e., the one loaded in to the memory register is called the physical address.
Compile time and load time address binding methods generate some logical and physical address.
The execution time addressing binding generate different logical and physical address. Set of
logical address space generated by the programs is the logical address space. Set of physical address
corresponding to these logical addresses is the physical address space. The mapping of virtual
address to physical address during run time is done by the hardware device called memory
management unit (MMU). The base register is also called re-location register. Value of the re-
location register is added to every address generated by the user process at the time it is sent to
memory.
Dynamic Loading:
For a process to be executed it should be loaded in to the physical memory. The size of the
process is limited to the size of the physical memory. Dynamic loading is used to obtain better
memory utilization. In dynamic loading the routine or procedure will not be loaded until it is called.
Whenever a routine is called, the calling routine first checks whether the called routine is already
loaded or not. If it is not loaded it cause the loader to load the desired program in to the memory
and updates the programs address table to indicate the change and control is passed to newly called
routine.
Advantage: Gives better memory utilization. Unused routine is never loaded. Do not need
special operating system support. This method is useful when large amount of codes are needed to
handle in frequently occurring cases.
2
Dynamic linking and Shared libraries:
Some operating system supports only the static linking. In dynamic linking only the main
program is loaded in to the memory. If the main program requests a procedure, the procedure is
loaded and the link is established at the time of references. This linking is postponed until the
execution time. With dynamic linking a “stub” is used in the image of each library referenced
routine. A “stub” is a piece of code which is used to indicate how to locate the appropriate
memory resident library routine or how to load library if the routine is not already present. When
“stub” is executed it checks whether the routine is present is memory or not. If not it loads the
routine in to the memory. This feature can be used to update libraries i.e., library is replaced by a
new version and all the programs can make use of this library. More than one version of the library
can be loaded in memory at a time and each program uses its version of the library. Only the
programs that are compiled with the new version are affected by the changes incorporated in it.
Other programs linked before new version is installed will continue using older libraries this type
of system is called “shared library”.
Swapping
Swapping is a technique of temporarily removing inactive programs from the memory of
the system. A process can be swapped temporarily out of the memory to a backing store and then
brought back in to the memory for continuing the execution. This process is called swapping.
Eg:-In a multi-programming environment with a round robin CPU scheduling whenever the time
quantum expires then the process that has just finished is swapped out and a new process swaps in
to the memory for execution.
A variation of swap is priority based scheduling. When a low priority is executing and
if a high priority process arrives then a low priority will be swapped out and high priority is
allowed for execution. This process is also called as Roll out and Roll in.
Normally the process which is swapped out will be swapped back to the same memory
space that is occupied previously. This depends upon address binding.
If the binding is done at load time, then the process is moved to same memory location. If
the binding is done at run time, then the process is moved to different memory location. This is
because the physical address is computed during run time.
Swapping requires backing store and it should be large enough to accommodate the copies
of all memory images. The system maintains a ready queue consisting of all the processes whose
memory images are on the backing store or in memory that are ready to run. Swapping is constant
by other factors: To swap a process, it should be completely idle. A process may be waiting for an
i/o operation. If the i/o is asynchronously accessing the user memory for i/o buffers, then the
process cannot be swapped.
First fit and best fit are the most popular algorithms for dynamic memory allocation. First fit
is generally faster. Best fit searches for the entire list to find the smallest hole i.e., large enough. Worst
fit reduces the rate of production of smallest holes.
All these algorithms suffer from fragmentation.
Memory Protection:
Memory protection means protecting the OS from user process and protecting
process from one another. Memory protection is provided by using a re-location register, with a
limit register. Re-location register contains the values of smallest physical address and limit register
contains range of logical addresses. (Re-location = 100040 and limit = 74600). The logical address
must be less than the limit register; the MMU maps the logical address dynamically by adding the
value in re-location register. When the CPU scheduler selects a process for execution, the dispatcher
loads the re-location and limit register with correct values as a part of context switch. Since every
address generated by the CPU is checked against these register we can protect the OS and other
users programs and data from being modified.
Fragmentation:
Memory fragmentation can be of two types: Internal Fragmentation External Fragmentation
Internal Fragmentation there is wasted space internal to a portion due to the fact that
block of data loaded is smaller than the partition. Eg:-If there is a block of 50kb and if the
process requests 40kb and if the block is allocated to the process then there will be 10kb of
memory left.
External Fragmentation exists when there is enough memory space exists to satisfy the
request, but it not contiguous i.e., storage is fragmented in to large number of small holes.
External Fragmentation may be either minor or a major problem.
One solution for over-coming external fragmentation is compaction. The goal is to move
all the free memory together to form a large block. Compaction is not possible always. If the
relocation is static and is done at load time then compaction is not possible. Compaction is
possible if the re-location is dynamic and done at execution time.
Another possible solution to the external fragmentation problem is to permit the logical
address space of a process to be non-contiguous, thus allowing the process to be allocated physical
memory whenever the latter is available.
Segmentation
Most users do not think memory as a linear array of bytes rather the users thinks memory as a
collection of variable sized segments which are dedicated to a particular use such as code, data,
4
stack, heap etc. A logical address is a collection of segments. Each segment has a name and length.
The address specifies both the segment name and the offset within the segments. The users specify
address by using two quantities: a segment name and an offset. For simplicity the segments are
numbered and referred by a segment number. So the logical address consists of
<segment number, offset>.
Hardware support: We must define an implementation to map 2D user defined address in to 1D
physical address. This mapping is affected by a segment table. Each entry in the segment table has
a segment base and segment limit. The segment base contains the starting physical address where
the segment resides and limit specifies the length of the segment.
The use of segment table is shown in the above figure: Logical address consists of two parts:
segment number„s‟ and an offset„d‟ to that segment. The segment number is used as an index to
segment table. The offset‟d‟ must bi in between 0 and limit, if not an error is reported to OS. If legal
the offset is added to the base to generate the actual physical address. The segment table is an array
of base limit register pairs.
Protection and Sharing: A particular advantage of segmentation is the association of protection
with the segments. The memory mapping hardware will check the protection bits associated with
each segment table entry to prevent illegal access to memory like attempts to write in to read-only
segment. Another advantage of segmentation involves the sharing of code or data. Each process
has a segment table associated with it. Segments are shared when the entries in the segment tables
of two different processes points to same physical location. Sharing occurs at the segment table.
Any information can be shared at the segment level. Several segments can be shared so a program
consisting of several segments can be shared. We can also share parts of a program.
Advantages: Eliminates fragmentation. x Provides virtual growth. Allows dynamic
segment growth. Assist dynamic linking. Segmentation is visible.
Differences between segmentation and paging:-
Segmentation:
Program is divided in to variable sized segments. x User is responsible for dividing the
program in to segments.
Segmentation is slower than paging.
Visible to user.
Eliminates internal fragmentation.
Suffers from external fragmentation.
Process or user segment number, offset to calculate absolute address.
Paging:
5
Division is performed by the OS.
Paging is faster than segmentation.
Invisible to user.
Suffers from internal fragmentation.
No external fragmentation.
Process or user page number, offset to calculate absolute address.
Paging
Paging is a memory management scheme that permits the physical address space of a
process to be non-contiguous. Support for paging is handled by hardware. It is used to avoid
external fragmentation. Paging avoids the considerable problem of fitting the varying sized memory
chunks on to the backing store. When some code or date residing in main memory need to be
swapped out, space must be found on backing store.
Basic Method:
Physical memory is broken in to fixed sized blocks called frames (f). Logical memory is
broken in to blocks of same size called pages (p). When a process is to be executed its pages are
loaded in to available frames from backing store. The blocking store is also divided in to fixed-
sized blocks of same size as memory frames. The following figure shows paging hardware:
Logical address generated by the CPU is divided in to two parts: page number (p) and page
offset (d). The page number (p) is used as index to the page table. The page table contains base
address of each page in physical memory. This base address is combined with the page offset to
define the physical memory i.e., sent to the memory unit. The page size is defined by the hardware.
The size of a power of 2, varying between 512 bytes and 10Mb per page. If the size of logical
address space is 2^m address unit and page size is 2^n, then high order m-n designates the page
number and n low order bits represents page offset.
6
Eg:-To show how to map logical memory in to physical memory consider a page size of 4
bytes and physical memory of 32 bytes (8 pages). Logical address 0 is page 0 and offset 0. Page 0
is in frame 5. The logical address 0 maps to physical address 20. [(5*4) + 0]. ogical address 3 is
page 0 and offset 3 maps to physical address 23 [(5*4) + 3]. Logical address 4 is page 1 and offset
0 and page 1 is mapped to frame 6. So logical address 4 maps to physical address 24 [(6*4) + 0].
Logical address 13 is page 3 and offset 1 and page 3 is mapped to frame 2. So logical address 13
maps to physical address 9 [(2*4) + 1].
Hardware Support for Paging:
The hardware implementation of the page table can be done in several ways:
The simplest method is that the page table is implemented as a set of dedicated registers. These
registers must be built with very high speed logic for making paging address translation. Every
accessed memory must go through paging map. The use of registers for page table is satisfactory if
the page table is small.
If the page table is large then the use of registers is not visible. So the page table is kept in the
main memory and a page table base register [PTBR] points to the page table. Changing the page
table requires only one register which reduces the context switching type. The problem with this
approach is the time required to access memory location. To access a location [i] first we have to
index the page table using PTBR offset. It gives the frame number which is combined with the page
offset to produce the actual address. Thus we need two memory accesses for a byte.
The only solution is to use special, fast, lookup hardware cache called translation look aside
buffer [TLB] or associative register. LB is built with associative register with high speed memory.
Each register contains two paths a key and a value.
When an associative register is presented with an item, it is compared with all the key
values, if found the corresponding value field is return and searching is fast. TLB is used with the
page table as follows: TLB contains only few page table entries. When a logical address is generated
by the CPU, its page number along with the frame number is added to TLB. If the page number is
found its frame memory is used to access the actual memory. If the page number is not in the TLB
(TLB miss) the memory reference to the page table is made. When the frame number is obtained
use can use it to access the memory. If the TLB is full of entries the OS must select anyone for
replacement. Each time a new page table is selected the TLB must be flushed [erased] to ensure
that next executing process do not use wrong information. The percentage of time that a page
number is found in the TLB is called HIT ratio.
Protection:
Memory protection in paged environment is done by protection bits that are associated with each
frame these bits are kept in page table. x One bit can define a page to be read-write or read-only.
To find the correct frame number every reference to the memory should go through page table. At
7
the same time physical address is computed. The protection bits can be checked to verify that no
writers are made to read-only page. Any attempt to write in to read-only page causes a hardware
trap to the OS. This approach can be used to provide protection to read-only, read-write or execute-
only pages. One more bit is generally added to each entry in the page table: a valid- invalid bit.
A valid bit indicates that associated page is in the processes logical address space and thus it is a
legal or valid page.
If the bit is invalid, it indicates the page is not in the processes logical addressed space and illegal.
Illegal addresses are trapped by using the valid-invalid bit.
The OS sets this bit for each page to allow or disallow accesses to that page.
Each virtual address in the Inverted page table consists of triple <process-id , page number , offset
>. The inverted page table entry is a pair <process-id , page number>. When a memory reference is
made, the part of virtual address i.e., <process-id , page number> is presented in to memory sub-
system. The inverted page table is searched for a match. If a match is found at entry I then the
physical address <i , offset> is generated. If no match is found then an illegal address access has
been attempted. This scheme decreases the amount of memory needed to store each page table, it
increases the amount of time needed to search the table when a page reference occurs. If the whole
table is to be searched it takes too long.
Advantage:
Eliminates fragmentation.
Support high degree of multiprogramming.
Increases memory and processor utilization.
Compaction overhead required for the re-locatable partition scheme is also eliminated.
Disadvantage:
10
The valid-invalid bit scheme can be used to distinguish between the pages that are on the disk and
that are in memory.
o If the bit is valid then the page is both legal and is in memory.
o If the bit is invalid then either page is not valid or is valid but is currently on the disk.
Marking a page as invalid will have no effect if the processes never access to that page.
Suppose if it access the page which is marked invalid, causes a page fault trap. This may result in
failure of OS to bring the desired page in to memory.
The step for handling page fault is straight forward and is given below:
We check the internal table of the process to determine whether the reference made is valid or
invalid.
If invalid terminate the process,. If valid, then the page is not yet loaded and we now page it
in.
We find a free frame.
We schedule disk operation to read the desired page in to newly allocated frame.
When disk reed is complete, we modify the internal table kept with the process to indicate that
the page is now in memory.
We restart the instruction which was interrupted by illegal address trap. The process can
now access the page. In extreme cases, we start the process without pages in memory. When the
OS points to the instruction of process it generates a page fault. After this page is brought in to
memory the process continues to execute, faulting as necessary until every demand paging i.e., it
never brings the page in to memory until it is required.
Hardware support:
For demand paging the same hardware is required as paging and swapping.
Page table:-Has the ability to mark an entry invalid through valid-invalid bit.
Secondary memory:-This holds the pages that are not present in main memory.
Performance of demand paging: Demand paging can have significant effect on the
performance of the computer system.
Let P be the probability of the page fault (0<=P<=1)
Effective access time = (1-P) * ma + P * page fault. Where P = page fault and ma = memory
11
access time. Effective access time is directly proportional to page fault rate. It is important
to keep page fault rate low in demand paging.
Save the user registers and process state. Determine that the interrupt was a page fault. Checks
the page references were legal and determine the location of page on disk. Issue a read from disk
to a free frame.
If waiting, allocate the CPU to some other user. Interrupt from the disk. Save the registers
and process states of other users. Determine that the interrupt was from the disk. Correct the page
table and other table to show that the desired page is now in memory.
Segmentation:
o Segment may of different size.
o Segment can be shared.
o Allows for dynamic growth of segments.
o Segment map table indicate the address of each segment in memory.
o Segments are allocated to the program while compilation.
Demand Paging:
o Pages are of same size.
o Pages can‟t be shared.
o Page size is fixed.
. o Page table keeps track of pages in memory.
o Pages are allocated in memory on demand.
Copy-On-Write:
Demand paging is used when reading a file from disk in to memory. Fork () is used to create
a process and it initially bypass the demand paging using a technique called page sharing. Page
sharing provides rapid speed for process creation and reduces the number of pages allocated to the
newly created process. Copy-on-write technique initially allows the parent and the child to share
the same pages. These pages are marked as copy-on-write pages i.e., if either process writes to a
shared page, a copy of shared page is created.
Eg:-If a child process try to modify a page containing portions of the stack; the OS
recognizes them as a copy-on-write page and create a copy of this page and maps it on to the address
space of the child process. So the child process will modify its copied page and not the page
belonging to parent. The new pages are obtained from the pool of free pages.
Memory Mapping: Standard system calls i.e., open (), read () and write () is used for sequential
read of a file. Virtual memory is used for this. In memory mapping a file allows a part of the virtual
address space to be logically associated with a file. Memory mapping a file is possible by mapping
a disk block to page in memory.
12
Page Replacement
Demand paging shares the I/O by not loading the pages that are never used.
Demand paging also improves the degree of multiprogramming by allowing more process to
run at the sometime. Page replacement policy deals with the solution of pages in memory to be
replaced by a new page that must be brought in. When a user process is executing a page fault
occurs. The hardware traps to the operating system, which checks the internal table to see that this
is a page fault and not an illegal memory access. The operating system determines where the derived
page is residing on the disk, and this finds that are no free frames on the list of free frames.
When all the frames are in main memory, it is necessary to bring a new page to satisfy the
page fault, replacement policy is concerned with selecting a page currently in memory to be
replaced. The page i,e to be removed should be the page i,e least likely to be referenced in future.
3. Read the desired page into the free frame; change the page and frametables.
Restart the user process.
Victim Page
The page that is supported out of physical memory is called victim page. x If no frames are
free, the two page transforms come (out and one in) are read. This will see the effective access time.
Each page or frame may have a dirty (modify) bit associated with the hardware. The modify
bit for a page is set by the hardware whenever any word or byte in the page is written into, indicating
that the page has been modified.
When we select the page for replacement, we check its modify bit. If the bit is set, then the
page is modified since it was read from the disk.
If the bit was not set, the page has not been modified since it was read into memory.
Therefore, if the copy of the page has not been modified we can avoid writing the memory page to
the disk, if it is already there. Sum pages cannot be modified.
We must solve two major problems to implement demand paging: we must develop a frame
allocation algorithm and a page replacement algorithm. If we have multiple processors in memory,
we must decide how many frames to allocate and page replacement is needed.
13
PAGE REPLACEMENT ALGORITHMS:
FIFO Algorithm:
This is the simplest page replacement algorithm. A FIFO replacement algorithm associates
each page the time when that page was brought into memory.
When a Page is to be replaced the oldest one is selected.
We replace the queue at the head of the queue. When a page is brought into memory, we
insert it at the tail of the queue.
Example: Consider the following references string with frames initially empty.
The first three references (7,0,1) cases page faults and are brought into the empty frames. The next
references 2 replaces page 7 because the page 7 was brought in first. Since 0 is the next references
and 0 is already in memory e has no page faults. The next references 3 results in page 0 being
replaced so that the next references to 0 causer page fault. This will continue till the end of string.
There are 15 faults all together.
Belady’s Anamoly
For some page replacement algorithm, the page fault may increase as the number of
allocated frames increases. FIFO replacement algorithm may face this problem.
Optimal Algorithm
Optimal page replacement algorithm is mainly to solve the problem of Belady‟s Anamoly.
Optimal page replacement algorithm has the lowest page fault rate of all algorithms. An optimal
page replacement algorithm exists and has been called OPT. The working is simple “Replace the
page that will not be used for the longest period of time” Example: consider the following reference
strin
14
The first three references cause faults that fill the three empty frames. The references to page 2
replaces page 7, because 7 will not be used until reference 18. The page 0 will be used at 5 and page
1 at 14. With only 9 page faults, optimal replacement is much better than a FIFO, which had 15
faults. This algorithm is difficult t implement because it requires future knowledge of reference
strings.
Counters: In this we associate each page table entry a time -of -use field, and add to the cpu a
logical clock or counter. The clock is incremented for each memory reference. When a reference
to a page is made, the contents of the clock register are copied to the time-of-use field in the page
table entry for that page. In this way we have the time of last reference to each page we replace the
page with smallest time value. The time must also be maintained when page tables are changed.
Stack: Another approach to implement LRU replacement is to keep a stack of page numbers when
a page is referenced it is removed from the stack and put on to the top of stack. In this way the top
of stack is always the most recently used page and the bottom in least recently used page. Since the
entries are removed from the stack it is best implement by a doubly linked list. With a head and tail
pointer. Neither optimal replacement nor LRU replacement suffers from Belady‟s Anamoly. These
are called stack algorithms.
15
LRU Approximation
An LRU page replacement algorithm should update the page removal status information
after every page reference updating is done by software, cost increases.
But hardware LRU mechanism tend to degrade execution performance at the same time,
then substantially increases the cost. For this reason, simple and efficient algorithm that
approximation the LRU have been developed. With h/w support the reference bit was used. A
reference bit associate with each memory block and this bit automatically set to 1 by the h/w
whenever the page is referenced. The single reference bit per clock can be used to approximate
LRU removal. The page removal s/w periodically resets the reference bit to 0, write the execution
of the users job causes some reference bit to be set to 1. If the reference bit is 0 then the page has
not been referenced since the last time the reference bit was set to 0.
Allocation of Frames
The allocation policy in a virtual memory controls the operating system decision
regarding the amount of real memory to be allocated to each active process. In a paging system if
more real pages are allocated, it reduces the page fault frequency and improved turnaround
throughput. If too few pages are allocated to a process its page fault frequency and turnaround times
may deteriorate to unacceptable levels.
The minimum number of frames per process is defined by the architecture, and the
maximum number of frames. This scheme is called equal allocation. With multiple processes
competing for frames, we can classify page replacement into two broad categories
a) Local Replacement: requires that each process selects frames from only its own sets of allocated
frame.
b). Global Replacement: allows a process to select frame from the set of all frames. Even if the
frame is currently allocated to some other process, one process can take a frame fromanother.
In local replacement the number of frames allocated to a process do not change but with
global replacement number of frames allocated to a process do not change global replacement
results in greater system throughput.
16
Other consideration
There is much other consideration for the selection of a replacement algorithm and allocation
policy.
1) Preparing: This is an attempt to present high level of initial paging. This strategy is to bring
into memory all the pages at one time. 2) TLB Reach: The TLB reach refers to the amount of
memory accessible from the TLB and is simply the no of entries multiplied by page size.
Page Size: following parameters are considered a) page size us always power of 2 (from 512 to
16k) b) Internal fragmentation is reduced by a small page size. c) A large page size reduces the
number of pages needed.
Invented Page table: This will reduces the amount of primary memory i,e. needed to track virtual
to physical address translations. 5) Program Structure: Careful selection of data structure can
increases the locality and hence lowers the page fault rate and the number of pages in working
state.
Real time Processing: Real time system almost never has virtual memory. Virtual
memory is the antithesis of real time computing, because it can introduce unexpected long term
delay in the execution of a process.
Thrashing
If the number of frames allocated to a low-priority process falls below the minimum
number required by the computer architecture then we suspend the process execution. A process is
thrashing if it is spending more time in paging than executing.
If the processes do not have enough number of frames, it will quickly page fault. During
this it must replace some page that is not currently in use. Consequently it quickly faults again and
again. The process continues to fault, replacing pages for which it then faults and brings back. This
high paging activity is called thrashing. The phenomenon of excessively moving pages back and
forth b/w memory and secondary has been called thrashing.
Cause of Thrashing: Thrashing results in severe performance problem. The operating system
monitors the cpu utilization is low. We increase the degree of multi programming by introducing
new process to the system. A global page replacement algorithm replaces pages with no regards to
the process to which they belong. The figure shows the thrashing
As the degree of multi programming increases, more slowly until a maximum is reached. If the
degree of multi programming is increased further thrashing sets in and the cpu utilization drops
sharply.
17
At this point, to increases CPU utilization and stop thrashing, we must increase degree of multi
programming. We can limit the effect of thrashing by using a local replacement algorithm. To
prevent thrashing, we must provide a process as many frames as it needs.
Locality of Reference: As the process executes it moves from locality to locality. A locality is a set
of pages that are actively used. A program may consist of several different localities, which may
overlap. Locality is caused by loops in code that find to reference arrays and other data structures
by indices. The ordered list of page number accessed by a program is called reference string.
Locality is of two types
18
SOLVED PROBLEMS:
1. Least recently used (LRU) algorithm
2. First-In, First-out (FIFO) algorithm
PART- A QUESTIONS(2Marks):
UNIT-3
PART- A QUESTIONS(2Marks):
19
4. What is the basic function of paging?
Paging is a Memory-management scheme that permits the physical –address space of a process to
be Non-contiguous.
Swapping is a technique of temporarily removing inactive programs from the memory of the
system. A process can be swapped temporarily out of the memory to a backing store and then
brought back in to the memory for continuing the execution. This process is called swapping.
For example, in a multi-programming environment with a round robin CPU scheduling whenever
the time quantum expires then the process that has just finished is swapped out and a new process
swaps in to the memory for execution.
Internal Fragmentation there is wasted space internal to a portion due to the fact that block of data
loaded is smaller than the partition. Eg:-If there is a block of 50kb and if the process requests
40kb and if the block is allocated to the process then there will be 10kb of memory left.
External Fragmentation exists when there is enough memory space exists to satisfy the request,
but it not contiguous i.e., storage is fragmented in to large number of small holes. External
Fragmentation may be either minor or a major problem. One solution for over-coming external
fragmentation is compaction.
20
9. What is meant by Paging? Give its advantages.
Paging is a Memory-management scheme that permits the physical –address space of a process to
be Non-contiguous.
Advantages:
Avoids the considerable problem of fitting the varying -sized memory chunks onto the baking
store Fragmentation problems are also prevalent baking store, except that access is much slower,
so compaction is impossible.
Global Page Replacement allows a process to select a replacement frame from the set of all
frames, even if that frame is currently allocated to some other process.
Local Replacement requires that each process select from only its own set of allocated frames.
Here the number of frames allocated to a process doesn‟t change.
21