In-class notes for 10/02/2020
CS 273 (OS), Fall 2020
Memory management overview
Swapping.
Exercise: with a 2GB memory, suppose
(Process) A/0.5GB starts ; B/0.3GB starts; C/1.2GB starts; D/0.28GB starts.
What might memory map look like? Any issues you see?
Hole management
Fragmentation: External vs internal.
E.g., bitmap hole management tradeoffs
Paging (virtual memory).
Idea: memory holds only those portions of a process that are currently being used
Virtual - "behaves as if"
Each process behaves as if it has a complete 32-bit (or 48-bit) memory space to use.
But all those processes share a physical memory address is probably far smaller than those combined virtual address spaces (or even one of them)
Each virtual address is translated into a physical address when that virtual address is needed by its process.
E.g., virtual address 0xABCDEF57 might be translated to physical address 0x108192057
Exercise: suppose 32-bit virtual addresses with 8-bit offsets, 1MB = 2^20 bytes physical main memory.
How many page frames?
What is a page-table history for accessing this sequence of hex addresses?
FFFF0001, FFFF0020, 0A0A0A0A, 0F111111, 3B000000, 31000000
______What if there were only 4 page frames? (run out of physical memory)
Terms; virtual address translation
Page replacement algorithms
TLB
< >