W8 - Virtual Memory (2) Flashcards
What are the two policies required for fetch policy?
1) demand paging
2) prepaging
What actions are taken when page fault occurs?
1) find free frame
2) swap page into memory frame via scheduled disk operation
3) reset tables to indicate page now in memory
4) restart instruction that caused the page fault
Describe demand paging.
Only brings pages into main memory when a reference is made to a location on the page.
Starts process with no pages in memory
Describe prepaging.
Pages other than the one demanded by a page fault are brought in.
If pages of a process are stored contiguously in secondary memory it is more efficient to bring in a number of pages at one time
INEFFICIENT if extra pages are not referenced
Describe placement policy.
Important in segmentation system.
Determines where real memory a process piece is to reside.
Describe replacement policy.
When all of the frames in main memory are occupied new pages are brought in. Replacement policy determines which page currently in memory is to be replaced: page least likely to be referenced in future.
Briefly explain the basic process to page replacement
Page replacement based on clock algorithm.
1) Use modify bit to reduce overhead of page transfers
2) Locate desired page on disk
3) Find free frame
4) Bring desired page into free frame
5) Restart instruction that caused trap
What is frame locking?
When a frame is locked the page currently stored in that frame may not be replaced
Name three basic replacement algorithms.
Optimal
Least recently used (LRU)
Clock
First-In-First-Out (FIFO)
Explain the Least Recently Used (LRU).
Replaces the page that has not been referenced for the longest time
CON - difficult to implement due to high overhead requirement
Explain FIFO as a replacement algorithm.
Treats page frames allocated to a process as a circular buffer.
Pages removed in RR style
IMPORTANT: Pages that have been in memory the longest is replaced
Explain the Clock policy.
Each page has a ‘use bit’
If it is 0 replace it
If it is 1 give it a second chance
Explain Enhanced Clock policy.
Take ordered pair (use, modify). (0,0) neither used, neither modified (0,1) neither used, but modified (1,0) used, but not modified (1,1) use and modified
What is page buffering?
Keeps a small number of frames free at all time.
Required when a page fault occurs. Page is brought into memory, read into one unmodified free frame list to start process
Resident Set Management Summary.
Check printed document.