VMLecture - Virtual Memory Virtual memory Build new...

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

View Full Document Right Arrow Icon
Virtual Memory
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 Virtual memory Build new hardware that automatically translates each memory reference from a virtual address (that the programmer sees as an array of bytes) to a physical address (that the hardware uses to either index DRAM or identify where the storage resides on disk)
Background image of page 2
3 Basics of Virtual memory Any time you see the word virtual in computer science/architecture it means “ using a level of indirection Virtual memory hardware changes the virtual address the programmer see into the physical ones the memory chips see. 0x800 Virtual address 0x3C00 Physical address Disk ID 803C4
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 Another View of the Memory Hierarchy Regs L2 Cache Memory Disk Tape Instr. Operands Blocks Pages Files Upper Level Lower Level Faster Larger Cache Blocks Thus far { { Next: Virtual Memory
Background image of page 4
5 Virtual Memory If Principle of Locality allows caches to offer (usually) speed of cache memory with size of DRAM memory, then recursively why not use at next level to give speed of DRAM memory, size of Disk memory? Called “ Virtual Memory Also allows OS to share memory, protect programs from each other Today, more important for protection vs. just another level of memory hierarchy Historically, it predates caches
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 Basic Issues in Virtual Memory System Design Size of information blocks that are transferred from secondary to main storage (M) Block of information brought into M, and M is full, then some region of M must be released to make room for the new block replacement policy which region of M is to hold the new block --> placement policy Paging Organization virtual and physical address space partitioned into blocks of equal size page frames pages pages reg cache mem disk frame
Background image of page 6
7 Virtual Memory View Virtual memory lets the programmer “see” a memory array larger than the DRAM available on a particular computer system. Virtual memory enables multiple programs to share the physical memory without: Knowing other programs exist. Worrying about one program modifying the data contents of another.
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 Managing virtual memory Managed by hardware logic and operating system software. Hardware for speed. Software for flexibility and because disk storage is controlled by the operating system.
Background image of page 8
9 Virtual to Physical Address Translation Each program operates in its own virtual address space; ~only program running Each is protected from the other OS can decide where each goes in memory Hardware (HW) provides virtual -> physical mapping virtual address (inst. fetch load, store) Program operates in its virtual address space HW mapping physical address (inst. fetch load, store) Physical memory (incl. caches)
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 Virtual Memory Treat main memory like a cache Misses go to the disk
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.

Page1 / 35

VMLecture - Virtual Memory Virtual memory Build new...

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