VM Flashcards
issues with sharing pmem
protection, transparency, resource exhaustion
protection
prevent processes from observing other process’ memory
e.g. bug in one process should not affect another
transparency
a process should not require particular physical addresses
but we often need contiguous addresses
resource exhaustion
programmers typically assume the system has enough memory
the sum of all processes is usually greater than pmem
MMU jobs
- translate virtual to physical
- enforce memory protection
- allow programs to see more memory than exists
load-time linking idea
determine where a process will reside in memory and adjust all references within the program
problems with load-time linking
how to protect?
how to relocate?
what if no contiguous free region?
base/bound idea
easy relocation by changing base
must save/restore base/bound on context switches
advantages of base/bound
inexpensive in hardware
inexpensive in cycles
disadvantages of base/bound
growing a process is expensive/impossible
no way to share code/data
segmentation idea
let processes have many base/bounds
segmentation advantages
allows multiple segments per process
allows sharing of code/data
don’t need entire process in memory
disadvantages of segmentation
requires address translation hardware, limits performance
segments not completely transparent e.g. default segment faster
n byte segment needs b contiguous bytes of pmem
fragmentation
hardware lookup algorithm
KMPVRN
paging tradeoffs
eliminates external fragmentation
simplifies allocation, free, and backing storage
avg internal frag of 0.5 pages per “segment”