cache addressing basics
play

CacheAddressingBasics CS654 September27,2001 WhatisaCache? - PowerPoint PPT Presentation

CacheAddressingBasics CS654 September27,2001 WhatisaCache? SmallmemoryclosetoCPU TypicallySRAM Hencefast Henceexpensivetoo! Processor memorygap


  1. Cache�Addressing�Basics CS654�– September�27,�2001

  2. What�is�a�Cache? • Small�memory�close�to�CPU • Typically�SRAM� – Hence�fast – Hence�expensive�too! • Processor�– memory�gap • Principle�of�locality�– make�the�common� case�fast!

  3. Memory�Hierarchy Registers Cache�levels Main�memory Disk�(Virtual�memory) Each�level�is�a�‘cache’�for�lower�levels

  4. Placement • Units�of�transfer�– ‘blocks’�or�‘lines’ • ‘Hit’�and�‘Miss’ • Fully�associative,�Direct�mapped,�Set� associative • Cache�size�=�bytes/line��*��lines/set�*� sets/cache�(some�numerical�examples) • Why�these�types?�– speed/hit�rate�tradeoff

  5. Terminology�(digression!) • Replacement�– LRU,�random • Write�back�/�Write�through • Write�allocate,�no�write�allocate

  6. Address�make�up • Tag,�index�and�offset Block�Address����������������������Block Tag Index offset

  7. Typical�organization Tag�������Index Cache� Cache� tags data (sets) MUX�

  8. Some�examples� • 128M�physical�memory – 64K�direct�mapped��with�64�byte�lines – 16K�4-way�with�32�byte�lines

  9. Virtual�Memory • Protection,�address�spaces,�virtual�memory • Paging�and�segmentation • Similarity�with�caches • Address�translation • TLB�– cache�of�the�translation�(why?)

  10. Organization Virtual�page�number����������������������Offset TLB Physical�page�number��������������������Offset

  11. Physical�Address�with�TLB� Block�Address����������������������Block Tag Index offset Page�number��������������������������Offset • Virtual�vs�physical�indexing • Virtual�index�physical�tag!

  12. Some�examples • 32�bit�virtual�address,�128�MB�main� memory,�128�entry�fully�associative�TLB,� 64K�cache,��64�byte�lines

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend