Ch8 Kai
Chapter 8: Memory Management Strategies
8.1 Background
Programs must be loaded into memory from disk to run.
Main Memory: Physical memory where active processes reside (RAM).
Memory management optimizes allocation during computation.
Protection ensures correct operation and prevents unauthorized access.
8.2 Swapping
Temporarily moves processes out of memory to a backing store for efficient memory usage.
Process contexts can exceed available physical memory.
Major part of swap time involves transfer to/from backing store.
Swap mechanisms should manage pending I/O effectively.
8.3 Contiguous Memory Allocation
Memory split into partitions for operating system and user processes.
Processes require contiguous memory allocation.
Fixed partitions limit multiprogramming due to fixed size.
Dynamic or variable partitioning improves efficiency but can lead to fragmentation.
8.4 Segmentation
Non-contiguous partitioning method aligning with program logical structure.
Segments correspond to logical units (e.g., functions, arrays).
Requires hardware support to maintain segment tables for offsets.
8.5 Paging
Divides physical memory into fixed-size blocks (frames) and logical memory into pages.
Simplifies memory allocation while avoiding external fragmentation but may cause internal fragmentation due to variable usage.
Uses page tables for mapping logical to physical addresses.
Can lead to increased overhead but supports non-contiguous memory allocation.