{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lec9VM_handout - Virtual Memory Topics Address spaces...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Virtual Memory Topics Address spaces Motivations for virtual memory Address translation Accelerating translation with TLBs
Image of page 1

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

View Full Document Right Arrow Icon
– 2 – 15-213, F’06 A System Using Physical Addressing Used by many digital signal processors and embedded Used by many digital signal processors and embedded microcontrollers in devices like phones and PDAs. microcontrollers in devices like phones and PDAs. 0: 1: M -1: Main memory Physical address (PA) CPU 2: 3: 4: 5: 6: 7: 4 Data word 8: ...
Image of page 2
– 3 – 15-213, F’06 A System Using Virtual Addressing One of the great ideas in computer science. Used by all One of the great ideas in computer science. Used by all modern desktop and laptop microprocessors. modern desktop and laptop microprocessors. MMU Physical address (PA) ... 0: 1: M-1: Main memory Virtual address (VA) CPU 2: 3: 4: 5: 6: 7: 4100 Data word 4 CPU chip Address translation
Image of page 3

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

View Full Document Right Arrow Icon
– 4 – 15-213, F’06 Address Spaces A linear address space is an ordered set of contiguous is an ordered set of contiguous nonnegative integer addresses: nonnegative integer addresses: {0, 1, 2, 3, … } {0, 1, 2, 3, … } A A virtual address space virtual address space is a set of N = 2 is a set of N = 2 n virtual addresses virtual addresses : {0, 1, 2, …, N-1} {0, 1, 2, …, N-1} A A physical address space physical address space is a set of M = 2 is a set of M = 2 m (for convenience) (for convenience) physical addresses : {0, 1, 2, …, M-1} {0, 1, 2, …, M-1} In a system based on virtual addressing, each byte of main memory has a virtual address memory has a virtual address and and a physical address. a physical address.
Image of page 4
– 5 – 15-213, F’06 Why Virtual Memory? (1) VM uses main memory efficiently Main memory is a cache for the contents of a virtual address space stored on disk. Keep only active areas of virtual address space in memory Transfer data back and forth as needed. (2) VM simplifies memory management Each process gets the same linear address space. (3) VM protects address spaces One process can’t interfere with another. Because they operate in different address spaces. User process cannot access privileged information Different sections of address spaces have different permissions.
Image of page 5

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

View Full Document Right Arrow Icon
– 6 – 15-213, F’06 Multi-Processing - no VM Program A begins Program A begins Program B begins Program B begins Prog A Prog B What happens if A wants more memory?
Image of page 6
– 7 – 15-213, F’06 Multi-Processing - no VM Program A begins Program A begins Program B begins Program B begins Program A ends Program A ends Program C ready Program C ready Prog B Prog C
Image of page 7

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

View Full Document Right Arrow Icon
– 8 – 15-213, F’06 Virtual Memory Use hard drive Use hard drive to store to store running programs and use running programs and use DRAM on demand DRAM on demand Allocate memory in pages Allocate memory in pages Provide protection by page Provide protection by page
Image of page 8
– 9 – 15-213, F’06 (1) VM as a Tool for Caching Virtual memory Virtual memory is an array of N contiguous bytes is an array of N contiguous bytes stored on disk.
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern