1 Recitation #9, Section F, 15-213, Sp 06 Virtual memory Reminders: Quiz today: virtual memory Shell Lab due Thursday TA: Jernej Barbic Modified from:

Slides:



Advertisements
Similar presentations
C SINGH, JUNE 7-8, 2010IWW 2010, ISATANBUL, TURKEY Advanced Computers Architecture, UNIT 2 Advanced Computers Architecture Virtual Memory By Rohit Khokher.
Advertisements

Virtual Memory October 25, 2006 Topics Address spaces Motivations for virtual memory Address translation Accelerating translation with TLBs class16.ppt.
Malloc & VM By sseshadr. Agenda Administration – Process lab code will be inked by Thursday (pick up in ECE hub) – Malloc due soon (Thursday, November.
Carnegie Mellon 1 Virtual Memory: Concepts : Introduction to Computer Systems 15 th Lecture, Oct. 14, 2010 Instructors: Randy Bryant and Dave O’Hallaron.
CSE 490/590, Spring 2011 CSE 490/590 Computer Architecture Virtual Memory I Steve Ko Computer Sciences and Engineering University at Buffalo.
Virtual Memory Nov 27, 2007 Slide Source: Topics Motivations for VM Address translation Accelerating translation with TLBs class12.ppt.
Recitation 8 (Nov. 1) Outline Lab 5 hints Virtual Memory Reminder Shell Lab: Due THIS Thursday TA: Kun Gao Modified from Minglong Shao’s Recitation, Fall.
Virtual Memory. Why do we need VM? Program address space: 0 – 2^32 bytes –4GB of space Physical memory available –256MB or so Multiprogramming systems.
Recitation 7 Greg Reshko Office Hours: Wed 2:00-3:00PM March 31 st, 2003.
Virtual Memory October 29, 2007 Topics Address spaces Motivations for virtual memory Address translation Accelerating translation with TLBs class16.ppt.
©UCB CS 161 Ch 7: Memory Hierarchy LECTURE 24 Instructor: L.N. Bhuyan
Virtual Memory May 19, 2008 Topics Motivations for VM Address translation Accelerating translation with TLBs EECS213.
Carnegie Mellon 1 Virtual Memory / : Introduction to Computer Systems 10 th Recitation, October 29th, 2012 Grant Skudlarek Section G.
Recitation 9 (Nov. 8) Outline Virtual memory Lab 6 hints Reminders Lab 6: Get correctness points Exam 2: Nov. 16 (Next Tue) Minglong Shao
Carnegie Mellon 1 Virtual Memory: Concepts / : Introduction to Computer Systems 16 th Lecture, Oct. 21, 2014 Instructors: Greg Ganger, Greg.
CS 241 Section Week #12 (04/22/10).
Virtual Memory Topics Motivations for VM Address translation Accelerating translation with TLBs CS 105 “Tour of the Black Holes of Computing!”
CML CML CS 230: Computer Organization and Assembly Language Aviral Shrivastava Department of Computer Science and Engineering School of Computing and Informatics.
Computer Architecture Lecture 28 Fasih ur Rehman.
Virtual Memory: Concepts
Carnegie Mellon /18-243: Introduction to Computer Systems Instructors: Bill Nace and Gregory Kesden (c) All Rights Reserved. All work.
1 Seoul National University Virtual Memory: Systems.
1 Virtual Memory. 2 Outline Pentium/Linux Memory System Core i7 Suggested reading: 9.6, 9.7.
1 Virtual Memory: Concepts Andrew Case Slides adapted from Jinyang Li, Randy Bryant and Dave O’Hallaron.
Carnegie Mellon 1 Virtual Memory: Concepts Instructor: Rabi Mahapatra (TAMU) Slides: Randy Bryant and Dave O’Hallaron (CMU)
The Three C’s of Misses 7.5 Compulsory Misses The first time a memory location is accessed, it is always a miss Also known as cold-start misses Only way.
Pentium III Memory.
Virtual Memory. Virtual Memory: Topics Why virtual memory? Virtual to physical address translation Page Table Translation Lookaside Buffer (TLB)
Virtual Memory March 23, 2000 Topics Motivations for VM Address translation Accelerating address translation with TLBs Pentium II/III memory system
Malloc & VM By sseshadr. Agenda Administration – Process lab code will be inked by Thursday (pick up in ECE hub) – Malloc due soon (Thursday, November.
Virtual Memory April 3, 2001 Topics Motivations for VM Address translation Accelerating translation with TLBs class20.ppt.
University of Amsterdam Computer Systems – virtual memory Arnoud Visser 1 Computer Systems Virtual Memory.
Virtual Memory Additional Slides Slide Source: Topics Address translation Accelerating translation with TLBs class12.ppt.
Chapter 91 Logical Address in Paging  Page size always chosen as a power of 2.  Example: if 16 bit addresses are used and page size = 1K, we need 10.
4.3 Virtual Memory. Virtual memory  Want to run programs (code+stack+data) larger than available memory.  Overlays programmer divides program into pieces.
Virtual Memory.  Next in memory hierarchy  Motivations:  to remove programming burdens of a small, limited amount of main memory  to allow efficient.
Carnegie Mellon 1 Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Virtual Memory: Concepts Slides adapted from Bryant.
Carnegie Mellon 1 Bryant and O’Hallaron, Computer Systems: A Programmer’s Perspective, Third Edition Virtual Memory: Concepts CENG331 - Computer Organization.
Virtual Memory Topics Motivations for VM Address translation Accelerating translation with TLBs CS 105 “Tour of the Black Holes of Computing!”
Carnegie Mellon Introduction to Computer Systems / Spring 2009 March 23, 2009 Virtual Memory.
1 Virtual Memory. 2 Outline Virtual Space Address translation Accelerating translation –with a TLB –Multilevel page tables Different points of view Suggested.
University of Washington Indirection in Virtual Memory 1 Each process gets its own private virtual address space Solves the previous problems Physical.
Computer Architecture Recitation 3 Presenter: Kevin Chang Prof. Onur Mutlu Carnegie Mellon University Spring 2015, 3/16/2015.
Virtual Memory Samira Khan Apr 27, 2017.
Section 8 Address Translation March 10th, 2017 Taught by Joshua Don.
Virtual Memory Samira Khan Apr 25, 2017.
Lecture Topics: 11/19 Paging Page tables Memory protection, validation
Section 9: Virtual Memory (VM)
From Address Translation to Demand Paging
Section 9: Virtual Memory (VM)
Today How was the midterm review? Lab4 due today.
Virtual Memory III CSE 351 Spring 2017
CS 704 Advanced Computer Architecture
Virtual Memory.
Memory Hierarchy Virtual Memory, Address Translation
CSE 153 Design of Operating Systems Winter 2018
CS 105 “Tour of the Black Holes of Computing!”
Virtual Memory II CSE 351 Autumn 2016
CSE 153 Design of Operating Systems Winter 2018
Virtual Memory: Concepts /18-213/14-513/15-513: Introduction to Computer Systems 17th Lecture, October 23, 2018.
Virtual Memory S04, Recitation, Section A
Virtual Memory II CSE 410 Winter 2017
Page that info back into your memory!
Instructors: Majd Sakr and Khaled Harras
Virtual Memory.
Virtual Memory II CSE 351 Winter 2018
CSE 153 Design of Operating Systems Winter 2019
CSE 153 Design of Operating Systems Winter 2019
4.3 Virtual Memory.
Instructor: Phil Gibbons
Presentation transcript:

1 Recitation #9, Section F, , Sp 06 Virtual memory Reminders: Quiz today: virtual memory Shell Lab due Thursday TA: Jernej Barbic Modified from: Kun Gao’s and Minglong Shao’s recitations, Spring 2005, Fall 2004

2 Virtual memory One of the most important concepts in CS Benefits of virtual memory (VM): Use RAM as a cache for disk Easier memory management Simplifies linking and loading Access protection Share memory efficiently

3 Virtual memory CPU 0: 1: N-1: Memory 0: 1: P-1: Page Table Disk Virtual Addresses Physical Addresses Page hit: page is in memory Page fault: page is on disk Per Process:

4 Virtual and physical addresses virtual page number (VPN)page offset virtual address physical page number (PPN) page offset physical address 0p–1 address translation pm–1 n–1 0p–1p Virtual Memory: up to 2 n -1 bytes Physical Memory: up to 2 m -1 bytes

5 Page Table translates VPN to PPN Separate page table per each process VPN is the index into the page table

6 Translation Lookaside Buffer (TLB) Page table is in memory or even on disk (slow access) TLB keeps things manageable TLB Cache/Memory 1. VA4. PA MMU/ Translation 2. VPN3. PTE 5. Data CPU

7 TLB and the L1-Cache virtual address virtual page numberpage offset physical address n–10p–1p validphysical page numbertag validtagdata = cache hit tagbyte offset index = TLB hit TLB L1-Cache...

8 Worst case? (most delay)? TLB miss, page fault on page table, then page fault on memory read TLB Cache/Memory 1. VA 3. PTEA (PTBR + VPN) MMU/ Translation 2. VPN 6. Data CPU 4. PTE 5. PA DISK Page Fault/ Page Table Page Fault/ Mem Read

9 Example 20-bit virtual addresses 18-bit physical addresses Page size is 1024 bytes TLB is 2-way associative with 16 total entries

10 Part 1 A. Virtual address B. Physical address VPN VPO TLBTTLBI PPN PPO

11 Example: TLB and page table

12 Part 2 Virtual address 0x78E6 A. 078E6 = B. Address translation C. Physical address parameterValueParameterValue VPN0x01ETLB hit?N TLB Index0x6Page fault?N TLB Tag0x03PPN0x

13 Part 2 Virtual address 0x04AA4 A. 04AA4 = B. Address translation C. Physical address parameterValueParameterValue VPN0x012TLB hit?Y TLB Index0x2Page fault?N TLB Tag0x02PPN0x68

14 Further material Section : a concrete example Read carefully and solve practice problem 10.4