Lecture 19: Survey of Modern VMs + a Decomposition of Meltdown. James C. Hoe Department of ECE Carnegie Mellon University

Size: px
Start display at page:

Download "Lecture 19: Survey of Modern VMs + a Decomposition of Meltdown. James C. Hoe Department of ECE Carnegie Mellon University"

Transcription

1 Lecture 19: Survey of Modern VMs + a Decomposition of Meltdown James C. Hoe Department of ECE Carnegie Mellon University S18 L19 S1, James C. Hoe, CMU/ECE/CALCM, 2018

2 Housekeeping Your goal today see the many realizations of VM, focusing on deviation from textbook conceptual norms put everything you learned together in Meltdown Notices Midterm 4/9 in class; covers Lectures 10~19 HW 4, due on Friday Lab 4, status check next week Prof. Ghose will give ILP lecture on Thursday Readings start on P&H Ch S18 L19 S2, James C. Hoe, CMU/ECE/CALCM, 2018

3 EA, VA and PA (IBM Power view) 64 bit EA 0 divided into X fixed size segments 40~50 bit PA divided into W pages (Z>>W) 64 bit EA 1 divided into X fixed size segments segmented EA: private, contiguous + sharing S18 L19 S3, James C. Hoe, CMU/ECE/CALCM, ~90 bit VA divided into Y segments (Y>>X); also divided as Z pages (Z>Y) swap disk divided into V pages (Z>>V, V>W) demand paged VA: size of swap, speed of DRAM

4 EA, VA and PA (almost everyone else) EA 0 with unique ASID=0 PA divided into W pages (Z>>W) EA i with unique ASID=i swap disk divided into V pages (Z>>V, V>>W) S18 L19 S4, James C. Hoe, CMU/ECE/CALCM, 2018 VA divided into N address spaces indexed by ASID; also divided as Z pages (Z>>N) how do processes share pages?

5 B. Jacob and T. Mudge, Virtual Memory in Contemporary Processors, IEEE Micro, S18 L19 S5, James C. Hoe, CMU/ECE/CALCM, 2018

6 SPARC V9 PTE/TLB Entry 64 bit VA + context ID implementation can choose not to map high order bits (require sign extension in unmapped bits) e.g., UltraSPARC 1 maps only lower 44 bits PA space size set by implementation 64 entry fully associative I TLB and D TLB g context 13 VA<63:13> 51 Tag 64 v size nfo IE Soft diag PA<40:13> Soft L CP CV e p w g PTE 64 Details fixed and exposed by privileged ISA S18 L19 S6, James C. Hoe, CMU/ECE/CALCM, 2018

7 context S18 L19 S7, James C. Hoe, CMU/ECE/CALCM, 2018 SPARC TLB Miss Handling 32 bit V8 used a 3 level hierarchical page table for HW MMU page table walk context table descriptors +VA [31:24] L1 Table: L2 Table: 256 +VA [23:18] 64 +VA [17:12] descriptors (1024 byte) descriptors (256 byte) 64 bit V9 switched to Translation Storage Buffer a software managed, direct mapped cache of PTEs (think hashed page table) HW assisted address generation on a TLB miss TLB miss handler (SW) searches TSB. If TSB misses, a slower TSB miss handler takes over OS can use any page table structure after TSB L3 Table: 64 PTEs (256 byte)

8 IBM PowerPC (32 bit) segments 256MB regions seg# 4 seg offset 16 page offset 12 EA entry segment table Protection seg ID 24 seg offset 16 page offset 12 VA way ITLB and DTLB VM+paging S18 L19 S8, James C. Hoe, CMU/ECE/CALCM, 2018 PPN 20 page offset 12 PA bit PowerPC = 64 bit EA > 80 bit VA 64 bit PA How many segments in 64 bit EA?

9 IBM PowerPC Hashed Page Table VPN 40 hash function Hashed Page Table table base + HW table walk VPN hashes into a PTE group (PTEG) of 8 8 PTEs searched sequentially for tag match if not found in first PTEG search a second PTEG if not found in 2 nd PTEG, trap to software handler Hashed table structure also used for 64 bit EA VA S18 L19 S9, James C. Hoe, CMU/ECE/CALCM, PTE s per group (recommend at least N PTEG s for a system with 2N physical pages)

10 64 bit VA MIPS R10K top 2 bits set kernel/supervisor/user mode additional bits set cache and translation behavior bit not translate at all (holes and repeats in the VA??) 8 bit ASID (address space ID) distinguishes between processes 40 bit PA Translation 64 bit VA and 8 bit ASID 40 bit PA 1 GB mapped (kseg) 0.5 GB unmapped uncached 0.5 GB unmapped cached bottom 2 GB mapped (normal) simplified example from 32 bit VA in R2000/ S18 L19 S10, James C. Hoe, CMU/ECE/CALCM, 2018

11 MIPS TLB 64 entry fully associative unified TLB Each entry maps 2 consecutive VPNs to independent respective PPNs Software TLB miss handling (exotic at the time) 7 instruction page table walk in the best case TLB Write Random: chooses a random entry for TLB replacement OS can exclude low TLB entries from replacement (some translations must not miss) TLB entry N: noncacheable D: dirty (write enable!!) V: valid G: ignore ASID S18 L19 S11, James C. Hoe, CMU/ECE/CALCM, 2018 VPN 20 ASID PPN 20 ndvg 0 8

12 MIPS Bottom Up Hierarchical Table TLB miss vectors to a SW handler page table organization is not hardcoded in ISA ISA favors a chosen reference page table scheme by providing optional hardware assistance Bottom Up Table start with 2 level hierarchical table (32 bit case) allocate all L2 tables for all VA pages (empty or not) linearly in the mapped kseg space VPN is index into this linear table in VA This table scales with VA size!! Is this okay? S18 L19 S12, James C. Hoe, CMU/ECE/CALCM, 2018

13 Bottom Up Table Walk VPN PO VA on TLB Miss, trap PTEBase mem load VPN 0s whose address VA of PTE space? (generated automatically by HW after TLB miss) PPN status PTE loaded from mem Can this load miss in the TLB? What happens if it misses? S18 L19 S13, James C. Hoe, CMU/ECE/CALCM, 2018 notice translation also eats up TLB entries!

14 User TLB Miss Handling mfc0 k0,tlbcxt mfc0 k1,epc lw k0,0(k0) mtc0 k0,entry_lo tlbwr j k1 rfe # move the contents of TLB # context register into k0 # move PC of faulting memory # instruction into k1 # load thru address that was # in TLB context register # move the loaded value (a PTE) # into the EntryLo register # write PTE into the TLB # at a random slot number # jump to PC of faulting # load instruction to retry # restore priviledge (in delay slot) S18 L19 S14, James C. Hoe, CMU/ECE/CALCM, 2018

15 S18 L19 S15, James C. Hoe, CMU/ECE/CALCM, 2018 HP PA RISC: PID and AID 2 level: 64b EA 96b VA (global) 64b PA Variable sized segmented EA VA translation Rights based access control user controls segment registers (user can generate any VA it wants!!) in contrast, everyone else controls translation to control what VA can be reached from a process each virtual page has an access ID (AID) assigned by OS each process has 8 active protection IDs (PIDs) in privileged HW registers controlled by OS a process can access a page only if one of the 8 PIDs matches the page s AID

16 Intel Two level address translation: segmented EA global VA PA User private 48 bit EA 16 bit SN (implicit) + 32 bit SO 6 user controlled registers hold active SNs; selected according to usage: code, data, stack, etc Global 32 bit VA 20 bit VPN + 12 bit PO An implementation defined paged PA space What is very odd about this? S18 L19 S16, James C. Hoe, CMU/ECE/CALCM, 2018

17 Living with the mistake 32 bit global VA too small to share by processes per process EA space oddly bigger than VA space until 1990, no one cared DOS and Windows Later multitasking OS ignore segment protection time multiplex **global** VA space for use by 1 process at a time code, data, stack segments always map to entire VA space, 0~(2 32 1) set MMU to use a different table on context switch BUT! TLB for VA translation doesn t have ASID; must flush TLB on context switch Later IA32e added PCID to TLB as fix S18 L19 S17, James C. Hoe, CMU/ECE/CALCM, 2018

18 Meltdown in Terms How to know the value at a memory location without permission? S18 L19 S18, James C. Hoe, CMU/ECE/CALCM, 2018

19 VA to PA Translation Flow Chart EA TLB lookup ISA says can't read without permission no hit yes 10~100 pclk PT walk page in DRAM found page on disk page fault update TLB demand paging 10 msec don t exist seg fault now what? no protection violation protection check okay yes PA to cache S18 L19 S19, James C. Hoe, CMU/ECE/CALCM, 2018

20 How should VM and Cache Interact? CPU CPU CPU physical TLB cache lower hier. VA PA S18 L19 S20, James C. Hoe, CMU/ECE/CALCM, 2018 virtual cache VA hybrid?? cache TLB VA PA TLB Actually you can read PA without permission; ISA (as an lower abstraction) lower only care you hier. can t hier. see the read value Only a question for L1 caches

21 Flushing a Pipeline privileged mode t 0 t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 t 9 t 10 IF I 0 I 1 I 2 I 3 I 4 bub bub bub I h I h+1 I h+2 ID I 0 I 1 I 2 I 3 bub bub bub bub I h I h+1 EX S18 L19 S21, James C. Hoe, CMU/ECE/CALCM, 2018 I 0 I 1 I 2 I 3 bub bub bub bub bub bub I h can MEM read without permission I 0 I bub bub bub 1 I 2 bub can even use read value in WB I 0 I 1 I bub bub bub dependent instructions 2 as Kill long faulting as at the and end younger can t inst; drain older inst see Don t any start of it handler until faulting inst. is oldest 100s of speculative instructions Better yet, don t start handler until pipeline is empty in flight in modern OOO CPUs Better to be safe than to be fast

22 Key Idea 3: Inter Model Compatibility a valid program whose logic will not depend implicitly upon time of execution and which runs upon configuration A, will also run on configuration B if the a fundamental tenet that ISA latter includes at least the required storage, at least the does not care about time required I/O devices. Invalid programs not constrained to yield same result invalid ==violating architecture manual exceptions are architecturally defined The King of Binary Compatibility: Intel x86, IBM 360 stable software base and ecosystem performance scalability [Amdahl, Blaauw and Brooks, 1964] S18 L19 S22, James C. Hoe, CMU/ECE/CALCM, 2018

23 What cache is in your computer? How to figure out what cache configuration is in your computer Cache invisible architecturally, but performance capacity side effect (C), associativity easily (a), detectable and block size using timer (B) number of levels The presence or lack of a cache should not be detectable by functional behavior of software But you could tell if you measured execution time to infer the number of cache misses Infer read value without seeing by running code to cause hit/miss based on unseen value S18 L19 S23, James C. Hoe, CMU/ECE/CALCM, 2018

24 64 bit virtual address MIPS R10K Read top addr 2 bits Y+C, set kernel/supervisor/user Y+2C, Y+3C... so addr mode Y is additional not in cache; bits then set cache attempt and to translation execute: behavior I 1 : lw t0, 0(r X ) bit I 2 : andinot t0, translate t0, at 0x1 all I (holes 3 : sli t0, t0, log and repeats in the 2 (blocksize) VA??) I 4 : add t0, t0, r Y I 5 : lw x0, 0(t0) 8 bit ASID (address space ID) distinguishes between processes I 1 is an exception so I 1 ~I 5 not observed architecturally; nevertheless addr Y is cached if LSB of mem[x] is 0 40 bit physical address Translation 64 bit VA and 8 bit ASID 40 bit PA 1 GB mapped (kseg) X: 0.5 GB unmapped uncached 0.5 GB unmapped cached Y: bottom 2 GB mapped (normal) simplified example from 32 bit VA in R2000/ S18 L19 S24, James C. Hoe, CMU/ECE/CALCM, 2018

25 Control Speculation: PC+4 t 0 t 1 t 2 t 3 t 4 t 5 Inst h IF PC ID ALU MEM Inst i Inst j IF PC+4 ID IF PC+8 ALU ID Inst k IF target Train BTB so the previous executes as wrong path first opportunity to decode Inst h should we architecturally correct now? nothing Inst h branch condition and target illegal happened!! evaluated in ALU Inst h is a taken branch S18 L19 S25, James C. Hoe, CMU/ECE/CALCM, 2018 When inst h branch resolves branch target (Inst k ) is fetched flush instructions fetched since inst h ( wrong path )

26 Idempotency and Side effects Meltdown vulnerability not a bug but a purposeful Loading from real memory location M[A] should performance return most optimization recent value permitted stored to by M[A] ISA Same writing issue doesn t M[A] once arise is with the same MMIO because as writing M[A] ISA with disallow same spurious value multiple read if times TLB says in a uncacheable row Architects and architects need to be more paranoid reading M[A] multiple times returns same value This is why memory caching works!! LW/SW to mmap locations can have side effects reading/writing mmap location can imply commands and other state changes consider a FIFO example SW to 0xffff0000 pushes value LW from 0xffff0000 returns popped value S18 L19 S26, James C. Hoe, CMU/ECE/CALCM, xffff0000 FIFO What happens if 0xffff0000 is cached?

27 S18 L19 S27, James C. Hoe, CMU/ECE/CALCM, 2018 Midterm2 Covers lectures (L10~L19), HW, projects, assigned readings (from textbooks and papers) Types of questions freebies: remember the materials >> probing: understand the materials << applied: apply the materials in original interpretation **55 minutes, 55 points** point values calibrated to time needed closed book, one 8½x11 in 2 hand written cribsheet no electronics use pencil or black/blue ink only

Lecture 19: Survey of Modern VMs. Housekeeping

Lecture 19: Survey of Modern VMs. Housekeeping S 17 L19 1 18 447 Lecture 19: Survey of Modern VMs James C. Hoe Department of ECE Carnegie Mellon University Housekeeping S 17 L19 2 Your goal today see the many realizations of VM, focusing on deviation

More information

Lecture 22: Virtual Memory: Survey of Modern Systems

Lecture 22: Virtual Memory: Survey of Modern Systems 18-447 Lecture 22: Virtual Memory: Survey of Modern Systems James C. Hoe Dept of ECE, CMU April 15, 2009 S 09 L22-1 Announcements: Spring Carnival!!! Final Thursday, May 7 5:30-8:30p.m Room TBA Two Guest

More information

Lecture 17: Address Translation. James C. Hoe Department of ECE Carnegie Mellon University

Lecture 17: Address Translation. James C. Hoe Department of ECE Carnegie Mellon University 18 447 Lecture 17: Address Translation James C. Hoe Department of ECE Carnegie Mellon University 18 447 S18 L17 S1, James C. Hoe, CMU/ECE/CALCM, 2018 Your goal today Housekeeping see Virtual Memory into

More information

EECS 470. Lecture 16 Virtual Memory. Fall 2018 Jon Beaumont

EECS 470. Lecture 16 Virtual Memory. Fall 2018 Jon Beaumont Lecture 16 Virtual Memory Fall 2018 Jon Beaumont http://www.eecs.umich.edu/courses/eecs470 Slides developed in part by Profs. Austin, Brehob, Falsafi, Hill, Hoe, Lipasti, Shen, Smith, Sohi, Tyson, and

More information

Lecture 16: Cache in Context (Uniprocessor) James C. Hoe Department of ECE Carnegie Mellon University

Lecture 16: Cache in Context (Uniprocessor) James C. Hoe Department of ECE Carnegie Mellon University 18 447 Lecture 16: Cache in Context (Uniprocessor) James C. Hoe Department of ECE Carnegie Mellon University 18 447 S18 L16 S1, James C. Hoe, CMU/ECE/CALCM, 2018 Your goal today Housekeeping understand

More information

Virtual Memory: From Address Translation to Demand Paging

Virtual Memory: From Address Translation to Demand Paging Constructive Computer Architecture Virtual Memory: From Address Translation to Demand Paging Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology November 12, 2014

More information

Lecture 20: Virtual Memory, Protection and Paging. Multi-Level Caches

Lecture 20: Virtual Memory, Protection and Paging. Multi-Level Caches S 09 L20-1 18-447 Lecture 20: Virtual Memory, Protection and Paging James C. Hoe Dept of ECE, CMU April 8, 2009 Announcements: Best class ever, next Monday Handouts: H14 HW#4 (on Blackboard), due 4/22/09

More information

Virtual Memory: From Address Translation to Demand Paging

Virtual Memory: From Address Translation to Demand Paging Constructive Computer Architecture Virtual Memory: From Address Translation to Demand Paging Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology November 9, 2015

More information

Learning Outcomes. An understanding of page-based virtual memory in depth. Including the R3000 s support for virtual memory.

Learning Outcomes. An understanding of page-based virtual memory in depth. Including the R3000 s support for virtual memory. Virtual Memory 1 Learning Outcomes An understanding of page-based virtual memory in depth. Including the R3000 s support for virtual memory. 2 Memory Management Unit (or TLB) The position and function

More information

Learning Outcomes. An understanding of page-based virtual memory in depth. Including the R3000 s support for virtual memory.

Learning Outcomes. An understanding of page-based virtual memory in depth. Including the R3000 s support for virtual memory. Virtual Memory Learning Outcomes An understanding of page-based virtual memory in depth. Including the R000 s support for virtual memory. Memory Management Unit (or TLB) The position and function of the

More information

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. April 12, 2018 L16-1

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. April 12, 2018 L16-1 Virtual Memory Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. L16-1 Reminder: Operating Systems Goals of OS: Protection and privacy: Processes cannot access each other s data Abstraction:

More information

CS 152 Computer Architecture and Engineering. Lecture 11 - Virtual Memory and Caches

CS 152 Computer Architecture and Engineering. Lecture 11 - Virtual Memory and Caches CS 152 Computer Architecture and Engineering Lecture 11 - Virtual Memory and Caches Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste

More information

Lecture 11: Interrupt and Exception. James C. Hoe Department of ECE Carnegie Mellon University

Lecture 11: Interrupt and Exception. James C. Hoe Department of ECE Carnegie Mellon University 18 447 Lecture 11: Interrupt and Exception James C. Hoe Department of ECE Carnegie Mellon University 18 447 S18 L11 S1, James C. Hoe, CMU/ECE/CALCM, 2018 Your goal today Housekeeping first peek outside

More information

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1

Virtual Memory. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. November 15, MIT Fall 2018 L20-1 Virtual Memory Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T. L20-1 Reminder: Operating Systems Goals of OS: Protection and privacy: Processes cannot access each other s data Abstraction:

More information

CS162 - Operating Systems and Systems Programming. Address Translation => Paging"

CS162 - Operating Systems and Systems Programming. Address Translation => Paging CS162 - Operating Systems and Systems Programming Address Translation => Paging" David E. Culler! http://cs162.eecs.berkeley.edu/! Lecture #15! Oct 3, 2014!! Reading: A&D 8.1-2, 8.3.1. 9.7 HW 3 out (due

More information

CS 61C: Great Ideas in Computer Architecture Virtual Memory. Instructors: John Wawrzynek & Vladimir Stojanovic

CS 61C: Great Ideas in Computer Architecture Virtual Memory. Instructors: John Wawrzynek & Vladimir Stojanovic CS 61C: Great Ideas in Computer Architecture Virtual Memory Instructors: John Wawrzynek & Vladimir Stojanovic http://inst.eecs.berkeley.edu/~cs61c/ 1 Review Programmed I/O Polling vs. Interrupts Booting

More information

CPS104 Computer Organization and Programming Lecture 16: Virtual Memory. Robert Wagner

CPS104 Computer Organization and Programming Lecture 16: Virtual Memory. Robert Wagner CPS104 Computer Organization and Programming Lecture 16: Virtual Memory Robert Wagner cps 104 VM.1 RW Fall 2000 Outline of Today s Lecture Virtual Memory. Paged virtual memory. Virtual to Physical translation:

More information

Modern Virtual Memory Systems. Modern Virtual Memory Systems

Modern Virtual Memory Systems. Modern Virtual Memory Systems 6.823, L12--1 Modern Virtual Systems Asanovic Laboratory for Computer Science M.I.T. http://www.csg.lcs.mit.edu/6.823 6.823, L12--2 Modern Virtual Systems illusion of a large, private, uniform store Protection

More information

CS 61C: Great Ideas in Computer Architecture. Lecture 23: Virtual Memory. Bernhard Boser & Randy Katz

CS 61C: Great Ideas in Computer Architecture. Lecture 23: Virtual Memory. Bernhard Boser & Randy Katz CS 61C: Great Ideas in Computer Architecture Lecture 23: Virtual Memory Bernhard Boser & Randy Katz http://inst.eecs.berkeley.edu/~cs61c Agenda Virtual Memory Paged Physical Memory Swap Space Page Faults

More information

CS 61C: Great Ideas in Computer Architecture. Lecture 23: Virtual Memory

CS 61C: Great Ideas in Computer Architecture. Lecture 23: Virtual Memory CS 61C: Great Ideas in Computer Architecture Lecture 23: Virtual Memory Krste Asanović & Randy H. Katz http://inst.eecs.berkeley.edu/~cs61c/fa17 1 Agenda Virtual Memory Paged Physical Memory Swap Space

More information

CPS 104 Computer Organization and Programming Lecture 20: Virtual Memory

CPS 104 Computer Organization and Programming Lecture 20: Virtual Memory CPS 104 Computer Organization and Programming Lecture 20: Virtual Nov. 10, 1999 Dietolf (Dee) Ramm http://www.cs.duke.edu/~dr/cps104.html CPS 104 Lecture 20.1 Outline of Today s Lecture O Virtual. 6 Paged

More information

CSE 560 Computer Systems Architecture

CSE 560 Computer Systems Architecture This Unit: CSE 560 Computer Systems Architecture App App App System software Mem I/O The operating system () A super-application Hardware support for an Page tables and address translation s and hierarchy

More information

CS252 Spring 2017 Graduate Computer Architecture. Lecture 17: Virtual Memory and Caches

CS252 Spring 2017 Graduate Computer Architecture. Lecture 17: Virtual Memory and Caches CS252 Spring 2017 Graduate Computer Architecture Lecture 17: Virtual Memory and Caches Lisa Wu, Krste Asanovic http://inst.eecs.berkeley.edu/~cs252/sp17 WU UCB CS252 SP17 Last Time in Lecture 16 Memory

More information

Computer Architecture Lecture 13: Virtual Memory II

Computer Architecture Lecture 13: Virtual Memory II 18-447 Computer Architecture Lecture 13: Virtual Memory II Lecturer: Rachata Ausavarungnirun Carnegie Mellon University Spring 2014, 2/17/2014 (with material from Onur Mutlu, Justin Meza and Yoongu Kim)

More information

Lecture 9 - Virtual Memory

Lecture 9 - Virtual Memory CS 152 Computer Architecture and Engineering Lecture 9 - Virtual Memory Dr. George Michelogiannakis EECS, University of California at Berkeley CRD, Lawrence Berkeley National Laboratory http://inst.eecs.berkeley.edu/~cs152

More information

18-447: Computer Architecture Lecture 18: Virtual Memory III. Yoongu Kim Carnegie Mellon University Spring 2013, 3/1

18-447: Computer Architecture Lecture 18: Virtual Memory III. Yoongu Kim Carnegie Mellon University Spring 2013, 3/1 18-447: Computer Architecture Lecture 18: Virtual Memory III Yoongu Kim Carnegie Mellon University Spring 2013, 3/1 Upcoming Schedule Today: Lab 3 Due Today: Lecture/Recitation Monday (3/4): Lecture Q&A

More information

CSE 120 Principles of Operating Systems Spring 2017

CSE 120 Principles of Operating Systems Spring 2017 CSE 120 Principles of Operating Systems Spring 2017 Lecture 12: Paging Lecture Overview Today we ll cover more paging mechanisms: Optimizations Managing page tables (space) Efficient translations (TLBs)

More information

CS 318 Principles of Operating Systems

CS 318 Principles of Operating Systems CS 318 Principles of Operating Systems Fall 2018 Lecture 10: Virtual Memory II Ryan Huang Slides adapted from Geoff Voelker s lectures Administrivia Next Tuesday project hacking day No class My office

More information

John Wawrzynek & Nick Weaver

John Wawrzynek & Nick Weaver CS 61C: Great Ideas in Computer Architecture Lecture 23: Virtual Memory John Wawrzynek & Nick Weaver http://inst.eecs.berkeley.edu/~cs61c From Previous Lecture: Operating Systems Input / output (I/O) Memory

More information

Address Translation. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Address Translation. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University Address Translation Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics How to reduce the size of page tables? How to reduce the time for

More information

Memory Hierarchy Requirements. Three Advantages of Virtual Memory

Memory Hierarchy Requirements. Three Advantages of Virtual Memory CS61C L12 Virtual (1) CS61CL : Machine Structures Lecture #12 Virtual 2009-08-03 Jeremy Huddleston Review!! Cache design choices: "! Size of cache: speed v. capacity "! size (i.e., cache aspect ratio)

More information

CS 152 Computer Architecture and Engineering. Lecture 9 - Virtual Memory

CS 152 Computer Architecture and Engineering. Lecture 9 - Virtual Memory CS 152 Computer Architecture and Engineering Lecture 9 - Virtual Memory Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste!

More information

Lecture 17. Fall 2007 Prof. Thomas Wenisch. row enable. _bitline. Lecture 18 Slide 1 EECS 470

Lecture 17. Fall 2007 Prof. Thomas Wenisch. row enable. _bitline. Lecture 18 Slide 1 EECS 470 Lecture 17 DRAM Memory row enable Fall 2007 Prof. Thomas Wenisch http://www.eecs.umich.edu/courses/eecs4 70 _bitline Slides developed in part by Profs. Austin, Brehob, Falsafi, Hill, Hoe, Lipasti, Shen,

More information

CSE 120 Principles of Operating Systems

CSE 120 Principles of Operating Systems CSE 120 Principles of Operating Systems Spring 2018 Lecture 10: Paging Geoffrey M. Voelker Lecture Overview Today we ll cover more paging mechanisms: Optimizations Managing page tables (space) Efficient

More information

Virtual Memory. CS61, Lecture 15. Prof. Stephen Chong October 20, 2011

Virtual Memory. CS61, Lecture 15. Prof. Stephen Chong October 20, 2011 Virtual Memory CS6, Lecture 5 Prof. Stephen Chong October 2, 2 Announcements Midterm review session: Monday Oct 24 5:3pm to 7pm, 6 Oxford St. room 33 Large and small group interaction 2 Wall of Flame Rob

More information

Learning Outcomes. Page Tables Revisited. Two-level Translation. R3000 TLB Refill. Virtual Linear Array page table

Learning Outcomes. Page Tables Revisited. Two-level Translation. R3000 TLB Refill. Virtual Linear Array page table Learning Outcomes Page Tables Revisited An understanding of virtual linear array page tables, and their use on the MIPS R3000. Exposure to alternative page table structures beyond two-level and inverted

More information

HY225 Lecture 12: DRAM and Virtual Memory

HY225 Lecture 12: DRAM and Virtual Memory HY225 Lecture 12: DRAM and irtual Memory Dimitrios S. Nikolopoulos University of Crete and FORTH-ICS May 16, 2011 Dimitrios S. Nikolopoulos Lecture 12: DRAM and irtual Memory 1 / 36 DRAM Fundamentals Random-access

More information

Carnegie Mellon. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition

Carnegie Mellon. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition Carnegie Mellon Virtual Memory: Concepts 5-23: Introduction to Computer Systems 7 th Lecture, October 24, 27 Instructor: Randy Bryant 2 Hmmm, How Does This Work?! Process Process 2 Process n Solution:

More information

Virtual Memory. Virtual Memory

Virtual Memory. Virtual Memory Virtual Memory Virtual Memory Main memory is cache for secondary storage Secondary storage (disk) holds the complete virtual address space Only a portion of the virtual address space lives in the physical

More information

Recap: Set Associative Cache. N-way set associative: N entries for each Cache Index N direct mapped caches operates in parallel

Recap: Set Associative Cache. N-way set associative: N entries for each Cache Index N direct mapped caches operates in parallel Recap: Set Associative Cache CS152 Computer Architecture and Engineering Lecture 21 Virtual and Buses April 19, 1999 John Kubiatowicz (http.cs.berkeley.edu/~kubitron) Valid N-way set associative: N entries

More information

Processes and Virtual Memory Concepts

Processes and Virtual Memory Concepts Processes and Virtual Memory Concepts Brad Karp UCL Computer Science CS 37 8 th February 28 (lecture notes derived from material from Phil Gibbons, Dave O Hallaron, and Randy Bryant) Today Processes Virtual

More information

This training session will cover the Translation Look aside Buffer or TLB

This training session will cover the Translation Look aside Buffer or TLB This training session will cover the Translation Look aside Buffer or TLB I will cover: What It is How to initialize it And How TLB exceptions are handled 1 First let me explain what we are dealing with:

More information

CS 152 Computer Architecture and Engineering. Lecture 9 - Address Translation

CS 152 Computer Architecture and Engineering. Lecture 9 - Address Translation CS 152 Computer Architecture and Engineering Lecture 9 - Address Translation Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste

More information

Another View of the Memory Hierarchy. Lecture #25 Virtual Memory I Memory Hierarchy Requirements. Memory Hierarchy Requirements

Another View of the Memory Hierarchy. Lecture #25 Virtual Memory I Memory Hierarchy Requirements. Memory Hierarchy Requirements CS61C L25 Virtual I (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #25 Virtual I 27-8-7 Scott Beamer, Instructor Another View of the Hierarchy Thus far{ Next: Virtual { Regs Instr.

More information

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems Instructor: Dr. Turgay Korkmaz Department Computer Science The University of Texas at San Antonio Office: NPB

More information

Computer Systems. Virtual Memory. Han, Hwansoo

Computer Systems. Virtual Memory. Han, Hwansoo Computer Systems Virtual Memory Han, Hwansoo A System Using Physical Addressing CPU Physical address (PA) 4 Main memory : : 2: 3: 4: 5: 6: 7: 8:... M-: Data word Used in simple systems like embedded microcontrollers

More information

CS 153 Design of Operating Systems Winter 2016

CS 153 Design of Operating Systems Winter 2016 CS 153 Design of Operating Systems Winter 2016 Lecture 16: Memory Management and Paging Announcement Homework 2 is out To be posted on ilearn today Due in a week (the end of Feb 19 th ). 2 Recap: Fixed

More information

Virtual Memory 2. Today. Handling bigger address spaces Speeding translation

Virtual Memory 2. Today. Handling bigger address spaces Speeding translation Virtual Memory 2 Today Handling bigger address spaces Speeding translation Considerations with page tables Two key issues with page tables Mapping must be fast Done on every memory reference, at least

More information

Virtual Memory. Motivations for VM Address translation Accelerating translation with TLBs

Virtual Memory. Motivations for VM Address translation Accelerating translation with TLBs Virtual Memory Today Motivations for VM Address translation Accelerating translation with TLBs Fabián Chris E. Bustamante, Riesbeck, Fall Spring 2007 2007 A system with physical memory only Addresses generated

More information

Virtual Memory 2. To do. q Handling bigger address spaces q Speeding translation

Virtual Memory 2. To do. q Handling bigger address spaces q Speeding translation Virtual Memory 2 To do q Handling bigger address spaces q Speeding translation Considerations with page tables Two key issues with page tables Mapping must be fast Done on every memory reference, at least

More information

VIRTUAL MEMORY II. Jo, Heeseung

VIRTUAL MEMORY II. Jo, Heeseung VIRTUAL MEMORY II Jo, Heeseung TODAY'S TOPICS How to reduce the size of page tables? How to reduce the time for address translation? 2 PAGE TABLES Space overhead of page tables The size of the page table

More information

Chapter 8 Memory Management

Chapter 8 Memory Management Chapter 8 Memory Management Da-Wei Chang CSIE.NCKU Source: Abraham Silberschatz, Peter B. Galvin, and Greg Gagne, "Operating System Concepts", 9th Edition, Wiley. 1 Outline Background Swapping Contiguous

More information

Multi-level Translation. CS 537 Lecture 9 Paging. Example two-level page table. Multi-level Translation Analysis

Multi-level Translation. CS 537 Lecture 9 Paging. Example two-level page table. Multi-level Translation Analysis Multi-level Translation CS 57 Lecture 9 Paging Michael Swift Problem: what if you have a sparse address space e.g. out of GB, you use MB spread out need one PTE per page in virtual address space bit AS

More information

Virtual Memory. Today. Handling bigger address spaces Speeding translation

Virtual Memory. Today. Handling bigger address spaces Speeding translation Virtual Memory Today Handling bigger address spaces Speeding translation Considerations with page tables Two key issues with page tables Mapping must be fast Done on every memory reference, at least 1

More information

CSE 451: Operating Systems Winter Page Table Management, TLBs and Other Pragmatics. Gary Kimura

CSE 451: Operating Systems Winter Page Table Management, TLBs and Other Pragmatics. Gary Kimura CSE 451: Operating Systems Winter 2013 Page Table Management, TLBs and Other Pragmatics Gary Kimura Moving now from Hardware to how the OS manages memory Two main areas to discuss Page table management,

More information

Virtual Memory Oct. 29, 2002

Virtual Memory Oct. 29, 2002 5-23 The course that gives CMU its Zip! Virtual Memory Oct. 29, 22 Topics Motivations for VM Address translation Accelerating translation with TLBs class9.ppt Motivations for Virtual Memory Use Physical

More information

EITF20: Computer Architecture Part 5.1.1: Virtual Memory

EITF20: Computer Architecture Part 5.1.1: Virtual Memory EITF20: Computer Architecture Part 5.1.1: Virtual Memory Liang Liu liang.liu@eit.lth.se 1 Outline Reiteration Cache optimization Virtual memory Case study AMD Opteron Summary 2 Memory hierarchy 3 Cache

More information

CS 152 Computer Architecture and Engineering. Lecture 8 - Address Translation

CS 152 Computer Architecture and Engineering. Lecture 8 - Address Translation CS 152 Computer Architecture and Engineering Lecture 8 - Translation Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste!

More information

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names Fast access ===> use map to find object HW == SW ===> map is in HW or SW or combo Extend range ===> longer, hierarchical names How is map embodied: --- L1? --- Memory? The Environment ---- Long Latency

More information

16 Sharing Main Memory Segmentation and Paging

16 Sharing Main Memory Segmentation and Paging Operating Systems 64 16 Sharing Main Memory Segmentation and Paging Readings for this topic: Anderson/Dahlin Chapter 8 9; Siberschatz/Galvin Chapter 8 9 Simple uniprogramming with a single segment per

More information

CS 152 Computer Architecture and Engineering. Lecture 8 - Address Translation

CS 152 Computer Architecture and Engineering. Lecture 8 - Address Translation CS 152 Computer Architecture and Engineering Lecture 8 - Translation Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste!

More information

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation Virtual Memory Topics (Chapter 9) Motivations for VM Address translation 1 Motivations for Virtual Memory Use Physical DRAM as a Cache for the Disk Address space of a process can exceed physical memory

More information

Opera&ng Systems ECE344

Opera&ng Systems ECE344 Opera&ng Systems ECE344 Lecture 8: Paging Ding Yuan Lecture Overview Today we ll cover more paging mechanisms: Op&miza&ons Managing page tables (space) Efficient transla&ons (TLBs) (&me) Demand paged virtual

More information

A Typical Memory Hierarchy

A Typical Memory Hierarchy A Typical Memory Hierarchy Processor Faster Larger Capacity Managed by Hardware Managed by OS with hardware assistance Datapath Control Registers Level One Cache L 1 Second Level Cache (SRAM) L 2 Main

More information

CS 537 Lecture 6 Fast Translation - TLBs

CS 537 Lecture 6 Fast Translation - TLBs CS 537 Lecture 6 Fast Translation - TLBs Michael Swift 9/26/7 2004-2007 Ed Lazowska, Hank Levy, Andrea and Remzi Arpaci-Dussea, Michael Swift Faster with TLBS Questions answered in this lecture: Review

More information

CS 152 Computer Architecture and Engineering. Lecture 9 - Address Translation

CS 152 Computer Architecture and Engineering. Lecture 9 - Address Translation CS 152 Computer Architecture and Engineering Lecture 9 - Address Translation Krste Asanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste!

More information

A Typical Memory Hierarchy

A Typical Memory Hierarchy A Typical Memory Hierarchy Processor Faster Larger Capacity Managed by OS with hardware assistance Datapath Control Registers On-Chip Level One Cache L 1 Managed by Hardware Second Level Cache (SRAM) L

More information

Memory Hierarchy. Mehran Rezaei

Memory Hierarchy. Mehran Rezaei Memory Hierarchy Mehran Rezaei What types of memory do we have? Registers Cache (Static RAM) Main Memory (Dynamic RAM) Disk (Magnetic Disk) Option : Build It Out of Fast SRAM About 5- ns access Decoders

More information

Carnegie Mellon. 16 th Lecture, Mar. 20, Instructors: Todd C. Mowry & Anthony Rowe

Carnegie Mellon. 16 th Lecture, Mar. 20, Instructors: Todd C. Mowry & Anthony Rowe Virtual Memory: Concepts 5 23 / 8 23: Introduction to Computer Systems 6 th Lecture, Mar. 2, 22 Instructors: Todd C. Mowry & Anthony Rowe Today Address spaces VM as a tool lfor caching VM as a tool for

More information

CS 61C: Great Ideas in Computer Architecture. Virtual Memory

CS 61C: Great Ideas in Computer Architecture. Virtual Memory CS 61C: Great Ideas in Computer Architecture Virtual Memory Instructor: Justin Hsia 7/30/2012 Summer 2012 Lecture #24 1 Review of Last Lecture (1/2) Multiple instruction issue increases max speedup, but

More information

ECE 571 Advanced Microprocessor-Based Design Lecture 12

ECE 571 Advanced Microprocessor-Based Design Lecture 12 ECE 571 Advanced Microprocessor-Based Design Lecture 12 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 1 March 2018 HW#6 will be posted Project will be coming up Announcements

More information

CS162 Operating Systems and Systems Programming Lecture 14. Caching and Demand Paging

CS162 Operating Systems and Systems Programming Lecture 14. Caching and Demand Paging CS162 Operating Systems and Systems Programming Lecture 14 Caching and Demand Paging October 17, 2007 Prof. John Kubiatowicz http://inst.eecs.berkeley.edu/~cs162 Review: Hierarchy of a Modern Computer

More information

CS5460: Operating Systems Lecture 14: Memory Management (Chapter 8)

CS5460: Operating Systems Lecture 14: Memory Management (Chapter 8) CS5460: Operating Systems Lecture 14: Memory Management (Chapter 8) Important from last time We re trying to build efficient virtual address spaces Why?? Virtual / physical translation is done by HW and

More information

Motivation, Concept, Paging January Winter Term 2008/09 Gerd Liefländer Universität Karlsruhe (TH), System Architecture Group

Motivation, Concept, Paging January Winter Term 2008/09 Gerd Liefländer Universität Karlsruhe (TH), System Architecture Group System Architecture 18 Virtual Memory (1) Motivation, Concept, Paging January 19 2009 Winter Term 2008/09 Gerd Liefländer 2008 Universität Karlsruhe (TH), System Architecture Group 1 Agenda Review Address

More information

virtual memory Page 1 CSE 361S Disk Disk

virtual memory Page 1 CSE 361S Disk Disk CSE 36S Motivations for Use DRAM a for the Address space of a process can exceed physical memory size Sum of address spaces of multiple processes can exceed physical memory Simplify Management 2 Multiple

More information

CSE 351. Virtual Memory

CSE 351. Virtual Memory CSE 351 Virtual Memory Virtual Memory Very powerful layer of indirection on top of physical memory addressing We never actually use physical addresses when writing programs Every address, pointer, etc

More information

This Unit: Main Memory. Virtual Memory. Virtual Memory. Other Uses of Virtual Memory

This Unit: Main Memory. Virtual Memory. Virtual Memory. Other Uses of Virtual Memory This Unit: Virtual Application OS Compiler Firmware I/O Digital Circuits Gates & Transistors hierarchy review DRAM technology A few more transistors Organization: two level addressing Building a memory

More information

Virtual Memory 3. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. P & H Chapter 5.4

Virtual Memory 3. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. P & H Chapter 5.4 Virtual Memory 3 Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University P & H Chapter 5.4 Project3 available now Administrivia Design Doc due next week, Monday, April 16 th Schedule

More information

Agenda. CS 61C: Great Ideas in Computer Architecture. Virtual Memory II. Goals of Virtual Memory. Memory Hierarchy Requirements

Agenda. CS 61C: Great Ideas in Computer Architecture. Virtual Memory II. Goals of Virtual Memory. Memory Hierarchy Requirements CS 61C: Great Ideas in Computer Architecture Virtual II Guest Lecturer: Justin Hsia Agenda Review of Last Lecture Goals of Virtual Page Tables Translation Lookaside Buffer (TLB) Administrivia VM Performance

More information

Virtual Memory Virtual memory first used to relive programmers from the burden of managing overlays.

Virtual Memory Virtual memory first used to relive programmers from the burden of managing overlays. CSE420 Virtual Memory Prof. Mokhtar Aboelaze York University Based on Slides by Prof. L. Bhuyan (UCR) Prof. M. Shaaban (RIT) Virtual Memory Virtual memory first used to relive programmers from the burden

More information

18-447: Computer Architecture Lecture 16: Virtual Memory

18-447: Computer Architecture Lecture 16: Virtual Memory 18-447: Computer Architecture Lecture 16: Virtual Memory Justin Meza Carnegie Mellon University (with material from Onur Mutlu, Michael Papamichael, and Vivek Seshadri) 1 Notes HW 2 and Lab 2 grades will

More information

Topic 18 (updated): Virtual Memory

Topic 18 (updated): Virtual Memory Topic 18 (updated): Virtual Memory COS / ELE 375 Computer Architecture and Organization Princeton University Fall 2015 Prof. David August 1 Virtual Memory Any time you see virtual, think using a level

More information

Virtual Memory: Concepts

Virtual Memory: Concepts Virtual Memory: Concepts 5-23: Introduction to Computer Systems 7 th Lecture, March 2, 27 Instructors: Franz Franchetti & Seth Copen Goldstein Hmmm, How Does This Work?! Process Process 2 Process n Solution:

More information

CS162 Operating Systems and Systems Programming Lecture 14. Caching (Finished), Demand Paging

CS162 Operating Systems and Systems Programming Lecture 14. Caching (Finished), Demand Paging CS162 Operating Systems and Systems Programming Lecture 14 Caching (Finished), Demand Paging October 11 th, 2017 Neeraja J. Yadwadkar http://cs162.eecs.berkeley.edu Recall: Caching Concept Cache: a repository

More information

Systems Programming and Computer Architecture ( ) Timothy Roscoe

Systems Programming and Computer Architecture ( ) Timothy Roscoe Systems Group Department of Computer Science ETH Zürich Systems Programming and Computer Architecture (252-6-) Timothy Roscoe Herbstsemester 26 AS 26 Virtual Memory 8: Virtual Memory Computer Architecture

More information

Reducing Hit Times. Critical Influence on cycle-time or CPI. small is always faster and can be put on chip

Reducing Hit Times. Critical Influence on cycle-time or CPI. small is always faster and can be put on chip Reducing Hit Times Critical Influence on cycle-time or CPI Keep L1 small and simple small is always faster and can be put on chip interesting compromise is to keep the tags on chip and the block data off

More information

CSE 153 Design of Operating Systems

CSE 153 Design of Operating Systems CSE 53 Design of Operating Systems Winter 28 Lecture 6: Paging/Virtual Memory () Some slides modified from originals by Dave O hallaron Today Address spaces VM as a tool for caching VM as a tool for memory

More information

Computer Architecture and Engineering. CS152 Quiz #3. March 18th, Professor Krste Asanovic. Name:

Computer Architecture and Engineering. CS152 Quiz #3. March 18th, Professor Krste Asanovic. Name: Computer Architecture and Engineering CS152 Quiz #3 March 18th, 2008 Professor Krste Asanovic Name: Notes: This is a closed book, closed notes exam. 80 Minutes 10 Pages Not all questions are of equal difficulty,

More information

Lecture 19: Virtual Memory: Concepts

Lecture 19: Virtual Memory: Concepts CSCI-UA.2-3 Computer Systems Organization Lecture 9: Virtual Memory: Concepts Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com Some slides adapted (and slightly modified) from: Clark Barrett

More information

Virtual Memory 2. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. P & H Chapter 5.4

Virtual Memory 2. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. P & H Chapter 5.4 Virtual Memory 2 Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University P & H Chapter 5.4 Administrivia Project3 available now Design Doc due next week, Monday, April 16 th Schedule

More information

Lecture 14: Memory Hierarchy. James C. Hoe Department of ECE Carnegie Mellon University

Lecture 14: Memory Hierarchy. James C. Hoe Department of ECE Carnegie Mellon University 18 447 Lecture 14: Memory Hierarchy James C. Hoe Department of ECE Carnegie Mellon University 18 447 S18 L14 S1, James C. Hoe, CMU/ECE/CALCM, 2018 Your goal today Housekeeping understand memory system

More information

Module 2: Virtual Memory and Caches Lecture 3: Virtual Memory and Caches. The Lecture Contains:

Module 2: Virtual Memory and Caches Lecture 3: Virtual Memory and Caches. The Lecture Contains: The Lecture Contains: Program Optimization for Multi-core: Hardware Side of It Contents RECAP: VIRTUAL MEMORY AND CACHE Why Virtual Memory? Virtual Memory Addressing VM VA to PA Translation Page Fault

More information

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1

Virtual Memory. Patterson & Hennessey Chapter 5 ELEC 5200/6200 1 Virtual Memory Patterson & Hennessey Chapter 5 ELEC 5200/6200 1 Virtual Memory Use main memory as a cache for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs

More information

Computer Science 146. Computer Architecture

Computer Science 146. Computer Architecture Computer Architecture Spring 2004 Harvard University Instructor: Prof. dbrooks@eecs.harvard.edu Lecture 18: Virtual Memory Lecture Outline Review of Main Memory Virtual Memory Simple Interleaving Cycle

More information

COSC3330 Computer Architecture Lecture 20. Virtual Memory

COSC3330 Computer Architecture Lecture 20. Virtual Memory COSC3330 Computer Architecture Lecture 20. Virtual Memory Instructor: Weidong Shi (Larry), PhD Computer Science Department University of Houston Virtual Memory Topics Reducing Cache Miss Penalty (#2) Use

More information

ECE 571 Advanced Microprocessor-Based Design Lecture 13

ECE 571 Advanced Microprocessor-Based Design Lecture 13 ECE 571 Advanced Microprocessor-Based Design Lecture 13 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 21 March 2017 Announcements More on HW#6 When ask for reasons why cache

More information

Virtual Memory. Computer Systems Principles

Virtual Memory. Computer Systems Principles Virtual Memory Computer Systems Principles Objectives Virtual Memory What is it? How does it work? Virtual Memory Address Translation /7/25 CMPSCI 23 - Computer Systems Principles 2 Problem Lots of executing

More information

Virtual Memory. Samira Khan Apr 27, 2017

Virtual Memory. Samira Khan Apr 27, 2017 Virtual Memory Samira Khan Apr 27, 27 Virtual Memory Idea: Give the programmer the illusion of a large address space while having a small physical memory So that the programmer does not worry about managing

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Hardware Organization and Design Lecture 28: More Virtual Memory Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Overview Virtual memory used to protect applications from

More information

Virtual Memory. Motivation:

Virtual Memory. Motivation: Virtual Memory Motivation:! Each process would like to see its own, full, address space! Clearly impossible to provide full physical memory for all processes! Processes may define a large address space

More information