SlideShare a Scribd company logo
1 of 15
CSC 2107– COMPUTER ORGANIZATION
AND ARCHITECTURE
UNIT 6_2
CACHE MEMORY
Bachelors of Science in Computer Science
© IUEA – 2020. 8/17/2022
 Cache Memory
 What is cache memory
 Cache memory characteristics
 Cache memory mapping techniques
 Virtual memory
Outline
© IUEA – 2020. 8/17/2022
 At the end of the lecture, students should be
able to:
 Describe cache memory and its uses
 Describe elements and characteristics of cache
memory
 Explain cache memory mapping techniques
 Describe virtual memory and its uses
Learning outcomes
3
© IUEA – 2020. 8/17/2022
Cache
 Small amount of fast memory
 Sits between normal main memory and CPU
 May be located on CPU chip or module
© IUEA – 2020. 8/17/2022
Elements of cache memory
© IUEA – 2020. 8/17/2022
Cache Read Operation
© IUEA – 2020. 8/17/2022
Characteristics
 Location
 CPU, Internal and external memory
 Capacity
 Measured in terms of
 Word size
 The natural unit of organisation
 Number of words or Bytes
 Unit of Transfer
 Internal
 Usually governed by data bus width
 External
 Usually a block which is much larger than a word
 Addressable unit
 Smallest location which can be uniquely addressed
 Word internally
 Cluster on M$ disks
© IUEA – 2020. 8/17/2022
Characteristics
 Access method
 Sequential
 Start at the beginning and read through in order
 Access time depends on location of data and previous location
 e.g. tape
 Direct
 Individual blocks have unique address
 Access is by jumping to vicinity plus sequential search
 Access time depends on location and previous location
 e.g. disk
 Random
 Individual addresses identify locations exactly
 Access time is independent of location or previous access
 e.g. RAM
 Associative
 Data is located by a comparison with contents of a portion of the store
 Access time is independent of location or previous access
 e.g. cache
© IUEA – 2020. 8/17/2022
Characteristics
 Performance
 Access time
 Time between presenting the address and getting the valid data
 Memory Cycle time
 Time may be required for the memory to “recover” before next access
 Cycle time is access + recovery
 Transfer Rate
 Rate at which data can be moved
 Physical type
 Semiconductor
 RAM
 Magnetic
 Disk & Tape
 Optical
 CD & DVD
 Others
 Bubble
 Hologram
© IUEA – 2020. 8/17/2022
Characteristics
 Physical characteristics
 Decay
 Volatility
 Erasable
 Power consumption
 Organisation
 Physical arrangement of bits into words
 Not always obvious
 e.g. interleaved
© IUEA – 2020. 8/17/2022
Memory Hierarchy
 Registers
 In CPU
 Internal or Main memory
 May include one or more levels of cache
 “RAM”
 External memory
 Backing store
 Hierarchy List
 Registers
 L1 Cache
 L2 Cache
 Main memory
 Disk cache
 Disk
 Optical
 Tape
© IUEA – 2020. 8/17/2022
Typical Cache Organization
© IUEA – 2020. 8/17/2022
Mapping functions
 Cache mapping
 a means for determining which main memory block currently
occupies a cache line
 Three types
 Direct mapping
 Maps each block of main memory into only one possible cache line
 Associative
 Permits each main memory block to be loaded into any line of the
cache
 The cache control logic interprets a memory address
simply as a Tag and a Word field.
 The Tag field uniquely identifies a block of main memory
 Set associative
 The cache consists of number sets, each of which consists of a
number of lines
 Each word maps into all the cache lines in a specific set
© IUEA – 2020. 8/17/2022
 William Stallings, Computer Organization and
Architecture, 9th Edition
 Chapter 4
Reading list
14
© IUEA – 2020. 8/17/2022
15
Thank you

More Related Content

Similar to Unit_06_2_Cache_Memory.pptx

Realizing Exabyte-scale PM Centric Architectures and Memory Fabrics
Realizing Exabyte-scale PM Centric Architectures and Memory FabricsRealizing Exabyte-scale PM Centric Architectures and Memory Fabrics
Realizing Exabyte-scale PM Centric Architectures and Memory Fabrics
inside-BigData.com
 
cachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdfcachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdf
OmGadekar2
 

Similar to Unit_06_2_Cache_Memory.pptx (20)

Memory management ppt coa
Memory management ppt coaMemory management ppt coa
Memory management ppt coa
 
What is the average rotational latency of this disk drive What seek.docx
 What is the average rotational latency of this disk drive  What seek.docx What is the average rotational latency of this disk drive  What seek.docx
What is the average rotational latency of this disk drive What seek.docx
 
Ijiret archana-kv-increasing-memory-performance-using-cache-optimizations-in-...
Ijiret archana-kv-increasing-memory-performance-using-cache-optimizations-in-...Ijiret archana-kv-increasing-memory-performance-using-cache-optimizations-in-...
Ijiret archana-kv-increasing-memory-performance-using-cache-optimizations-in-...
 
Realizing Exabyte-scale PM Centric Architectures and Memory Fabrics
Realizing Exabyte-scale PM Centric Architectures and Memory FabricsRealizing Exabyte-scale PM Centric Architectures and Memory Fabrics
Realizing Exabyte-scale PM Centric Architectures and Memory Fabrics
 
04 Cache Memory
04  Cache  Memory04  Cache  Memory
04 Cache Memory
 
Storage Geeks 101 - 2019
Storage Geeks 101 - 2019Storage Geeks 101 - 2019
Storage Geeks 101 - 2019
 
Ch07-OS9e.pptx
Ch07-OS9e.pptxCh07-OS9e.pptx
Ch07-OS9e.pptx
 
Operating Systems Part III-Memory Management
Operating Systems Part III-Memory ManagementOperating Systems Part III-Memory Management
Operating Systems Part III-Memory Management
 
Cache memory
Cache memoryCache memory
Cache memory
 
Ch8
Ch8Ch8
Ch8
 
Computer Memory Finder
Computer Memory FinderComputer Memory Finder
Computer Memory Finder
 
Mass storage structurefinal
Mass storage structurefinalMass storage structurefinal
Mass storage structurefinal
 
Grade11_Q1_W8_PerformMensuration_final.pdf
Grade11_Q1_W8_PerformMensuration_final.pdfGrade11_Q1_W8_PerformMensuration_final.pdf
Grade11_Q1_W8_PerformMensuration_final.pdf
 
UNIT 3.docx
UNIT 3.docxUNIT 3.docx
UNIT 3.docx
 
Write miss
Write missWrite miss
Write miss
 
CS304PC:Computer Organization and Architecture Session 29 Memory organization...
CS304PC:Computer Organization and Architecture Session 29 Memory organization...CS304PC:Computer Organization and Architecture Session 29 Memory organization...
CS304PC:Computer Organization and Architecture Session 29 Memory organization...
 
Cache Memory
Cache MemoryCache Memory
Cache Memory
 
cachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdfcachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdf
 
PowerAlluxio
PowerAlluxioPowerAlluxio
PowerAlluxio
 
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
Understanding Solid State Disk and the Oracle Database Flash Cache (older ver...
 

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 

Recently uploaded (20)

Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 

Unit_06_2_Cache_Memory.pptx

  • 1. CSC 2107– COMPUTER ORGANIZATION AND ARCHITECTURE UNIT 6_2 CACHE MEMORY Bachelors of Science in Computer Science
  • 2. © IUEA – 2020. 8/17/2022  Cache Memory  What is cache memory  Cache memory characteristics  Cache memory mapping techniques  Virtual memory Outline
  • 3. © IUEA – 2020. 8/17/2022  At the end of the lecture, students should be able to:  Describe cache memory and its uses  Describe elements and characteristics of cache memory  Explain cache memory mapping techniques  Describe virtual memory and its uses Learning outcomes 3
  • 4. © IUEA – 2020. 8/17/2022 Cache  Small amount of fast memory  Sits between normal main memory and CPU  May be located on CPU chip or module
  • 5. © IUEA – 2020. 8/17/2022 Elements of cache memory
  • 6. © IUEA – 2020. 8/17/2022 Cache Read Operation
  • 7. © IUEA – 2020. 8/17/2022 Characteristics  Location  CPU, Internal and external memory  Capacity  Measured in terms of  Word size  The natural unit of organisation  Number of words or Bytes  Unit of Transfer  Internal  Usually governed by data bus width  External  Usually a block which is much larger than a word  Addressable unit  Smallest location which can be uniquely addressed  Word internally  Cluster on M$ disks
  • 8. © IUEA – 2020. 8/17/2022 Characteristics  Access method  Sequential  Start at the beginning and read through in order  Access time depends on location of data and previous location  e.g. tape  Direct  Individual blocks have unique address  Access is by jumping to vicinity plus sequential search  Access time depends on location and previous location  e.g. disk  Random  Individual addresses identify locations exactly  Access time is independent of location or previous access  e.g. RAM  Associative  Data is located by a comparison with contents of a portion of the store  Access time is independent of location or previous access  e.g. cache
  • 9. © IUEA – 2020. 8/17/2022 Characteristics  Performance  Access time  Time between presenting the address and getting the valid data  Memory Cycle time  Time may be required for the memory to “recover” before next access  Cycle time is access + recovery  Transfer Rate  Rate at which data can be moved  Physical type  Semiconductor  RAM  Magnetic  Disk & Tape  Optical  CD & DVD  Others  Bubble  Hologram
  • 10. © IUEA – 2020. 8/17/2022 Characteristics  Physical characteristics  Decay  Volatility  Erasable  Power consumption  Organisation  Physical arrangement of bits into words  Not always obvious  e.g. interleaved
  • 11. © IUEA – 2020. 8/17/2022 Memory Hierarchy  Registers  In CPU  Internal or Main memory  May include one or more levels of cache  “RAM”  External memory  Backing store  Hierarchy List  Registers  L1 Cache  L2 Cache  Main memory  Disk cache  Disk  Optical  Tape
  • 12. © IUEA – 2020. 8/17/2022 Typical Cache Organization
  • 13. © IUEA – 2020. 8/17/2022 Mapping functions  Cache mapping  a means for determining which main memory block currently occupies a cache line  Three types  Direct mapping  Maps each block of main memory into only one possible cache line  Associative  Permits each main memory block to be loaded into any line of the cache  The cache control logic interprets a memory address simply as a Tag and a Word field.  The Tag field uniquely identifies a block of main memory  Set associative  The cache consists of number sets, each of which consists of a number of lines  Each word maps into all the cache lines in a specific set
  • 14. © IUEA – 2020. 8/17/2022  William Stallings, Computer Organization and Architecture, 9th Edition  Chapter 4 Reading list 14
  • 15. © IUEA – 2020. 8/17/2022 15 Thank you