What is swapping?
A memory management technique where a process is moved between main memory and backing store to free space.
Give an example of swapping.
When memory is full, the OS swaps out an inactive process to load a ready process.
Why must swapping avoid processes with pending I/O?
Because swapped-out processes may attempt to use invalid I/O addresses, causing errors.
What is internal fragmentation?
The wasted space that is within that already allocated space for one of the process.
What is external fragmentation?
Wasted space between allocated blocks because free memory is split into small pieces.
What is compaction?
A technique that reduces external fragmentation by relocating processes to make memory contiguous.
What is segmentation?
Memory management dividing logical memory into variable-sized segments, each with its own segment table entry.
What is paging?
Memory management dividing memory into fixed-size pages (logical) and frames (physical).
What is a frame?
A fixed-size block in physical memory used to store a page.
What is a page?
A fixed-size block of logical memory mapped to a frame.
Is paging subject to fragmentation?
Paging avoids external fragmentation but causes internal fragmentation in the last page.
What is a page table?
A table that maps logical pages to physical frames.
What is a TLB?
A fast associative cache storing recent page table entries to speed up address translation.
Why use a TLB?
To reduce memory access time by avoiding frequent page table lookups.
What is a TLB hit?
When the requested page number is found in the TLB, speeding up translation.
What is a TLB miss?
When the requested page is not in the TLB, requiring a page table lookup.
What happens on a TLB miss?
The OS accesses the page table, updates the TLB, and completes the access.
What is the base register used for?
To hold the starting physical address of a process’s memory region.
What is the limit register used for?
To specify the size of a process’s valid address range.
What happens if a memory access is outside base+limit?
A trap occurs and the OS terminates or handles the offending process.
Why do we need logical to physical address mapping?
To allow processes to use abstract logical addresses independent of physical memory layout.
What is the MMU?
The Memory Management Unit that translates logical addresses to physical addresses.
What is compile-time address binding?
Binding done at compilation; only works if the memory location is known and fixed.
What is load-time address binding?
Binding done when the program is loaded into memory, allowing relocation.