tailieunhanh - CS6290 Memory

CS6290 Memory Views of Memory, Programmer’s View, CPU’s View, Need for Translation, Simple Page Table, Multi-Level Page Tables, Choosing a Page Size, CPU Memory Access, Translation Cache, PAPT Cache. | CS6290 Memory Views of Memory • Real machines have limited amounts of memory – 640KB? A few GB? – (This laptop = 2GB) • Programmer doesn’t want to be bothered – Do you think, “oh, this computer only has 128MB so I’ll write my code this way ” – What happens if you run on a different machine? Programmer’s View • Example 32-bit memory Kernel 0-2GB – When programming, you don’t care about how much real memory there is – Even if you use a lot, memory can always be paged to disk Text Data Heap Stack AKA Virtual Addresses 4GB Programmer’s View • Really “Program’s View” • Each program/process gets its own 4GB space Kernel Kernel Text Data Text Data Heap Kernel Heap Stack Text Data Heap Stack Stack CPU’s View • At some point, the CPU is going to have to load-from/store-to memory all it knows is the real, . physical memory • which unfortunately is often < 4GB • and is never 4GB per .