vault backup: 2022-11-01 13:49:33

This commit is contained in:
Jet Hughes 2022-11-01 13:49:33 +13:00
parent 63779b698a
commit 051ada1dad

View File

@ -67,12 +67,39 @@ This means an extra step in the operating systems page-servicing routine.
FIFO
- replace the oldest page
- ![example](https://i.imgur.com/EM09dtl.png)
- 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
- ![example](https://i.imgur.com/RiNi1JI.png)
- pro: optimal
- con: can predict future
LRU (least recently used)
- replace page than has not been used for the longest time
- ![example](https://i.imgur.com/VpMGeXY.png)
- 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