Memory Physical and Virtual Prof. Sirer CS 316 Cornell University
System Organization Recap We have covered the principles of processor design Can execute a program, efficiently We have covered the bare essentials of memory organization Can store program instructions and data Time to look at advanced issues and generalize our computer system Isolation Protection Virtualization
Processor & Memory Currently, the processor’s address lines are directly routed via the system bus to the memory banks Simple, fast What happens when the program issues a load or store to an invalid location? e.g. 0x000000000 ? uninitialized pointer 0x7fffffff Stack Processor Heap Data Text 0x1000 Memory
Physical Addressing Problems What happens when another program is executed concurrently on another processor? The addresses will conflict We could try to relocate the second program to another location Assuming there is one Introduces more problems! 0x7fffffff Stack Stack Heap Heap Data Data Text Text Processors 0x1000 Memory
Physical Addressing Problems What happens when another program is executed concurrently on another processor? The addresses will conflict We could try to relocate the second program to another location Assuming there is one Introduces more problems! Stack 0x7fffffff Stack Heap Data Text 0x4000 Heap Processors Data Text 0x1000 Memory
Protection Memory accesses can be confined with the aid of some simple hardware Segmented architectures Page tables Single-level Multi-level Inverted TLBs