Lec9VM_handout

Lec9VM_handout - Virtual Memory Topics Address spaces...

Info iconThis 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
Background image of page 1

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

View Full DocumentRight 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: ...
Background 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
Background image of page 3

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

View Full DocumentRight 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.
Background 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.
Background image of page 5

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

View Full DocumentRight 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?
Background 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
Background image of page 7

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

View Full DocumentRight 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
Background 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.
Background image of page 9

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

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

This note was uploaded on 12/27/2011 for the course CMPSC 154 taught by Professor Franklin during the Fall '09 term at UCSB.

Page1 / 49

Lec9VM_handout - Virtual Memory Topics Address spaces...

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

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