Operating Systems Memory Management
Lecture 9 Michael O’Boyle
1
Operating Systems Memory Management Lecture 9 Michael OBoyle 1 - - PowerPoint PPT Presentation
Operating Systems Memory Management Lecture 9 Michael OBoyle 1 Memory Management Background Logical/Virtual Address Space vs Physical Address Space Swapping Contiguous Memory Allocation Segmentation Goals and Tools
1
3
base memory trap to operating system monitor—addressing error address yes yes no no CPU base limit ≥ <
7
8
18
19
2K 6K 8K 12K physical memory
Logical address
base register
no
raise protection fault limit register
yes
20
21
physical memory
logical address
base register
limit register
raise protection fault
no yes
– Variable-partition sizes for efficiency (sized to a given process’ needs) – Hole – block of available memory; holes of various size are scattered throughout memory – When a process arrives, allocated memory from a hole large enough to accommodate it – Process exiting frees its partition, adjacent free partitions combined – Operating system maintains information about: a) allocated partitions b) free partitions (hole)
25
26
29
30
segment 0 segment 1 segment 2 segment 3 segment 4
physical memory segment #
virtual address
raise protection fault
no yes
base limit segment table
31