Memory management
OS responsibility for allocating, relocating, protecting and deallocating memory.
Paging
Memory divided into fixed-size pages and frames.
Page fault
Happens when a page is not in main memory and must be fetched from disk.
MMT
Memory Map Table; converts virtual addresses to physical addresses.
Thrashing
System constantly swaps pages instead of executing.
Bit map
Tracks free/used blocks using bits.
Linked list allocation
Keeps a list of memory blocks (holes/processes).
First Fit
Uses first hole that is large enough.
Next Fit
Continues scan from last allocation point.
Best Fit
Uses smallest hole that fits.
Worst Fit
Allocates from largest hole.
Quick Fit
Keeps separate lists of common block sizes.
External fragmentation
Wasted space between allocated blocks.
Internal fragmentation
Unused space inside allocated block.
Compaction
Shifts processes to remove fragmentation.
Swapping
Moving processes between RAM and disk.
Buddy system
Allocates blocks in powers of two.
Buddy splitting
Repeatedly split blocks until size fits.
Buddy merging
Only buddies of equal size can combine.
Segmentation
Process split into logical chunks (code, data, stack).
Paged virtual memory
Logical memory divided into pages mapped to frames.
Advantages of paging
No external fragmentation, supports large processes.
Disadvantages of paging
Overhead, thrashing possible.
FIFO paging
Oldest page replaced first.