11/14/05 ELEC6200-001 1 Virtual Memory -Neha Jain -Neha Jain.

Slides:



Advertisements
Similar presentations
Virtual Memory In this lecture, slides from lecture 16 from the course Computer Architecture ECE 201 by Professor Mike Schulte are used with permission.
Advertisements

1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Oct. 23, 2002 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Virtual Memory main memory can act as a cache for secondary storage motivation: Allow programs to use more memory that there is available transparent to.
CMPE 421 Parallel Computer Architecture MEMORY SYSTEM.
CSIE30300 Computer Architecture Unit 10: Virtual Memory Hsin-Chou Chi [Adapted from material by and
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
CSCE 212 Chapter 7 Memory Hierarchy Instructor: Jason D. Bakos.
1 Lecture 20 – Caching and Virtual Memory  2004 Morgan Kaufmann Publishers Lecture 20 Caches and Virtual Memory.
S.1 Review: The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
Recap. The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of the.
1 Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Oct 31, 2005 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon., Nov. 3, 2003 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
The Memory Hierarchy II CPSC 321 Andreas Klappenecker.
ECE 232 L27.Virtual.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 27 Virtual.
Memory Organization.
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
Virtual Memory Deung young, Moon ELEC 5200/6200 Computer Architecture and Design Lectured by Dr. V. Agrawal Lectured by Dr. V.
1  2004 Morgan Kaufmann Publishers Chapter Seven.
1 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value is stored as a charge.
Virtual Memory Topics Virtual Memory Access Page Table, TLB Programming for locality Memory Mountain Revisited.
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
1 CSE SUNY New Paltz Chapter Seven Exploiting Memory Hierarchy.
Virtual Memory By: Dinouje Fahih. Definition of Virtual Memory Virtual memory is a concept that, allows a computer and its operating system, to use a.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Seoul National University
Memory/Storage Architecture Lab 1 Virtualization History of Computing = History of Virtualization  e.g., process abstraction, virtual memory, cache memory,
1 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 10 Memory Hierarchy.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
1 Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: –illusion of having more physical memory –program relocation.
Virtual Memory. Virtual Memory: Topics Why virtual memory? Virtual to physical address translation Page Table Translation Lookaside Buffer (TLB)
Virtual Memory Additional Slides Slide Source: Topics Address translation Accelerating translation with TLBs class12.ppt.
Introduction to Virtual Memory and Memory Management
Operating Systems Unit 7: – Virtual Memory organization Operating Systems.
Paging (continued) & Caching CS-3013 A-term Paging (continued) & Caching CS-3013 Operating Systems A-term 2008 (Slides include materials from Modern.
4.3 Virtual Memory. Virtual memory  Want to run programs (code+stack+data) larger than available memory.  Overlays programmer divides program into pieces.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
1 Chapter Seven CACHE MEMORY AND VIRTUAL MEMORY. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4.
1  2004 Morgan Kaufmann Publishers Chapter Seven Memory Hierarchy-3 by Patterson.
Memory Hierarchy How to improve memory access. Outline Locality Structure of memory hierarchy Cache Virtual memory.
Virtual Memory Ch. 8 & 9 Silberschatz Operating Systems Book.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
1  1998 Morgan Kaufmann Publishers Chapter Seven.
1  2004 Morgan Kaufmann Publishers Locality A principle that makes having a memory hierarchy a good idea If an item is referenced, temporal locality:
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Summary of caches: The Principle of Locality: –Program likely to access a relatively small portion of the address space at any instant of time. Temporal.
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
Memory Management memory hierarchy programs exhibit locality of reference - non-uniform reference patterns temporal locality - a program that references.
Chapter 9 Memory Organization. 9.1 Hierarchical Memory Systems Figure 9.1.
COSC3330 Computer Architecture
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Chapter 2 Memory and process management
Memory COMPUTER ARCHITECTURE
CS352H: Computer Systems Architecture
Section 9: Virtual Memory (VM)
CS 704 Advanced Computer Architecture
Seoul National University
10/16: Lecture Topics Memory problem Memory Solution: Caches Locality
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Contents Memory types & memory hierarchy Virtual memory (VM)
Chapter Five Large and Fast: Exploiting Memory Hierarchy
4.3 Virtual Memory.
Presentation transcript:

11/14/05 ELEC Virtual Memory -Neha Jain -Neha Jain

211/14/05ELEC Topics Covered Introduction Virtual Memory Address Translation Thrashing and Protection References

311/14/05ELEC Introduction Memory Hierarchy Functional units Registers Internal cache External Cache Main Memory Secondary Memory (Disk) Memory Content: Cache  Main Mem  Secondary Mem CPU Memory Parameters: Access Time: increase with distance from CPU Cost/Bit: decrease with distance from CPU Capacity: increase with distance from CPU Cache : use SRAM (faster and costly) Main Memory : use DRAM (slower and cheap)

411/14/05ELEC Principle of Locality Temporal Locality : Item tend to be referenced again soon Spatial Locality : Nearby items tend to be referenced again soon Cache Memory Cache Memory -Takes advantage of principle of locality

511/14/05ELEC Virtual Memory A technique that uses main memory as a “cache” for secondary storage Basic Terminology Page : Fixed number of bytes recognized by operating system Page : Fixed number of bytes recognized by operating system Page Fault : Occurs when accessed page is not in main memory Page Fault : Occurs when accessed page is not in main memory Physical Address : Address in main memory Physical Address : Address in main memory Virtual Address: Addresses that application programmers deal with and are translated by MMU to physical address Virtual Address: Addresses that application programmers deal with and are translated by MMU to physical address

611/14/05ELEC Processor Cache MMU: Memory management unit Physical address Main memory Data Virtual Address Physical address Virtual Page NumberPage Offset …………… ………….…….…2 1 0 Physical page numberPage Offset …………………… ………….…….…2 1 0 Translation Virtual Address Physical Address

711/14/05ELEC Segmented Memory S1 S2 S3 S4 S1 S3 free Memory Management Unit (MMU) Segment Table x x free Physical Memory

811/14/05ELEC Mapping Segmented Address + Segment #Displacement Virtual Address V prot limit base Segment Table Physical Memory datum Physical address Protection Compare segment Limit to displacement Segment# : specifies which segment to use( base address and length) Displacement : offset from base address for actual memory access

911/14/05ELEC Page table for address translation Virtual page number Disk storage Valid

1011/14/05ELEC Page Tables The page table,PC and registers specifies the state or process of a program Swap Space : Space on hard disk for all the pages of a process

1111/14/05ELEC Making Address Translation Fast By Translation-lookaside Buffer

1211/14/05ELEC TLBs and Caches

1311/14/05ELEC Who handles page faults? Operating System (in system software) - Look up page table - Look up page table - Choose a physical page to replace - Choose a physical page to replace - Bring referenced page from disk into - Bring referenced page from disk into chosen physical page chosen physical page

1411/14/05ELEC Thrashing is a disaster and it occurs when program does not follow locality principle and continuously swaps pages from main memory to disk Protection Protection -One of the way is by having different physical addresses for a same virtual address

1511/14/05ELEC References courses/elec5200_6200/ courses/elec5200_6200/ /E5200/course.html /E5200/course.html TML/MemoryArchitecturea3.html