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? 0x7fffffff Stack Processor Heap Data 0x1000 Text e.g. 0x000000000 ? uninitialized pointer Memory Physical Addressing Problems What happens when another program is executed concurrently on another processor? 0x7fffffff Stack Stack The addresses will conflict Heap Heap We could try to relocate the second program to another location Assuming there is one Introduces more problems! Data Data Processors 0x1000 Text Text Memory Physical Addressing Problems What happens when another program is executed concurrently on another processor? Stack 0x7fffffff Stack Heap The addresses will conflict Data We could try to relocate the second program to another location Assuming there is one Introduces more problems! 0x4000 Text Heap Processors Data 0x1000 Text Memory Protection Memory accesses can be confined with the aid of some simple hardware Segmented architectures Page tables Single-level Multi-level Inverted TLBs