Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
5/4/12
Virtual Memory
Virtual Memory means the memory not in existence. Able to execute the program of capacity larger than the available main memory size. Allows the execution of process that may not be completely in memory. Allows to execute a program which is partially in memory.
5/4/12
(conti..)
Program generated addresses are
5/4/12
Page Replacement
This approach involves preempting a
region R occupied by block K and allocating it to incoming block K. The criteria used for selecting K as the block to be replaced constitute replacement policy.
Objective of choosing a replacement
multiprogramming.
5/4/12
Issues
When a page is to be removed from
memory?
Does it have to be one of the faulting
process?
Own pages or can it be a page
5/4/12
If we trace a particular process, we record address sequence: 0100,0432,0101,0612,0102,0611 This sequence is reduced to reference string
page replacement page replacement policy policy
1,4,1,6,1,6
5/4/12
5/4/12
OPT
Example:
5/4/12
OPT
Advantage:
5/4/12
with each page the time when that page was brought into memory.
The oldest page is chosen for
replacement.
When a page is brought in to memory
FIFO
Example:
5/4/12
FIFO
Advantages :
1.Easy to understand and program. 2.Page replaced that was used long time ago & is no longer needed.
Disadvantages:
5/4/12
LRU
Example:
5/4/12
LRU
Advantages :
1. Requires substantial hardware assistance. 2. Difficult to implement. 3. List must be updated on every page replacement policy 5/4/12 memory reference.
(modified)
When page fault occurs the OS
inspect all the pages & divide them page replacement policy 5/4/12 into 4 categories based on the value
NRU
Class 0: Not referenced, not modified. Class 1: Not Referenced, modified. Class 2: reference ,not modified. Class 3: referenced , modified
The NRU removes a page at random from the lowest numbered nonempty class.
page replacement policy 5/4/12
NRU
Advantages:
5/4/12
Summary
Algorithm Optimal NRU FIFO LRU Comment Not implementable Very crude approximation of LRU Might throw out important pages Excellent , but difficult to implement.
5/4/12
References
Operating System Concepts 7th ed
- Silberschatz Galvin
Operating Systems Design and
Implementation, 2Ed
- Tanenbaum, Andrew S.
www
5/4/12
Any Question ?
5/4/12
Thank you!
For Patient Listening
5/4/12