Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Chapter 9 Memory Organization.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Page Table Implementation
Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
4/14/2017 Discussed Earlier segmentation - the process address space is divided into logical pieces called segments. The following are the example of types.
Virtual Memory Chapter 18 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S. Dandamudi.
1 Memory Systems Virtual Memory Lecture 25 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
CSE 490/590, Spring 2011 CSE 490/590 Computer Architecture Virtual Memory I Steve Ko Computer Sciences and Engineering University at Buffalo.
Spring 2003CSE P5481 Introduction Why memory subsystem design is important CPU speeds increase 55% per year DRAM speeds increase 3% per year rate of increase.
Memory Management (II)
Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
Memory Management.
Chapter 3.2 : Virtual Memory
Chapter 3 Memory Management
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.
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
Computer Organization Cs 147 Prof. Lee Azita Keshmiri.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved The Operating System Machine.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
A. Frank - P. Weisberg Operating Systems Simple/Basic Paging.
Silberschatz, Galvin and Gagne  Operating System Concepts Segmentation Memory-management scheme that supports user view of memory. A program.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
CS 241 Section Week #12 (04/22/10).
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.
Lecture 21 Last lecture Today’s lecture Cache Memory Virtual memory
Operating Systems Chapter 8
Chapter 8 Memory Management Dr. Yingwu Zhu. Outline Background Basic Concepts Memory Allocation.
Computer Architecture Lecture 28 Fasih ur Rehman.
8.4 paging Paging is a memory-management scheme that permits the physical address space of a process to be non-contiguous. The basic method for implementation.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 34 Paging Implementation.
IT253: Computer Organization
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-8 Memory Management (2) Department of Computer Science and Software.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Virtual Memory. DRAM as cache What about programs larger than DRAM? When we run multiple programs, all must fit in DRAM! Add another larger, slower level.
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 1 1.
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
9.1 Operating System Concepts Paging Example. 9.2 Operating System Concepts.
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.
Paging Paging is a memory-management scheme that permits the physical-address space of a process to be noncontiguous. Paging avoids the considerable problem.
CSC 360, Instructor Kui Wu Memory Management I: Main Memory.
Page Table Implementation. Readings r Silbershatz et al:
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
CS203 – Advanced Computer Architecture Virtual Memory.
Virtual Memory By CS147 Maheshpriya Venkata. Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
Chapter 9 Memory Organization. 9.1 Hierarchical Memory Systems Figure 9.1.
W4118 Operating Systems Instructor: Junfeng Yang.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 33 Paging Read Ch. 9.4.
Memory Management & Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
COMP 3500 Introduction to Operating Systems Paging: Basic Method Dr. Xiao Qin Auburn University Slides.
Memory: Page Table Structure CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Introduction to Paging. Readings r 4.3 of the text book.
Memory: Page Table Structure
Memory.
Virtual Memory Chapter 7.4.
Chapter 8: Main Memory Source & Copyright: Operating System Concepts, Silberschatz, Galvin and Gagne.
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
FIGURE 12-1 Memory Hierarchy
The Operating System Machine Level
Module IV Memory Organization.
CPSC 457 Operating Systems
Virtual Memory فصل هشتم.
So far in memory management…
Virtual Memory Overcoming main memory size limitation
Paging Memory Relocation and Fragmentation Paging
Virtual Memory 1 1.
Presentation transcript:

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Chapter 9 Memory Organization

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Chapter Outline Hierarchical Memory SystemsHierarchical Memory Systems Cache MemoryCache Memory Virtual MemoryVirtual Memory Pentium/Windows Memory SystemPentium/Windows Memory System

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Memory Hierarchy

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Associative Memory Data RegisterData Register

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Associative Memory Data RegisterData Register Mask RegisterMask Register

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Associative Memory Data RegisterData Register Mask RegisterMask Register Match RegisterMatch Register

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Associative Memory

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Associative Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Data Lines/Blocks Multiple consecutive words form a lineMultiple consecutive words form a line

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Data Lines/Blocks Multiple consecutive words form a lineMultiple consecutive words form a line All data in a line is moved togetherAll data in a line is moved together

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Data Lines/Blocks Multiple consecutive words form a lineMultiple consecutive words form a line All data in a line is moved togetherAll data in a line is moved together Takes advantage of locality of referenceTakes advantage of locality of reference

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Associative Cache with a Line Size of 4 Bytes

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Direct Mapped Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Direct Mapped Cache with a Line Size of 4 Bytes

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Drawbacks of Direct Mapped Cache : JUMP 1000H : JUMP 0000H

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Set-Associative Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Set-Associative Cache with a Line Size of 4 Bytes

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Data Replacement Policies FIFOFIFO

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Data Replacement Policies FIFOFIFO LRULRU

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Data Replacement Policies FIFOFIFO LRULRU RandomRandom

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Example

Example

Example

Example

Writing Data to Cache Write backWrite back Write throughWrite through Write allocateWrite allocate Write no-allocateWrite no-allocate

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Performance Hits and missesHits and misses

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Performance Hits and missesHits and misses Hit ratioHit ratio

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Performance Hits and missesHits and misses Hit ratioHit ratio Average memory access timeAverage memory access time

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Activity - Associative Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Activity - Associative Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Activity - Direct Mapped Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Activity - Direct Mapped Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Activity - 2-Way Set- Associative Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Cache Activity - 2-Way Set- Associative Cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © Way Set-Associative Cache with a Line Size of 2

Images courtesy of Addison Wesley Longman, Inc. Copyright © Way Set-Associative Cache with a Line Size of 2

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Virtual Memory Memory Management Unit (MMU)Memory Management Unit (MMU)

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Virtual Memory Memory Management Unit (MMU)Memory Management Unit (MMU) Swap disk/fileSwap disk/file

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Virtual Memory Memory Management Unit (MMU)Memory Management Unit (MMU) Swap disk/fileSwap disk/file Logical addressLogical address

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Virtual Memory Memory Management Unit (MMU)Memory Management Unit (MMU) Swap disk/fileSwap disk/file Logical addressLogical address Physical addressPhysical address

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Paging - Pages and Frames

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 MMU Configuration

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Page Table

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Address Conversion

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Translation Lookaside Buffer

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Example

Example

Segmentation

Fragmentation Internal fragmentationInternal fragmentation

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Fragmentation Internal fragmentationInternal fragmentation External fragmentationExternal fragmentation

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Fragmentation Internal fragmentationInternal fragmentation External fragmentationExternal fragmentation

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Beyond the Basics Split cacheSplit cache

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Beyond the Basics Split cacheSplit cache Multilevel page tableMultilevel page table

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Multilevel Page Table

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Pentium/Windows NT Memory Management 8 KB

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Pentium/Windows NT Cache Memory Management 16KB L1 split cache16KB L1 split cache –2-way set-associative –Line size of 32 bytes TLB used for cache and virtual memoryTLB used for cache and virtual memory Pseudo-LRU replacement policyPseudo-LRU replacement policy 256K L2 unified cache256K L2 unified cache –4-way set-associative

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Pentium/Windows NT Virtual Memory Management 4 GB address space4 GB address space –Low-order 2 GB for individual processes –High-order 2 GB for Windows NT components Uses paging, not segmentationUses paging, not segmentation 10-bit page directory pointer + 10-bit offset10-bit page directory pointer + 10-bit offset Uses the same TLBs as cache memoryUses the same TLBs as cache memory

Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Summary Hierarchical Memory SystemsHierarchical Memory Systems Cache MemoryCache Memory Virtual MemoryVirtual Memory Pentium/Windows Memory SystemPentium/Windows Memory System