Chapter 9 Memory Organization. 9.1 Hierarchical Memory Systems Figure 9.1.

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 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
OS Fall’02 Virtual Memory Operating Systems Fall 2002.
Virtual Memory Chapter 18 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S. Dandamudi.
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.
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.
1 Recap: Memory Hierarchy. 2 Memory Hierarchy - the Big Picture Problem: memory is too slow and or too small Solution: memory hierarchy Fastest Slowest.
CSC 4250 Computer Architectures December 8, 2006 Chapter 5. Memory Hierarchy.
Cs 325 virtualmemory.1 Accessing Caches in Virtual Memory Environment.
CSE 490/590, Spring 2011 CSE 490/590 Computer Architecture Virtual Memory I Steve Ko Computer Sciences and Engineering University at Buffalo.
1 Lecture 20: Cache Hierarchies, Virtual Memory Today’s topics:  Cache hierarchies  Virtual memory Reminder:  Assignment 8 will be posted soon (due.
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.
Overview of Cache and Virtual MemorySlide 1 The Need for a Cache (edited from notes with Behrooz Parhami’s Computer Architecture textbook) Cache memories.
CSCE 212 Chapter 7 Memory Hierarchy Instructor: Jason D. Bakos.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
Review CPSC 321 Andreas Klappenecker Announcements Tuesday, November 30, midterm exam.
Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon, Oct 31, 2005 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
Memory Organization.
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 IX Memory Organization CS 147 Presented by: Duong Pham.
Memory: Virtual MemoryCSCE430/830 Memory Hierarchy: Virtual Memory CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu.
Images courtesy of Addison Wesley Longman, Inc. Copyright © 2001 Chapter 9 Memory Organization.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Memory Hierarchy 2.
Unit-4 (CO-MPI Autonomous)
Lecture 21 Last lecture Today’s lecture Cache Memory Virtual memory
CS 153 Design of Operating Systems Spring 2015 Final Review.
Operating Systems Chapter 8
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
CMPE 421 Parallel Computer Architecture
Five Components of a Computer
Lecture 19: Virtual Memory
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.
Chapter Twelve Memory Organization
Virtual Memory Expanding Memory Multiple Concurrent Processes.
1  1998 Morgan Kaufmann Publishers Recap: Memory Hierarchy of a Modern Computer System By taking advantage of the principle of locality: –Present the.
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.
CS2100 Computer Organisation Cache II (AY2010/2011) Semester 2.
Virtual Memory Additional Slides Slide Source: Topics Address translation Accelerating translation with TLBs class12.ppt.
Chapter 9 Memory Organization By Nguyen Chau Topics Hierarchical memory systems Cache memory Associative memory Cache memory with associative mapping.
Cache Memory Chapter 17 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S. Dandamudi.
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.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
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:
Constructive Computer Architecture Virtual Memory: From Address Translation to Demand Paging Arvind Computer Science & Artificial Intelligence Lab. Massachusetts.
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
1 Appendix C. Review of Memory Hierarchy Introduction Cache ABCs Cache Performance Write policy Virtual Memory and TLB.
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.
CS203 – Advanced Computer Architecture Virtual Memory.
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.
Virtual Memory (Section 9.3). The Need For Virtual Memory Many computers don’t have enough memory in RAM to accommodate all the programs a user wants.
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Memory COMPUTER ARCHITECTURE
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
CPSC 457 Operating Systems
Chap. 12 Memory Organization
So far in memory management…
Virtual Memory Overcoming main memory size limitation
Contents Memory types & memory hierarchy Virtual memory (VM)
CS703 - Advanced Operating Systems
Paging Memory Relocation and Fragmentation Paging
Virtual Memory 1 1.
Module IV Memory Organization.
Presentation transcript:

Chapter 9 Memory Organization

9.1 Hierarchical Memory Systems Figure 9.1

9.2 Cache Memory Associative memory (or CAM: Contents Addressable Memory) Figure 9.2 –Valid bit –Argument(or data): data register –Mask(or key): mask register –Match: match register –Output register

Figure 9.2

Cache memory with associative mapping Associative cache: cache with associative mapping (Figure 9.3) –Lines or blocks of data (Figure 9.4) Locality of reference –Spatial locality –Temporal locality –Sequentiality

Figure 9.3

Figure 9.4

Cache memory with direct mapping Index: to select one specific location in the cache. (low-order address bits) Tag(the high-order bits of original address which were not a part of the index) Figure 9.5 Direct-mapped cache allows for lines of data. (Figure 9.6) The direct-mapped cache is much less expensive than the associative cache, but also much less flexible.

Figure 9.5

Figure 9.6

Cache memory with set- associative mapping N-way set-associative cache Two-way set-associative cache: Figure 9.7 Two-way set-associative cache with 4 bytes of data per line: Figure 9.8

Figure 9.7

Figure 9.8

Replacing data in the cache Direct mapping offers the easiest solution to the replacement problem. The associative cache allows any location in the physical memory to be mapped to any location in cache. Three typical replacement strategies are –FIFO –LRU –Random The set-associative cache also needs replacement strategy. (Figure 9.9)

Figure 9.9

Writing data to the cache Write-through Write-back

Cache performance Cache hits and cache misses Hit ratio Average memory access time Where Tc: cache access time, Tp:memory access time, h: hit ratio Refer to Table 9.1,9.2,9.3,9.4,9.5,9.6 and 9.7

9.8 Virtual Memory Most advanced CPUs can address more memory location than physical memory space.  virtual memory –MMU – swap disk or swap file –Logical address –Physical memory address

Paging Pages Frames Figure 9.10

Issues of paging When should a page be moved into physical memory? How does the CPU find data in physical memory, if its logical address is not same as its physical address? What happens when all the frames have pages and the CPU needs to access data from a page not currently stored in physical memory?

Issues of paging(continued) The MMU handles all of these issues. –Page fault –Page table –Valid bit –Offset –Demand paging –TLB Figure 9.11, 9.12, and 9.13

Figure 9.11

Figure 9.12

Figure 9.13

Figure 9.14

Segmentation Segments Internal fragmentation External fragmentation Figure 9.15and 9.16 Combining a segmentation and paging (Figure 9.17)

Figure 9.15

Figure 9.16

Figure 9.17

Memory protection Protection bits Supervisor or kernel mode

Multiple page table Figure 9.18

Memory management in a Pentium/Windows PC Figure 9.19