SlideShare a Scribd company logo
Presented To-
Nur Imtiazul Haque
Lecturer,Dept. Of CSE
Daffodil International University
Presentation OnCache Memory
1
Group members
1.Humayra Khanum
ID : 161-15-7325
2.Rezwana Islam Ria
ID :161-15-7071
2
What is Cache Memory?
Cache memory isasmall, high-speedRAMbufferlocated
between the CPUandmain memory.
Cache memory holds a copy of the instructions (instruction
cache) or data (operand or data cache) currently being used
bythe CPU.
The main purpose of a cache is to accelerate your computer
whilekeepingthe price ofthe computer low.
3
Placement of Cache in computer
4
Instruction Cache
• Theinstruction cacheis usedto store
instructions.
• Helps to reduce the cost of going to memory to
fetchinstructions.
• Holds several other things, likebranch
prediction information.
• Example:- Theinstruction cacheon Ultra SPARC
pre-decodes the incominginstruction
5
Data Cache
• Data cacheis afast buffer that containsthe
application data.
• Before the processor can operate on the data, it
must be loaded from memory into the data
cache.
• Then loaded from the cache line into a register
and instruction using this value canoperateon it.
• The resultant value is stored in a register. Then
register to cacheand cacheto mainmemory.
6
TLB Cache
• TLB–Translated LookasideBuffer.
• Also called ascontent-addressable
memory(CAM).
• It is acacheto store translatedaddresses.
• TheCPUcanonly operate on data and
instructions that are mapped into theTLB.
7
Hit Ratio
The ratio ofthe total number ofhits dividedbythe total
CPUaccessesto memory (i.e. hits plusmisses) iscalledHit
Ratio.
 Hit Ratio = Total Number of Hits / (Total
Number of Hits + Total Number of
Miss)
8
Name:
Rezwana
Islam Ria
ID:161-
15-7071
ASSOCIATIVE
MAPPINGAn associative mapping uses an associative memory.
The memory is being accessed using its contents.
Every line of cache memory will accommodate the
address and contents of the address.
This memory is also called Content addressable
memory.
1
0
Associative Mapping
1
1
Set Associative
MappingThat is the easy control of direct mapping cache
The more flexible mapping of the fully associative
cache.
Each location can have more than one pair of tag+data
items
It is more than one pair of tag and date .so if one cache
location is holding two pair of tag+data item ,that is
called 2way set associative mapping.
1
2
Two-Way Set
Associative Mapping
1
3
Replacement
Algorithms of Cache
Memory
It is used when there are no available space in a cache place in
data.
Four common cache replacement algorithms are
1.Least Recently Used (LRU)
-Replacement item Used by CPU
2.First-In-First-out (FIFO)
-Replacement item Used by cache from longest time
3.Least frequency Used (LFU)
-Replacement item used by CPU
4.Random
1
4
81
5

More Related Content

What's hot

Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208
Ameer Mehmood
 
Cache memory
Cache memory Cache memory
Cache memory
Zalal Udeen
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
Anwal Mirza
 
How the cpu works
How the cpu worksHow the cpu works
How the cpu works
Jordan_Heeley
 
CPU Caches
CPU CachesCPU Caches
CPU Caches
shinolajla
 
Cache memory
Cache memoryCache memory
Cache memory
George Thomas
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architectureaamc1100
 
Mapping
MappingMapping
Cache memory
Cache memoryCache memory
Cache memory
Shailesh Tanwar
 
Risc & cisk
Risc & ciskRisc & cisk
Ram and-rom-chips
Ram and-rom-chipsRam and-rom-chips
Ram and-rom-chipsAnuj Modi
 
What is Cache and how it works
What is Cache and how it worksWhat is Cache and how it works
What is Cache and how it works
Tabraiz Yaseen
 
Cache memory
Cache memoryCache memory
Cache memory
Ansari Maviya
 
Processor types
Processor typesProcessor types
Processor types
Amr Aboelgood
 
Intel Core i7 Processors
Intel Core i7 ProcessorsIntel Core i7 Processors
Intel Core i7 Processors
Anagh Vijayvargia
 
31 address binding, dynamic loading
31 address binding, dynamic loading31 address binding, dynamic loading
31 address binding, dynamic loadingmyrajendra
 
Deadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbianDeadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbian
saad symbian
 

What's hot (20)

Associative memory 14208
Associative memory 14208Associative memory 14208
Associative memory 14208
 
Cache memory
Cache memoryCache memory
Cache memory
 
Cache memory
Cache memory Cache memory
Cache memory
 
04 cache memory.ppt 1
04 cache memory.ppt 104 cache memory.ppt 1
04 cache memory.ppt 1
 
How the cpu works
How the cpu worksHow the cpu works
How the cpu works
 
CPU Caches
CPU CachesCPU Caches
CPU Caches
 
Cache memory
Cache memoryCache memory
Cache memory
 
0 introduction to computer architecture
0 introduction to computer architecture0 introduction to computer architecture
0 introduction to computer architecture
 
Mapping
MappingMapping
Mapping
 
Cache memory
Cache memoryCache memory
Cache memory
 
Risc & cisk
Risc & ciskRisc & cisk
Risc & cisk
 
Ram and-rom-chips
Ram and-rom-chipsRam and-rom-chips
Ram and-rom-chips
 
Risc
RiscRisc
Risc
 
What is Cache and how it works
What is Cache and how it worksWhat is Cache and how it works
What is Cache and how it works
 
Cache memory
Cache memoryCache memory
Cache memory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Processor types
Processor typesProcessor types
Processor types
 
Intel Core i7 Processors
Intel Core i7 ProcessorsIntel Core i7 Processors
Intel Core i7 Processors
 
31 address binding, dynamic loading
31 address binding, dynamic loading31 address binding, dynamic loading
31 address binding, dynamic loading
 
Deadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbianDeadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbian
 

Similar to Cache Memory Computer Architecture and organization

Unit 5-lecture-2
Unit 5-lecture-2Unit 5-lecture-2
Unit 5-lecture-2
vishal choudhary
 
Cache simulator
Cache simulatorCache simulator
Cache simulator
Suraj Saini
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
Johan Granados Montero
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
Mukesh Chinta
 
Cache Memory
Cache MemoryCache Memory
Cache Memory
Subid Biswas
 
cachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdfcachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdf
OmGadekar2
 
Cache memory ...
Cache memory ...Cache memory ...
Cache memory ...
Pratik Farkya
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
ssusere16bd9
 
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
 
Linux Internals - Interview essentials 3.0
Linux Internals - Interview essentials 3.0Linux Internals - Interview essentials 3.0
Linux Internals - Interview essentials 3.0
Emertxe Information Technologies Pvt Ltd
 
Memory Management
Memory ManagementMemory Management
Memory Management
Shipra Swati
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryAshik Iqbal
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
AshokRachapalli1
 
Operating System
Operating SystemOperating System
Operating System
Subhasis Dash
 
Operating system
Operating systemOperating system
Operating system
Hussain Ahmady
 
Advanced computer architechture -Memory Hierarchies and its Properties and Type
Advanced computer architechture -Memory Hierarchies and its Properties and TypeAdvanced computer architechture -Memory Hierarchies and its Properties and Type
Advanced computer architechture -Memory Hierarchies and its Properties and Type
LalfakawmaKh
 
CS6401 OPERATING SYSTEMS Unit 3
CS6401 OPERATING SYSTEMS Unit 3CS6401 OPERATING SYSTEMS Unit 3
CS6401 OPERATING SYSTEMS Unit 3
Kathirvel Ayyaswamy
 
Cache Memory- JMD.pptx
Cache Memory- JMD.pptxCache Memory- JMD.pptx
Cache Memory- JMD.pptx
JulianaMeiDuldulao
 
Memory organization
Memory organizationMemory organization
Memory organization
ishapadhy
 

Similar to Cache Memory Computer Architecture and organization (20)

Unit 5-lecture-2
Unit 5-lecture-2Unit 5-lecture-2
Unit 5-lecture-2
 
Cache simulator
Cache simulatorCache simulator
Cache simulator
 
Opetating System Memory management
Opetating System Memory managementOpetating System Memory management
Opetating System Memory management
 
Operating Systems - memory management
Operating Systems - memory managementOperating Systems - memory management
Operating Systems - memory management
 
Cache Memory
Cache MemoryCache Memory
Cache Memory
 
cachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdfcachememory-210517060741 (1).pdf
cachememory-210517060741 (1).pdf
 
Cache memory ...
Cache memory ...Cache memory ...
Cache memory ...
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
 
Cache memory and cache
Cache memory and cacheCache memory and cache
Cache memory and cache
 
Cache memory
Cache memoryCache memory
Cache memory
 
Linux Internals - Interview essentials 3.0
Linux Internals - Interview essentials 3.0Linux Internals - Interview essentials 3.0
Linux Internals - Interview essentials 3.0
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
 
Operating System
Operating SystemOperating System
Operating System
 
Operating system
Operating systemOperating system
Operating system
 
Advanced computer architechture -Memory Hierarchies and its Properties and Type
Advanced computer architechture -Memory Hierarchies and its Properties and TypeAdvanced computer architechture -Memory Hierarchies and its Properties and Type
Advanced computer architechture -Memory Hierarchies and its Properties and Type
 
CS6401 OPERATING SYSTEMS Unit 3
CS6401 OPERATING SYSTEMS Unit 3CS6401 OPERATING SYSTEMS Unit 3
CS6401 OPERATING SYSTEMS Unit 3
 
Cache Memory- JMD.pptx
Cache Memory- JMD.pptxCache Memory- JMD.pptx
Cache Memory- JMD.pptx
 
Memory organization
Memory organizationMemory organization
Memory organization
 

More from Humayra Khanum

System analysis and design - presentation
System analysis and design - presentation System analysis and design - presentation
System analysis and design - presentation
Humayra Khanum
 
About me / Myself
About me / MyselfAbout me / Myself
About me / Myself
Humayra Khanum
 
Embedded systems -Smart Cap
Embedded systems -Smart CapEmbedded systems -Smart Cap
Embedded systems -Smart Cap
Humayra Khanum
 
Deadloack-Operating System
Deadloack-Operating SystemDeadloack-Operating System
Deadloack-Operating System
Humayra Khanum
 
Final project presentation CSE
Final project presentation CSEFinal project presentation CSE
Final project presentation CSE
Humayra Khanum
 
IPv4 VS IPv6
IPv4 VS IPv6IPv4 VS IPv6
IPv4 VS IPv6
Humayra Khanum
 
Golden Ratio
Golden Ratio Golden Ratio
Golden Ratio
Humayra Khanum
 
Golden Ratio
Golden RatioGolden Ratio
Golden Ratio
Humayra Khanum
 

More from Humayra Khanum (8)

System analysis and design - presentation
System analysis and design - presentation System analysis and design - presentation
System analysis and design - presentation
 
About me / Myself
About me / MyselfAbout me / Myself
About me / Myself
 
Embedded systems -Smart Cap
Embedded systems -Smart CapEmbedded systems -Smart Cap
Embedded systems -Smart Cap
 
Deadloack-Operating System
Deadloack-Operating SystemDeadloack-Operating System
Deadloack-Operating System
 
Final project presentation CSE
Final project presentation CSEFinal project presentation CSE
Final project presentation CSE
 
IPv4 VS IPv6
IPv4 VS IPv6IPv4 VS IPv6
IPv4 VS IPv6
 
Golden Ratio
Golden Ratio Golden Ratio
Golden Ratio
 
Golden Ratio
Golden RatioGolden Ratio
Golden Ratio
 

Recently uploaded

Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 

Recently uploaded (20)

Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 

Cache Memory Computer Architecture and organization

  • 1. Presented To- Nur Imtiazul Haque Lecturer,Dept. Of CSE Daffodil International University Presentation OnCache Memory 1
  • 2. Group members 1.Humayra Khanum ID : 161-15-7325 2.Rezwana Islam Ria ID :161-15-7071 2
  • 3. What is Cache Memory? Cache memory isasmall, high-speedRAMbufferlocated between the CPUandmain memory. Cache memory holds a copy of the instructions (instruction cache) or data (operand or data cache) currently being used bythe CPU. The main purpose of a cache is to accelerate your computer whilekeepingthe price ofthe computer low. 3
  • 4. Placement of Cache in computer 4
  • 5. Instruction Cache • Theinstruction cacheis usedto store instructions. • Helps to reduce the cost of going to memory to fetchinstructions. • Holds several other things, likebranch prediction information. • Example:- Theinstruction cacheon Ultra SPARC pre-decodes the incominginstruction 5
  • 6. Data Cache • Data cacheis afast buffer that containsthe application data. • Before the processor can operate on the data, it must be loaded from memory into the data cache. • Then loaded from the cache line into a register and instruction using this value canoperateon it. • The resultant value is stored in a register. Then register to cacheand cacheto mainmemory. 6
  • 7. TLB Cache • TLB–Translated LookasideBuffer. • Also called ascontent-addressable memory(CAM). • It is acacheto store translatedaddresses. • TheCPUcanonly operate on data and instructions that are mapped into theTLB. 7
  • 8. Hit Ratio The ratio ofthe total number ofhits dividedbythe total CPUaccessesto memory (i.e. hits plusmisses) iscalledHit Ratio.  Hit Ratio = Total Number of Hits / (Total Number of Hits + Total Number of Miss) 8
  • 10. ASSOCIATIVE MAPPINGAn associative mapping uses an associative memory. The memory is being accessed using its contents. Every line of cache memory will accommodate the address and contents of the address. This memory is also called Content addressable memory. 1 0
  • 12. Set Associative MappingThat is the easy control of direct mapping cache The more flexible mapping of the fully associative cache. Each location can have more than one pair of tag+data items It is more than one pair of tag and date .so if one cache location is holding two pair of tag+data item ,that is called 2way set associative mapping. 1 2
  • 14. Replacement Algorithms of Cache Memory It is used when there are no available space in a cache place in data. Four common cache replacement algorithms are 1.Least Recently Used (LRU) -Replacement item Used by CPU 2.First-In-First-out (FIFO) -Replacement item Used by cache from longest time 3.Least frequency Used (LFU) -Replacement item used by CPU 4.Random 1 4
  • 15. 81 5