Lazy Allocation, Demand Paging, And Overcommit¶
Lazy Allocation, And Overcommit¶
|
Memory Access, And Allocation¶
|
Finish: Setup Mapping, Kick Process Loose¶
|
Further Notes: TLB Misses, Memory Performance¶
TLB misses not only occur when a mapping is unpopulated
TLB thrashing
TLB is of limited size ⟶ cannot contain all possible address mappings of a process
⟶ Needs occasional updates from OS’s page tables
Programmer’s responsibility (see Optimizations: Memory Optimizations)
Paging/swapping
The OS might have paged out memory to swap (running low on total memory?)
Technically, mapping is not unpopulated
Effect is even worse: guaranteed disk IO
Further Notes: Realtime¶
Allocation may suspend a process in critical situations
⟶ Lazy allocation is not generally wanted in realtime situations
Allocations must be done up-front
Not all allocations are explicit
Program itself is loaded on-demand ⟶ bad luck if a new code branch is taken at the wrong time
Stack memory is dynamically allocated
Global are lazy-loaded too
…