Vivek Seshadri 15740/18740 Computer Architecture

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

OS Fall’02 Virtual Memory Operating Systems Fall 2002.
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Virtual Memory Hardware Support
1 A Real Problem  What if you wanted to run a program that needs more memory than you have?
1 Memory Systems Virtual Memory Lecture 25 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management -3 CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
Computer ArchitectureFall 2008 © November 10, 2007 Nael Abu-Ghazaleh Lecture 23 Virtual.
Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
Computer ArchitectureFall 2007 © November 21, 2007 Karem A. Sakallah Lecture 23 Virtual Memory (2) CS : Computer Architecture.
CS 333 Introduction to Operating Systems Class 11 – Virtual Memory (1)
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
Technical University of Lodz Department of Microelectronics and Computer Science Elements of high performance microprocessor architecture Virtual memory.
03/22/2004CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Virtual Memory BY JEMINI ISLAM. What is Virtual Memory Virtual memory is a memory management system that gives a computer the appearance of having more.
CS 333 Introduction to Operating Systems Class 12 - Virtual Memory (2) Jonathan Walpole Computer Science Portland State University.
Computer Architecture Lecture 28 Fasih ur Rehman.
CSE431 L22 TLBs.1Irwin, PSU, 2005 CSE 431 Computer Architecture Fall 2005 Lecture 22. Virtual Memory Hardware Support Mary Jane Irwin (
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui COMP 203 / NWEN 201 Computer Organisation / Computer Architectures Virtual.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
Virtual Memory Part 1 Li-Shiuan Peh Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology May 2, 2012L22-1
Virtual Memory. Virtual Memory: Topics Why virtual memory? Virtual to physical address translation Page Table Translation Lookaside Buffer (TLB)
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
4.3 Virtual Memory. Virtual memory  Want to run programs (code+stack+data) larger than available memory.  Overlays programmer divides program into pieces.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Virtual Memory Ch. 8 & 9 Silberschatz Operating Systems Book.
CSC 360, Instructor Kui Wu Memory Management I: Main Memory.
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)
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
Basic Paging (1) logical address space of a process can be made noncontiguous; process is allocated physical memory whenever the latter is available. Divide.
CMSC 611: Advanced Computer Architecture
Virtual Memory So, how is this possible?
Virtual Memory Chapter 7.4.
Memory COMPUTER ARCHITECTURE
CS161 – Design and Architecture of Computer
From Address Translation to Demand Paging
CS703 - Advanced Operating Systems
From Address Translation to Demand Paging
Some Real Problem What if a program needs more memory than the machine has? even if individual programs fit in memory, how can we run multiple programs?
Memory Hierarchy Virtual Memory, Address Translation
CS510 Operating System Foundations
CSCI206 - Computer Organization & Programming
Part V Memory System Design
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
Evolution in Memory Management Techniques
CMSC 611: Advanced Computer Architecture
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 8 11/24/2018.
Background Program must be brought into memory and placed within a process for it to be run. Input queue – collection of processes on the disk that are.
Module IV Memory Organization.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 12/1/2018.
CPSC 457 Operating Systems
Memory Systems CH008.
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
So far in memory management…
Translation Buffers (TLB’s)
Virtual Memory Overcoming main memory size limitation
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Virtual Memory Prof. Eric Rotenberg
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 4/5/2019.
Translation Buffers (TLB’s)
CSC3050 – Computer Architecture
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 542: Operating Systems
Translation Buffers (TLBs)
Cache writes and examples
Review What are the advantages/disadvantages of pages versus segments?
4.3 Virtual Memory.
Presentation transcript:

Vivek Seshadri 15740/18740 Computer Architecture Virtual Memory Vivek Seshadri 15740/18740 Computer Architecture

Readings Jacob & Mudge, “Virtual Memory in Contemporary Microprocessors,” IEEE Micro, 1998 Hennessy and Patterson, Appendix C.4-C.5

Why Virtual Memory? X CPU Load X Store Y Y Main Memory

Why Virtual Memory? Small available physical memory Contiguous address space Portability Protection Code & data OS data and application data One application’s data from another Sharing

Segmentation Segment: Base address + Size + Permissions Segments are re-locatable Can be copied from one location to another Each process is associated with a list of segments it can access

Virtual Memory All problems in computer science can be solved by another level of indirection - David Wheeler For an application to make progress, it is sufficient that the next instruction and the data required to execute the next instruction are present in main memory.

Virtual Memory CPU Load X Store Y Main Memory Virtual Address Space X

Virtual Memory Solves It All! Small available physical memory Large virtual address space (VAS)! Contiguous address space Data should be contiguous only in VAS Protection Different process -> Different VAS Sharing Map VAS to same location in physical memory

Implementation Pages Page tables Inverted page tables Large (to reduce mapping overhead) Page tables One entry per virtual page Hierarchical (to reduce size of page tables) Inverted page tables Speeding up translations Translation Look-aside Buffers (TLB)

Physical Memory Management Allocating pages Replacing pages (page fault) Swap space in disk Replacement policy LRU?

Virtual Memory & Caching Virtually-Indexed Virtually-Tagged Caches Virtual Page Number Offset Cacheline Tag Index Two processes can have the same virtual address

Solution - 1 Physically-Indexed Physically-tagged Cache Virtual Page Number Offset PhysicalPage Number Offset Cacheline Tag Index

Solution - 2 Virtually-Indexed Physically-tagged Cache Virtual Page Number Offset Physical Page Number Offset Cacheline Tag Index

Two virtual pages can map to the same physical page Synonyms Two virtual pages can map to the same physical page Virtual Page Number Offset Cacheline Tag Index