SlideShare a Scribd company logo
1 of 25
The
Furniture
Cache
Simulation
The Arranged Cupboard(Your average
Hard Disk)
The Table (The RAM).
The Instantaneous Index
Disadvantages
• Restricted memory capacity
• Aging (causing eventual slowing down)
• Isolated dependence upon cache (no alternatives)
Advantages
Computers… and everything cool about them
ADDRESS
MAPPING
What is Address
Mapping:
A mapping function is the method used to
locate a memory address within a cache. It is
used when copying a block from main memory
to the cache and it is used again when trying
to retrieve data from the cache.
BLOCK: Fixed sized packet of information that
moves back and forth between a cache and main
memory.
LINE: Container in a cache that stores a block
as well as other information such as the valid bit
and tag bits.
SET: Collection of one or more lines. Sets in
direct-mapped caches consist of a single line.
Set in fully associative and set associative
caches consists of multiple lines.
There are three commonly used methods to
translate main memory addresses to cache
memory addresses.
• Direct-Mapping
• Associative Mapping
• Set-Associative Mapping
Methods of Address
Mapping :
Direct-Mapping
• Each cache slot corresponds to an explicit
set of main memory.
• In our example we have 4096 memory
blocks and 128 cache slots.
• 128 blocks of main memory save in 1
block of cache memory.
• It is simplest mapping technique.
• It is easy to implement.
Advantages:
• The tag memory is much smaller than in
associative mapped cache.
• It is less costly compare to other mapping
technique.
Disadvantages:
• It is not flexible ie main memory block
cannot be mapped anywhere in Cache
Memory.
Associative Mapping
• Any main memory blocks can be
mapped into each cache slot.
• The 12-tag bits are required to identify a
memory block when it is in the cache.
• The mapping from main memory blocks to
cache slots is performed by partitioning an
address into fields.
• There is no fix block, the memory address
has only two fields : Tag & Word.
Advantage:
• Flexibility. Main Memory block can be mapped
anywhere in Cache Memory.
Disadvantage:
• Slow or expensive.
Set-Associative Mapping
• Combines the simplicity of direct
mapping with the flexibility of associative
mapping.
• For this example, two slots make up a
set. Since there are 214 slots in the
cache, there are 214/2 =213 sets.
• When an address is mapped to a set, the
direct mapping scheme is used, and then
associative mapping is used within a set.
• The format for an address has 13 bits in the
set field, which identifies the set in which the
addressed word will be found. Five bits are
used for the word field and 14-bit tag field.
Advantages:
• In our example the tag memory increases
only slightly from the direct mapping and only
two tags need to be searched for each
memory reference.
• The set-associative cache is widely used in
today’s microprocessors.
Thank You…

More Related Content

What's hot

Adbms 24 data fragmentation
Adbms 24 data fragmentationAdbms 24 data fragmentation
Adbms 24 data fragmentationVaibhav Khanna
 
BFS & Interval Graph Introduction
BFS & Interval Graph IntroductionBFS & Interval Graph Introduction
BFS & Interval Graph Introductionnazlitemu
 
Introduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListIntroduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListSelvaraj Seerangan
 
Memory sementation sem
Memory sementation semMemory sementation sem
Memory sementation semVishal Jangid
 
Segmentation geekssay.com
Segmentation  geekssay.comSegmentation  geekssay.com
Segmentation geekssay.comHemant Gautam
 
An approach to implement model classes in zend
An approach to implement model classes in zendAn approach to implement model classes in zend
An approach to implement model classes in zendswiss IT bridge
 
Microprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directivesMicroprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directiveswaqasahmad1995
 

What's hot (10)

M.f
M.f M.f
M.f
 
Memory organisation
Memory organisationMemory organisation
Memory organisation
 
Adbms 24 data fragmentation
Adbms 24 data fragmentationAdbms 24 data fragmentation
Adbms 24 data fragmentation
 
BFS & Interval Graph Introduction
BFS & Interval Graph IntroductionBFS & Interval Graph Introduction
BFS & Interval Graph Introduction
 
Bt export
Bt exportBt export
Bt export
 
Introduction to Data Structures and Linked List
Introduction to Data Structures and Linked ListIntroduction to Data Structures and Linked List
Introduction to Data Structures and Linked List
 
Memory sementation sem
Memory sementation semMemory sementation sem
Memory sementation sem
 
Segmentation geekssay.com
Segmentation  geekssay.comSegmentation  geekssay.com
Segmentation geekssay.com
 
An approach to implement model classes in zend
An approach to implement model classes in zendAn approach to implement model classes in zend
An approach to implement model classes in zend
 
Microprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directivesMicroprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directives
 

Similar to How Computer Cache Works

Address mapping
Address mappingAddress mapping
Address mappingrockymani
 
Cache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.pptCache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.pptrularofclash69
 
coa-Unit5-ppt1 (1).pptx
coa-Unit5-ppt1 (1).pptxcoa-Unit5-ppt1 (1).pptx
coa-Unit5-ppt1 (1).pptxRuhul Amin
 
Computer organization memory hierarchy
Computer organization memory hierarchyComputer organization memory hierarchy
Computer organization memory hierarchyAJAL A J
 
Organisation of cache memory
Organisation  of cache memoryOrganisation  of cache memory
Organisation of cache memoryKomalBhat6
 
Ct213 memory subsystem
Ct213 memory subsystemCt213 memory subsystem
Ct213 memory subsystemSandeep Kamath
 
Computer Organisation and Architecture (COA)
Computer Organisation and Architecture (COA)Computer Organisation and Architecture (COA)
Computer Organisation and Architecture (COA)SwapnitaSrivastava1
 
cache memory introduction, level, function
cache memory introduction, level, functioncache memory introduction, level, function
cache memory introduction, level, functionTeddyIswahyudi1
 
Cache.pptx
Cache.pptxCache.pptx
Cache.pptxVCETCSE
 
GRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptx
GRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptxGRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptx
GRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptxDANCERAMBA
 

Similar to How Computer Cache Works (20)

Address mapping
Address mappingAddress mapping
Address mapping
 
Cache Memory.pptx
Cache Memory.pptxCache Memory.pptx
Cache Memory.pptx
 
Auxiliary, Cache and Virtual memory.pptx
Auxiliary, Cache and Virtual memory.pptxAuxiliary, Cache and Virtual memory.pptx
Auxiliary, Cache and Virtual memory.pptx
 
Cache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.pptCache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.ppt
 
Cache memory
Cache memoryCache memory
Cache memory
 
COA
COACOA
COA
 
coa-Unit5-ppt1 (1).pptx
coa-Unit5-ppt1 (1).pptxcoa-Unit5-ppt1 (1).pptx
coa-Unit5-ppt1 (1).pptx
 
cache memory
cache memorycache memory
cache memory
 
Computer organization memory hierarchy
Computer organization memory hierarchyComputer organization memory hierarchy
Computer organization memory hierarchy
 
Organisation of cache memory
Organisation  of cache memoryOrganisation  of cache memory
Organisation of cache memory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Ct213 memory subsystem
Ct213 memory subsystemCt213 memory subsystem
Ct213 memory subsystem
 
Computer Organisation and Architecture (COA)
Computer Organisation and Architecture (COA)Computer Organisation and Architecture (COA)
Computer Organisation and Architecture (COA)
 
cache memory introduction, level, function
cache memory introduction, level, functioncache memory introduction, level, function
cache memory introduction, level, function
 
Cache.pptx
Cache.pptxCache.pptx
Cache.pptx
 
cache memory
 cache memory cache memory
cache memory
 
CAO-Unit-III.pptx
CAO-Unit-III.pptxCAO-Unit-III.pptx
CAO-Unit-III.pptx
 
Memory (Computer Organization)
Memory (Computer Organization)Memory (Computer Organization)
Memory (Computer Organization)
 
GRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptx
GRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptxGRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptx
GRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptx
 
04 cache memory
04 cache memory04 cache memory
04 cache memory
 

More from Rishabh Dubey

IASFS a brief introduction
IASFS a brief introductionIASFS a brief introduction
IASFS a brief introductionRishabh Dubey
 
Indian Science Fiction
Indian Science FictionIndian Science Fiction
Indian Science FictionRishabh Dubey
 
16th Science Fiction Conference Report
16th Science Fiction Conference Report16th Science Fiction Conference Report
16th Science Fiction Conference ReportRishabh Dubey
 
Application of genetic algorithm
Application of genetic algorithmApplication of genetic algorithm
Application of genetic algorithmRishabh Dubey
 
A route to a better tomorrow
A route to a better tomorrowA route to a better tomorrow
A route to a better tomorrowRishabh Dubey
 
Polymers: The now and future of biology.
Polymers: The now and future of biology.Polymers: The now and future of biology.
Polymers: The now and future of biology.Rishabh Dubey
 
TRAFQUICK (Traffic Signal Simulation Using Breadboard)
TRAFQUICK (Traffic Signal Simulation Using Breadboard)TRAFQUICK (Traffic Signal Simulation Using Breadboard)
TRAFQUICK (Traffic Signal Simulation Using Breadboard)Rishabh Dubey
 

More from Rishabh Dubey (13)

IASFS a brief introduction
IASFS a brief introductionIASFS a brief introduction
IASFS a brief introduction
 
Indian Science Fiction
Indian Science FictionIndian Science Fiction
Indian Science Fiction
 
16th Science Fiction Conference Report
16th Science Fiction Conference Report16th Science Fiction Conference Report
16th Science Fiction Conference Report
 
2009a report
2009a report2009a report
2009a report
 
Coursera
CourseraCoursera
Coursera
 
Application of genetic algorithm
Application of genetic algorithmApplication of genetic algorithm
Application of genetic algorithm
 
SONET, CWDM, DWDM
SONET, CWDM, DWDMSONET, CWDM, DWDM
SONET, CWDM, DWDM
 
A route to a better tomorrow
A route to a better tomorrowA route to a better tomorrow
A route to a better tomorrow
 
Polymers: The now and future of biology.
Polymers: The now and future of biology.Polymers: The now and future of biology.
Polymers: The now and future of biology.
 
Geekverse
GeekverseGeekverse
Geekverse
 
TRAFQUICK (Traffic Signal Simulation Using Breadboard)
TRAFQUICK (Traffic Signal Simulation Using Breadboard)TRAFQUICK (Traffic Signal Simulation Using Breadboard)
TRAFQUICK (Traffic Signal Simulation Using Breadboard)
 
Bofors scam rishabh
Bofors scam  rishabhBofors scam  rishabh
Bofors scam rishabh
 
Nikola tesla
Nikola tesla Nikola tesla
Nikola tesla
 

Recently uploaded

Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 

Recently uploaded (20)

Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 

How Computer Cache Works

  • 2. The Arranged Cupboard(Your average Hard Disk)
  • 5. Disadvantages • Restricted memory capacity • Aging (causing eventual slowing down) • Isolated dependence upon cache (no alternatives)
  • 8. What is Address Mapping: A mapping function is the method used to locate a memory address within a cache. It is used when copying a block from main memory to the cache and it is used again when trying to retrieve data from the cache.
  • 9. BLOCK: Fixed sized packet of information that moves back and forth between a cache and main memory. LINE: Container in a cache that stores a block as well as other information such as the valid bit and tag bits. SET: Collection of one or more lines. Sets in direct-mapped caches consist of a single line. Set in fully associative and set associative caches consists of multiple lines.
  • 10. There are three commonly used methods to translate main memory addresses to cache memory addresses. • Direct-Mapping • Associative Mapping • Set-Associative Mapping Methods of Address Mapping :
  • 11.
  • 13. • Each cache slot corresponds to an explicit set of main memory. • In our example we have 4096 memory blocks and 128 cache slots. • 128 blocks of main memory save in 1 block of cache memory. • It is simplest mapping technique. • It is easy to implement.
  • 14. Advantages: • The tag memory is much smaller than in associative mapped cache. • It is less costly compare to other mapping technique. Disadvantages: • It is not flexible ie main memory block cannot be mapped anywhere in Cache Memory.
  • 15.
  • 16.
  • 17. Associative Mapping • Any main memory blocks can be mapped into each cache slot. • The 12-tag bits are required to identify a memory block when it is in the cache.
  • 18. • The mapping from main memory blocks to cache slots is performed by partitioning an address into fields. • There is no fix block, the memory address has only two fields : Tag & Word.
  • 19. Advantage: • Flexibility. Main Memory block can be mapped anywhere in Cache Memory. Disadvantage: • Slow or expensive.
  • 20.
  • 21.
  • 22. Set-Associative Mapping • Combines the simplicity of direct mapping with the flexibility of associative mapping. • For this example, two slots make up a set. Since there are 214 slots in the cache, there are 214/2 =213 sets.
  • 23. • When an address is mapped to a set, the direct mapping scheme is used, and then associative mapping is used within a set. • The format for an address has 13 bits in the set field, which identifies the set in which the addressed word will be found. Five bits are used for the word field and 14-bit tag field.
  • 24. Advantages: • In our example the tag memory increases only slightly from the direct mapping and only two tags need to be searched for each memory reference. • The set-associative cache is widely used in today’s microprocessors.