mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 14:54:05 -06:00
vault backup: 2022-11-01 13:49:33
This commit is contained in:
parent
63779b698a
commit
051ada1dad
@ -67,12 +67,39 @@ This means an extra step in the operating system’s page-servicing routine.
|
||||
|
||||
FIFO
|
||||
- replace the oldest page
|
||||
- 
|
||||
- pro
|
||||
- simple to understand/implement
|
||||
- con
|
||||
- maybe first page to be ref'd is often being referenced
|
||||
- belady's anomaly
|
||||
- belady's anomaly: possible to increase numbe of page faults when increasing the number of frames in memory
|
||||
|
||||
Optimal page replacement
|
||||
- replace the page that will not be used for the longest time
|
||||
- 
|
||||
- pro: optimal
|
||||
- con: can predict future
|
||||
|
||||
LRU (least recently used)
|
||||
- replace page than has not been used for the longest time
|
||||
- 
|
||||
- pro: optimal if you look back in time
|
||||
- con: time consuming to keep record of LRU
|
||||
- future memory references resemble past ones
|
||||
|
||||
# frame allocation
|
||||
how many frames to allocate to a process?
|
||||
|
||||
how to distribute frames among n processes in a multitasking scenario
|
||||
- equal allocation: all created equal: so each get equal number of frames
|
||||
- proportional allocation: allocate depending on size of process
|
||||
- local vs global replacement:
|
||||
- local: steal from your own frames
|
||||
- global: can steal from "victim" processes
|
||||
|
||||
# thrashing
|
||||
when a proces has too lttle frames it will have a lot of page faults.
|
||||
|
||||
a thrashing process spending more time paging than executing
|
||||
|
||||
the working set of a process is the number of pages a process needs in orde
|
||||
Loading…
Reference in New Issue
Block a user