09+-+Virtual+Memory - CS 4290/6290 Virtual Memory and...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 4290/6290 Virtual Memory and Memory Protection
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 4290/6290 – Spring 2009 – Prof. Milos Prvulovic 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? 2
Background image of page 2
CS 4290/6290 – Spring 2009 – Prof. Milos Prvulovic Example 32-bit memory 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 Kernel Text Data Heap Stack 0-2GB 4GB A.K.A. Virtual Addresses 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 4290/6290 – Spring 2009 – Prof. Milos Prvulovic Really “Program’s View” Each program/process gets its own 4GB space Or much, much more with a 64-bit processor Kernel Text Data Heap Stack Kernel Text Data Heap Stack Kernel Text Data Heap Stack 4
Background image of page 4
CS 4290/6290 – Spring 2009 – Prof. Milos Prvulovic At some point, the CPU is going to have to load- from/store-to memory… all it knows is the real, A.K.A. physical memory … which unfortunately is often < 4GB … and is almost never 4GB per process … and is never 16 exabytes per process 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 4290/6290 – Spring 2009 – Prof. Milos Prvulovic Memory is divided into pages , which are nothing more than fixed sized and aligned regions of memory Typical size: 4KB/page (but not always) 0-4095 4096-8191 8192-12287 12288-16383 Page 0 Page 1 Page 2 Page 3 6
Background image of page 6
CS 4290/6290 – Spring 2009 – Prof. Milos Prvulovic Map from virtual addresses to physical locations 0K 4K 8K 12K Virtual Addresses 0K 4K 8K 12K 16K 20K 24K 28K Physical Addresses “Physical Location” may include hard-disk Page Table implements this V P mapping Entry includes Entry includes permissions permissions (e.g., read- (e.g., read- only) only) 7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 4290/6290 – Spring 2009 – Prof. Milos  Page Tables 0K 4K 8K 12K 0K 4K 8K 12K 16K 20K 24K 28K 0K 4K 8K 12K Physical Memory 8
Background image of page 8
CS 4290/6290 – Spring 2009 – Prof. Milos  Need for Translation Virtual Address Virtual Page Number Page Offset Page Table Main Main Memory Memory Physical Address 0x FC519 08B 0x 00152 0x FC519 0x 00152 08B 9
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 4290/6290 – Spring 2009 – Prof. Milos Prvulovic
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/12/2010 for the course CS 6290 taught by Professor Staff during the Spring '08 term at Georgia Institute of Technology.

Page1 / 27

09+-+Virtual+Memory - CS 4290/6290 Virtual Memory and...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online