L10-1 - ELEC152 Computer Organization Lecture 10 10 Virtual...

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

View Full Document Right Arrow Icon
ELEC152 Computer Organization Lecture 10: Virtual Memory rofessor George Yuan Professor George Yuan Office: Rm. 2527 Email:[email protected]
Background image of page 1

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

View Full DocumentRight Arrow Icon
Recall: Levels of the Memory Hierarchy Capacity Access Time Cost Staging Xfer Unit Upper Level faster CPU Registers 100s Bytes <1-5 ns Registers Instr. Operands prog./compiler 1-8 bytes Cache K Bytes 5-10 ns $.01-.001/bit Cache locks y cache cntl Main Memory M Bytes 10ns-100ns Memory Blocks 8-128 bytes $.01-.001 Disk G Bytes s Disk Pages OS 512-4K bytes ms 10 - 10 cents -3 -4 Tape finite Files user/operator Mbytes Larger ELEC152 Computer Organization Spring 2009 Page 2 infinite sec-min 10 -6 Lower Level
Background image of page 2
Motivations Sharing/Protection of memory among programs: Process: (active, inactive) State of a program: Page table, program counter, registers Page table: process’s address space (data memory it can access) A process s address space (data memory it can access) Page table register: points to the page table of the active process Allowing a program to exceed the size of the main memory ELEC152 Computer Organization Spring 2009 Page 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
Virtual Memory Main memory can act as a cache for the secondary storage (disk) Terminology: Page in virtual memory (cf. block in cache) Address translation Page fault in virtual memory (cf. miss in cache) Processor generates virtual addresses hile the memory is accessed using while the memory is accessed using physical address. Sharing of physical pages is necessary. Advantages: illusion of having more physical memory program relocation rotection ELEC152 Computer Organization Spring 2009 Page 4 protection
Background image of page 4
Pages: virtual memory blocks Page faults: the data is not in memory, retrieve it from disk huge miss penalty, thus pages should be fairly large (e.g., 4KB) reducing page faults is important (LRU is worth the price) can handle the faults in software instead of hardware using write-through is too expensive so we use writeback 3 2 1 0 11 10 9 8 15 14 13 12 31 30 29 28 27 Virtual address Page offset Virtual page number 3 2 1 0 11 10 9 8 15 14 13 12 29 28 27
Background image of page 5

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

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

This note was uploaded on 01/28/2011 for the course ELEC 152 taught by Professor Chan during the Fall '09 term at HKUST.

Page1 / 17

L10-1 - ELEC152 Computer Organization Lecture 10 10 Virtual...

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

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