© 2000 Morgan Kaufman Overheads for Computers as Components CPUs: Memory System Mechanism zMicroprocessor clock rates are increasing zMemories are falling.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Memory Management Unit
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 5:00-6:00 PM.
Cache Memory Locality of reference: It is observed that when a program refers to memory, the access to memory for data as well as code are confined to.
Allocating Memory.
1 Lecture 20 – Caching and Virtual Memory  2004 Morgan Kaufmann Publishers Lecture 20 Caches and Virtual Memory.
© 2008 Wayne Wolf Overheads for Computers as Components 2 nd ed. CPUs zCaches. zMemory management.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
1 Chapter Seven Large and Fast: Exploiting Memory Hierarchy.
Multiprocessing Memory Management
Memory Organization.
Chapter 3.2 : Virtual Memory
Chapter 3 Memory Management
Computer Organization Cs 147 Prof. Lee Azita Keshmiri.
Virtual Memory:Part 2 Kashyap Sheth Kishore Putta Bijal Shah Kshama Desai.
1  2004 Morgan Kaufmann Publishers Chapter Seven.
1 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value is stored as a charge.
ITEC 325 Lecture 29 Memory(6). Review P2 assigned Exam 2 next Friday Demand paging –Page faults –TLB intro.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 346, Royden, Operating System Concepts Operating Systems Lecture 24 Paging.
Lecture 21 Last lecture Today’s lecture Cache Memory Virtual memory
Operating Systems Chapter 8
Lecture 19: Virtual Memory
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
Chapter 4 Storage Management (Memory Management).
Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel.
Chapter 4 Memory Management Virtual Memory.
Fundamentals of Programming Languages-II Subject Code: Teaching SchemeExamination Scheme Theory: 1 Hr./WeekOnline Examination: 50 Marks Practical:
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 3:00-4:00 PM.
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.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Lecture#15. Cache Function The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that.
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.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
1  1998 Morgan Kaufmann Publishers Chapter Seven.
Virtual Memory From course notes University of Waikato. Some material by Tony McGregor Other material from: The Architecture.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Memory.
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
Memory Management Chapter 5 Advanced Operating System.
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.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 33 Paging Read Ch. 9.4.
Introduction to Paging. Readings r 4.3 of the text book.
Memory: Page Table Structure
Lecture 3 Memory.
Chapter 8: Main Memory.
Section 9: Virtual Memory (VM)
COMBINED PAGING AND SEGMENTATION
Chapter 8: Main Memory.
Operating System Concepts
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
MEMORY MANAGEMENT & their issues
ECE 445 – Computer Organization
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.
Multistep Processing of a User Program
Computer Architecture
Module IV Memory Organization.
Main Memory Background Swapping Contiguous Allocation Paging
MICROPROCESSOR MEMORY ORGANIZATION
Chapter 8: Memory management
COT 4600 Operating Systems Spring 2011
Memory Management by Segmentation
Overheads for Computers as Components 2nd ed.
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Contents Memory types & memory hierarchy Virtual memory (VM)
Virtual Memory 1 1.
Page Main Memory.
Presentation transcript:

© 2000 Morgan Kaufman Overheads for Computers as Components CPUs: Memory System Mechanism zMicroprocessor clock rates are increasing zMemories are falling behind microprocessor clocks zCaches: Increase average performance of the memory system zMemory management: Perform address translation to provide a larger virtual memory space in a smaller physical memory

© 2000 Morgan Kaufman Overheads for Computers as Components Cache: To speed up memory access time CPU cache controller cache main memory data address data address Mediates between CPU and memory system (cache and main memory) Holds copies of some of the contents of main memory

© 2000 Morgan Kaufman Overheads for Computers as Components Cache operation zMany main memory locations are mapped onto one cache entry. zMay have caches for: yinstructions; ydata; ydata + instructions (unified). zMemory access time is no longer deterministic.

© 2000 Morgan Kaufman Overheads for Computers as Components Terms zCache controller sends memory requests: - If in cache  read from cache - If not  controller waits for value from memory and forwards it to CPU zCache hit: required location is in cache. zCache miss: required location is not in cache  victim?

© 2000 Morgan Kaufman Overheads for Computers as Components Memory system performance zh = cache hit probability zt cache = cache access time, t main = main memory access time. zAverage memory access time: yt av = ht cache + (1-h)t main ~5ns ns (DRAM)

© 2000 Morgan Kaufman Overheads for Computers as Components Multiple levels of cache CPU L1 cache L2 cache May also be on-chip memory Off-chip memory: Larger but slower

© 2000 Morgan Kaufman Overheads for Computers as Components Multi-level cache access time zh 1 = cache hit rate. zh 2 = rate for miss on L1, hit on L2. zAverage memory access time: yt av = h 1 t L1 + h 2 t L2 + (1- h 2 -h 1 )t main

© 2000 Morgan Kaufman Overheads for Computers as Components Memory management units z Logical address vs physical address z Example- Rabbit 16 bit microprocessor: x64k logical address space (16 bit), x1Mb physical address space (20 bit) z MMU translates 16bit logical address to 20 bit physical address

© 2000 Morgan Kaufman Overheads for Computers as Components Z180: 3 registers CBAR (common/bank address register, CBR common base register), BBR (bank base register) Root memory BIOS (Flash) Extended memory FFFFF 0000 FFFF commbank E CBR BBR CBAR Root code grows from here up Root data grows from here down Physical memory Point to physical memory Added to CBR/BBR

© 2000 Morgan Kaufman Overheads for Computers as Components MMU zMemory management unit (MMU): Translates addresses between CPU and Physical Memory (memory mapping) zEarly computers used MMU to compensate for limited address space in instruction set zFor modern CPUS’s MMU is used for “virtual addressing”

© 2000 Morgan Kaufman Overheads for Computers as Components … Memory management units zMemory management unit (MMU) translates addresses: CPU main memory management unit logical address physical address Multiple programs Secondary Storage for virtual memory swapping data RAM address

© 2000 Morgan Kaufman Overheads for Computers as Components Memory management tasks zAllows programs to move in physical memory during execution. zOne can change physical program location by changing MMU’s tables  No data/code change zAllows virtual memory: ymemory images kept in secondary storage; yimages returned to main memory on demand during execution.

© 2000 Morgan Kaufman Overheads for Computers as Components Address translation zRequires some sort of register/table to allow arbitrary mappings of logical to physical addresses. zTwo basic schemes: ySegmented: large, arbitrary sized region of memory yProgram fragmentation: Program scattered around physical memory yPaged: small equally sized regions zSegmentation and paging can be combined (x86): Segmented, paged scheme.

© 2000 Morgan Kaufman Overheads for Computers as Components Segments and pages memory segment 1 segment 2 page 1 page 2 Uniform size: Simplifies hardware Specified by: Start Address + Size Physical memory

© 2000 Morgan Kaufman Overheads for Computers as Components Segment address translation segment base addresslogical address range check physical address + range error segment lower bound segment upper bound Currently active segment Extracted from an instruction

© 2000 Morgan Kaufman Overheads for Computers as Components Page address translation Pages are small: 512-4k page numberoffset pageoffset page i base concatenate Logical address Physical address