week 7 memory management Flashcards
describe memory management
Management of a limited resource:
(Memory hunger of applications increases with capacity!)
⇒ Sophisticated algorithms needed, together with support from
HW and from compiler and loader.
what is logical address
Key point: program’s view memory is set of memory cells starting
at addresss 0x0 and finishing at some value (logical address)
what is physical address
Hardware: have set of memory cells starting at address 0x0 and
finishing at some value (physical address)
goal of memory management
Want to be able to store memory of several programs in main memory at the same time
how can we manage memory
eed suitable mapping from logical addresses to physical addresses
what happens at compile time
absolute references are generated (eg MS-DOS .com-files)
what happens at load time
can be done by special program
what happens at execution time
needs HW support
what can we use to take address mapping one step further
dynamic linking
what is dynamic linking
use only one copy of system library
how does os help memory management
same code accessible to more than one process
why does swapping happen
memory demand is too high,
what happens in swapping
If memory demand is too high, memory of some processes is
transferred to disk
Usually combined with scheduling: low priority processes are
swapped out
Problems:
Big transfer time
What to do with pending I/O?
First point reason why swapping is not principal memory
management technique
what are problems with swapping
Big transfer time
What to do with pending I/O?
what is swapping usallu combined with
scheduling
is swapping a primary memory management technique
no -> seen as a last resort
wha is fragmentation caused by
swapping
what are the two types of fragmentation
internal and external
describe internal fragmentation
programs only a little smaller than hole ⇒ leftover too small to qualify as hole
describe external fragmentation
over time, many small holes appear in memory
what are the 4 strategies to choose holes in fragmentation
first fit
rotating first fit
best fit
buddy system
what is first fit
Start from beginning and use first available hole
what is rotating first fit
start after last assigned part of memory
what is best fit
find smallest usable space