尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
STUDY OF FUNCTIONING OF
CACHE MEMORY AND ITS
LATEST DEVELOPMENTS IN
CACHE MEMORY
WHAT IS CACHE ?
A cache memory is a fast and relatively
small memory, that stores the most recently
used (MRU) main memory(MM) (or working
memory) data.
It is simply a copy of a small data segment
residing in the main memory.
Hold identical copies of main memory.
The function of this is to speed up the MM
data access.
Memories that consists of circuits capable of retaining their state
as long as power is applied are known as static memory.
Less expensive RAM‟s can be implemented if simplex calls are
used such cells cannot retain their state indefinitely. Hence they
are called Dynamic RAM’s (DRAM). The information stored in a
dynamic memory cell in the form of a charge on a capacitor and
this charge can be maintained only for tens of Milliseconds.
Latency is one of the parameter indicating good performance
Latency: It refers to the amount of time it takes to transfer a word
of data to or from the memory.
Functional principles of the cache memory
 In MM read operation, the cache controller first of all
checks if the data is stored in cache.
In case of match (Hit - cache hit ) the data is fastly and
directly supplied from the cache to the processor
without involving the MM.
 Else (Miss - cache miss ) the data is read from MM.
 A cache hit is a state in which data requested for
processing by a component or application is found in
the cache memory. It is a faster means of delivering
data to the processor, as the cache already contains
the requested data.
 A cache hit occurs when an application or software
requests data. First, the CPU looks for the data in its
closest memory location, which is usually the primary
cache. If the requested data is found in the cache, it is
considered a cache hit.
 A cache hit serves data more quickly, as the data can be
retrieved by reading the cache memory.
Cache miss is a state where the data requested for
processing by a component or application is not found in
the cache memory. It causes execution delays by
requiring the program or application to fetch the data
from other cache levels or the main memory.
 Each cache miss slows down the overall process because
after a cache miss, the CPU will look for a higher level
cache, such as L1, L2, L3 and RAM for that data.
Further, a new entry is created and copied in cache
before it can be accessed by the processor.
 The more cache hits the better.
Cache Memory operation is based on two
major "principles of locality"
Temporal locality
 Spatial locality'
Temporal locality
Data which have been used recently have high likelihood of
being used again.
A cache stores only a subset of MM data – the most recent-used
MRU. Data read from MM are temporary stored in cache. If the
processor requires the same data, this is supplied by the cache.
Spatial locality
If a data is referenced, it is very likely that nearby data will be
accessed soon.
Instructions and data are transferred from MM to the cache in
fixed blocks (cache block), known as cache lines. Cache line
size is in the range of 4 to 512 bytes.
Most programs are highly sequential. Next instruction usually
comes from the next memory location. Data is usually
structured and data in these structures normally are stored in
contiguous memory locations (data strings, arrays, etc.).
Large lines size increase the spatial locality but increase also the
number of invalidated data in case of line replacement .
MAPPING FUNCTIONS
1. Direct mapping
 The simplest way to determine cache locations in which to store
memoty blocks is the direct mapping technique.
2. Associative mapping
 In this method, the main memory block can be placed into any cache
block position.
 12 tag bits will identify a memory block when it is resolved in the
cache.
 The tag bits of an address received from the processor are compared
to the tag bits of each block of the cache to see if the desired block is
persent.This is called associative mapping.
3. Set-associative mapping
 It is the combination of direct and associative mapping. The blocks of
the cache are grouped into sets and the mapping allows a block of the
main memory to reside in any block of the specified set.
Block 1
Block 0
Block 127
Block 0
Block 1
Block 127
Block 128
Block 129
Block 255
Block 256
Block 257
Block 4095
tag
tag
tag
cache
Main
memory
DIRECTION MAPPING
Block 1
Block 0
Block 127
Block 0
Block 1
Block i
Block 257
Block 4095
tag
tag
tag
cache
Main
memory
ASSOCIATIVE MAPPING
Block 1
Block 0
Block 126
Block 0
Block 1
Block 63
Block 64
Block 65
Block 127
Block 128
Block 129
Block 4095
tag
tag
tag
cache
Main
memory
Block 2
Block 3
tag
tag
Block 127tag
Set 0
Set 1
Set 63
SET-ASSOCIATIVE MAPPING
 The Cache memory stores a reasonable number of blocks at a given
time but this number is small compared to the total number of blocks
available in Main Memory.
 The correspondence between main memory block and the block in
cache memory is specified by a mapping function.
 The Cache control hardware decide that which block should be
removed to create space for the new block that contains the
referenced word. The collection of rule for making this decision is
called the replacement algorithm.
 The cache control circuit determines whether the requested word
currently exists in the cache. If it exists, then Read/Write operation
will take place on appropriate cache location.
 In this case Read/Write hit will occur.
REPLACEMENT POLICIES
1. First In First Out (FIFO)
Using this algorithm the cache behaves in the same way as a FIFO
queue. The cache evicts the first block accessed first without any regard
to how often or how many times it was accessed before.
2. Last In First Out (LIFO)
Using this algorithm the cache behaves in the exact opposite way as a
FIFO queue. The cache evicts the block accessed most recently first
without any regard to how often or how many times it was accessed
before.
3. Least Recently Used (LRU)
Discards the least recently used items first. This algorithm requires
keeping track of what was used when, which is expensive if one wants
to make sure the algorithm always discards the least recently used item.
General implementations of this technique require keeping "age bits" for
cache-lines and track the "Least Recently Used" cache-line based on
THANK YOU

More Related Content

What's hot

Computer architecture memory system
Computer architecture memory systemComputer architecture memory system
Computer architecture memory system
Mazin Alwaaly
 
Cache memory
Cache memoryCache memory
Cache memory
Ansari Maviya
 
Cache memory
Cache memoryCache memory
Cache memory
Abir Rahman
 
Memory management ppt coa
Memory management ppt coaMemory management ppt coa
Memory management ppt coa
Bharti Khemani
 
Memory management
Memory managementMemory management
Memory management
Vishal Singh
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
rprajat007
 
cache memory
cache memorycache memory
Memory system
Memory systemMemory system
Memory system
gourav kottawar
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
Rajapriya82
 
Virtual memory presentation
Virtual memory presentationVirtual memory presentation
Virtual memory presentation
Ranjeet Kumar
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
Anuj Modi
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
Mazin Alwaaly
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
Faisal Hussain
 
Cache memory
Cache memoryCache memory
Cache memory
Ahsan Ashfaq
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
Anwal Mirza
 
VIRTUAL MEMORY
VIRTUAL MEMORYVIRTUAL MEMORY
VIRTUAL MEMORY
Kamran Ashraf
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memory
Deepak John
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
tamizh arthanari
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
Stella526835
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
Zubair Khalid
 

What's hot (20)

Computer architecture memory system
Computer architecture memory systemComputer architecture memory system
Computer architecture memory system
 
Cache memory
Cache memoryCache memory
Cache memory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory management ppt coa
Memory management ppt coaMemory management ppt coa
Memory management ppt coa
 
Memory management
Memory managementMemory management
Memory management
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
cache memory
cache memorycache memory
cache memory
 
Memory system
Memory systemMemory system
Memory system
 
contiguous memory allocation.pptx
contiguous memory allocation.pptxcontiguous memory allocation.pptx
contiguous memory allocation.pptx
 
Virtual memory presentation
Virtual memory presentationVirtual memory presentation
Virtual memory presentation
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Cache memory
Cache memoryCache memory
Cache memory
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
 
VIRTUAL MEMORY
VIRTUAL MEMORYVIRTUAL MEMORY
VIRTUAL MEMORY
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memory
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
 

Similar to Cache memory ppt

CPU Caching Concepts
CPU Caching ConceptsCPU Caching Concepts
CPU Caching Concepts
Abhijit K Rao
 
Cpu caching concepts mr mahesh
Cpu caching concepts mr maheshCpu caching concepts mr mahesh
Cpu caching concepts mr mahesh
Faridabad
 
Cache memory
Cache memoryCache memory
Cache memory
Abir Rahman
 
IS 139 Lecture 7
IS 139 Lecture 7IS 139 Lecture 7
IS 139 Lecture 7
wajanga
 
lecture-5.pptx
lecture-5.pptxlecture-5.pptx
lecture-5.pptx
sarasaad69
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
Mazin Alwaaly
 
computerarchitecturecachememory-170927134432.pdf
computerarchitecturecachememory-170927134432.pdfcomputerarchitecturecachememory-170927134432.pdf
computerarchitecturecachememory-170927134432.pdf
ssuserf86fba
 
CA UNIT V..pptx
CA UNIT V..pptxCA UNIT V..pptx
CA UNIT V..pptx
ssuser9dbd7e
 
Cache memory
Cache memoryCache memory
Cache memory
Muhammad Imran
 
MODULE-4 - Memory-System used in Computer organization
MODULE-4 - Memory-System used in Computer organizationMODULE-4 - Memory-System used in Computer organization
MODULE-4 - Memory-System used in Computer organization
MadhuraNK
 
cachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdfcachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdf
OmGadekar2
 
Cache memory and cache
Cache memory and cacheCache memory and cache
Cache memory and cache
VISHAL DONGA
 
Cache memory
Cache memoryCache memory
Cache memory
Eklavya Gupta
 
lecture-2-3_Memory.pdf,describing memory
lecture-2-3_Memory.pdf,describing memorylecture-2-3_Memory.pdf,describing memory
lecture-2-3_Memory.pdf,describing memory
floraaluoch3
 
computer-memory
computer-memorycomputer-memory
computer-memory
Bablu Shofi
 
Cache simulator
Cache simulatorCache simulator
Cache simulator
Suraj Saini
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
ssusere16bd9
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
Ashik Iqbal
 
Cache memory ...
Cache memory ...Cache memory ...
Cache memory ...
Pratik Farkya
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
Perfectly Perfect
 

Similar to Cache memory ppt (20)

CPU Caching Concepts
CPU Caching ConceptsCPU Caching Concepts
CPU Caching Concepts
 
Cpu caching concepts mr mahesh
Cpu caching concepts mr maheshCpu caching concepts mr mahesh
Cpu caching concepts mr mahesh
 
Cache memory
Cache memoryCache memory
Cache memory
 
IS 139 Lecture 7
IS 139 Lecture 7IS 139 Lecture 7
IS 139 Lecture 7
 
lecture-5.pptx
lecture-5.pptxlecture-5.pptx
lecture-5.pptx
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
 
computerarchitecturecachememory-170927134432.pdf
computerarchitecturecachememory-170927134432.pdfcomputerarchitecturecachememory-170927134432.pdf
computerarchitecturecachememory-170927134432.pdf
 
CA UNIT V..pptx
CA UNIT V..pptxCA UNIT V..pptx
CA UNIT V..pptx
 
Cache memory
Cache memoryCache memory
Cache memory
 
MODULE-4 - Memory-System used in Computer organization
MODULE-4 - Memory-System used in Computer organizationMODULE-4 - Memory-System used in Computer organization
MODULE-4 - Memory-System used in Computer organization
 
cachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdfcachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdf
 
Cache memory and cache
Cache memory and cacheCache memory and cache
Cache memory and cache
 
Cache memory
Cache memoryCache memory
Cache memory
 
lecture-2-3_Memory.pdf,describing memory
lecture-2-3_Memory.pdf,describing memorylecture-2-3_Memory.pdf,describing memory
lecture-2-3_Memory.pdf,describing memory
 
computer-memory
computer-memorycomputer-memory
computer-memory
 
Cache simulator
Cache simulatorCache simulator
Cache simulator
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
 
Cache memory ...
Cache memory ...Cache memory ...
Cache memory ...
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 

Recently uploaded

The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
Guangdong Ctube Industry Co., Ltd.
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
Pallavi Sharma
 
Lateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptxLateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptx
DebendraDevKhanal1
 
Cricket management system ptoject report.pdf
Cricket management system ptoject report.pdfCricket management system ptoject report.pdf
Cricket management system ptoject report.pdf
Kamal Acharya
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
gapboxn
 
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
dulbh kashyap
 
Covid Management System Project Report.pdf
Covid Management System Project Report.pdfCovid Management System Project Report.pdf
Covid Management System Project Report.pdf
Kamal Acharya
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
felixwold
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
paraasingh12 #V08
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
Lubi Valves
 
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Dr.Costas Sachpazis
 
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
shourabjaat424
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
drshikhapandey2022
 
Intuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sdeIntuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sde
ShivangMishra54
 
BBOC407 Module 1.pptx Biology for Engineers
BBOC407  Module 1.pptx Biology for EngineersBBOC407  Module 1.pptx Biology for Engineers
BBOC407 Module 1.pptx Biology for Engineers
sathishkumars808912
 
Online train ticket booking system project.pdf
Online train ticket booking system project.pdfOnline train ticket booking system project.pdf
Online train ticket booking system project.pdf
Kamal Acharya
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine
 
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call GirlCall Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
sapna sharmap11
 
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
sexytaniya455
 
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl LucknowCall Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
yogita singh$A17
 

Recently uploaded (20)

The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
 
Lateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptxLateral load-resisting systems in buildings.pptx
Lateral load-resisting systems in buildings.pptx
 
Cricket management system ptoject report.pdf
Cricket management system ptoject report.pdfCricket management system ptoject report.pdf
Cricket management system ptoject report.pdf
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
🚺ANJALI MEHTA High Profile Call Girls Ahmedabad 💯Call Us 🔝 9352988975 🔝💃Top C...
 
Covid Management System Project Report.pdf
Covid Management System Project Report.pdfCovid Management System Project Report.pdf
Covid Management System Project Report.pdf
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
 
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
 
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
Call Girls Chandigarh 🔥 7014168258 🔥 Real Fun With Sexual Girl Available 24/7...
 
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUESAN INTRODUCTION OF AI & SEARCHING TECHIQUES
AN INTRODUCTION OF AI & SEARCHING TECHIQUES
 
Intuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sdeIntuit CRAFT demonstration presentation for sde
Intuit CRAFT demonstration presentation for sde
 
BBOC407 Module 1.pptx Biology for Engineers
BBOC407  Module 1.pptx Biology for EngineersBBOC407  Module 1.pptx Biology for Engineers
BBOC407 Module 1.pptx Biology for Engineers
 
Online train ticket booking system project.pdf
Online train ticket booking system project.pdfOnline train ticket booking system project.pdf
Online train ticket booking system project.pdf
 
Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024Better Builder Magazine, Issue 49 / Spring 2024
Better Builder Magazine, Issue 49 / Spring 2024
 
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call GirlCall Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
Call Girls Goa (india) ☎️ +91-7426014248 Goa Call Girl
 
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
 
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl LucknowCall Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
 

Cache memory ppt

  • 1. STUDY OF FUNCTIONING OF CACHE MEMORY AND ITS LATEST DEVELOPMENTS IN CACHE MEMORY
  • 2. WHAT IS CACHE ? A cache memory is a fast and relatively small memory, that stores the most recently used (MRU) main memory(MM) (or working memory) data. It is simply a copy of a small data segment residing in the main memory. Hold identical copies of main memory. The function of this is to speed up the MM data access.
  • 3.
  • 4. Memories that consists of circuits capable of retaining their state as long as power is applied are known as static memory. Less expensive RAM‟s can be implemented if simplex calls are used such cells cannot retain their state indefinitely. Hence they are called Dynamic RAM’s (DRAM). The information stored in a dynamic memory cell in the form of a charge on a capacitor and this charge can be maintained only for tens of Milliseconds. Latency is one of the parameter indicating good performance Latency: It refers to the amount of time it takes to transfer a word of data to or from the memory.
  • 5.
  • 6.
  • 7. Functional principles of the cache memory  In MM read operation, the cache controller first of all checks if the data is stored in cache. In case of match (Hit - cache hit ) the data is fastly and directly supplied from the cache to the processor without involving the MM.  Else (Miss - cache miss ) the data is read from MM.  A cache hit is a state in which data requested for processing by a component or application is found in the cache memory. It is a faster means of delivering data to the processor, as the cache already contains the requested data.
  • 8.  A cache hit occurs when an application or software requests data. First, the CPU looks for the data in its closest memory location, which is usually the primary cache. If the requested data is found in the cache, it is considered a cache hit.  A cache hit serves data more quickly, as the data can be retrieved by reading the cache memory. Cache miss is a state where the data requested for processing by a component or application is not found in the cache memory. It causes execution delays by requiring the program or application to fetch the data from other cache levels or the main memory.
  • 9.  Each cache miss slows down the overall process because after a cache miss, the CPU will look for a higher level cache, such as L1, L2, L3 and RAM for that data. Further, a new entry is created and copied in cache before it can be accessed by the processor.  The more cache hits the better.
  • 10. Cache Memory operation is based on two major "principles of locality" Temporal locality  Spatial locality' Temporal locality Data which have been used recently have high likelihood of being used again. A cache stores only a subset of MM data – the most recent-used MRU. Data read from MM are temporary stored in cache. If the processor requires the same data, this is supplied by the cache.
  • 11. Spatial locality If a data is referenced, it is very likely that nearby data will be accessed soon. Instructions and data are transferred from MM to the cache in fixed blocks (cache block), known as cache lines. Cache line size is in the range of 4 to 512 bytes. Most programs are highly sequential. Next instruction usually comes from the next memory location. Data is usually structured and data in these structures normally are stored in contiguous memory locations (data strings, arrays, etc.). Large lines size increase the spatial locality but increase also the number of invalidated data in case of line replacement .
  • 12. MAPPING FUNCTIONS 1. Direct mapping  The simplest way to determine cache locations in which to store memoty blocks is the direct mapping technique. 2. Associative mapping  In this method, the main memory block can be placed into any cache block position.  12 tag bits will identify a memory block when it is resolved in the cache.  The tag bits of an address received from the processor are compared to the tag bits of each block of the cache to see if the desired block is persent.This is called associative mapping. 3. Set-associative mapping  It is the combination of direct and associative mapping. The blocks of the cache are grouped into sets and the mapping allows a block of the main memory to reside in any block of the specified set.
  • 13. Block 1 Block 0 Block 127 Block 0 Block 1 Block 127 Block 128 Block 129 Block 255 Block 256 Block 257 Block 4095 tag tag tag cache Main memory DIRECTION MAPPING
  • 14. Block 1 Block 0 Block 127 Block 0 Block 1 Block i Block 257 Block 4095 tag tag tag cache Main memory ASSOCIATIVE MAPPING
  • 15. Block 1 Block 0 Block 126 Block 0 Block 1 Block 63 Block 64 Block 65 Block 127 Block 128 Block 129 Block 4095 tag tag tag cache Main memory Block 2 Block 3 tag tag Block 127tag Set 0 Set 1 Set 63 SET-ASSOCIATIVE MAPPING
  • 16.  The Cache memory stores a reasonable number of blocks at a given time but this number is small compared to the total number of blocks available in Main Memory.  The correspondence between main memory block and the block in cache memory is specified by a mapping function.  The Cache control hardware decide that which block should be removed to create space for the new block that contains the referenced word. The collection of rule for making this decision is called the replacement algorithm.  The cache control circuit determines whether the requested word currently exists in the cache. If it exists, then Read/Write operation will take place on appropriate cache location.  In this case Read/Write hit will occur.
  • 17. REPLACEMENT POLICIES 1. First In First Out (FIFO) Using this algorithm the cache behaves in the same way as a FIFO queue. The cache evicts the first block accessed first without any regard to how often or how many times it was accessed before. 2. Last In First Out (LIFO) Using this algorithm the cache behaves in the exact opposite way as a FIFO queue. The cache evicts the block accessed most recently first without any regard to how often or how many times it was accessed before. 3. Least Recently Used (LRU) Discards the least recently used items first. This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. General implementations of this technique require keeping "age bits" for cache-lines and track the "Least Recently Used" cache-line based on
  翻译: