SlideShare a Scribd company logo
Associative Memory and set-
associative memory mapping
Ms. Snehalata Agasti
CSE department
Fully-Associative Mapping
 In direct mapping, though cache memory block is vacant still conflict misses
occurs.
 To overcome this problem Tag bit and cache-offset field is combined.
 So main memory block can be stored anywhere.
 Physical address is divided into two parts.
 Word-offset
 Tag
Tag Word-offset
Problem using filly-associative mapping
 Cache memory size= 64KB
Block size= 32B
Number of bits given for main memory addressing= 32
Find number of bits required for tag and word-offset?
 Solution: -
Block size=32B
Block offset= log225=5
Tag= 32-5=27
Tag = 27 Word-offset = 5
32
Set-associative Mapping
Draw back in direct mapping:-
 Compulsory miss occurs.
 conflict miss occurs.
 Cache memory could not be used effectively.
Draw back in fully-associative mapping:-
 Compulsory miss occurs.
 Capacity miss occurs.
 To over come the loopholes present in both mapping Set-associative mapping
technique is used.
Contd…
 Cache lines are grouped into sets.
 Particular block of main memory is mapped to particular set of cache lines.
 Within the set, block can be mapped to the free cache lines.
 To find the set number :-
set number= main memory block number % Number of sets in cache.
 Physical address is divided into three parts.
 Block-offset
 Set-offset
 Tag
Tag Set-offset Block-offset
Problem using set-associative mapping
 Cache memory size=64KB
Main memory size=4GB
Block size=32B , 4-way associative
Find tag, set-offset and word-offset?
 Solution:- Number of blocks in cache = size of cache memory / Block size
=64KB / 32B = 2KB =21 x 210 =211
Number of sets in cache = no of blocks in cache / associativity
= 2KB/4 = 211 / 24 = 29
Set offset = log229 =9
Contd…
Block size =32B
Number of bits required for word offset= log225=5
Size of main memory =4GB= 22 x 230 = 232
Number of bits required for memory addressing
= log2232 =32
Tag = 32-(set-offset + word-offset)
= 32 – (9+5) =18
Tag=18 Set-offset=9 Block-offset=5
Tag-directory size computation
 Tag-directory size = Tag x number of blocks
=18 x 211
= 36 x 210
= 36B
 Tag-directory size= (tag + number of extra bits given) x (number of blocks)
 [if in question it is given that number of dirty_bits=1 and number of modified
bit =2]
 Tag-directory size = (18 + 1+ 2) x 211
= 21 x211
= 42 x 2 10
= 42KB
Associative memory and set associative memory mapping

More Related Content

What's hot

Cache memory
Cache memoryCache memory
Cache memory
Shailesh Tanwar
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
RamaPrabha24
 
Memory Addressing
Memory AddressingMemory Addressing
Memory Addressing
chauhankapil
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
Mazin Alwaaly
 
Unit 6 interprocessor arbitration
Unit 6 interprocessor arbitrationUnit 6 interprocessor arbitration
Unit 6 interprocessor arbitration
Dipesh Vaya
 
Cache Memory
Cache MemoryCache Memory
Cache Memory
Subid Biswas
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
Kamal Acharya
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
Mazin Alwaaly
 
Address mapping
Address mappingAddress mapping
Address mapping
rockymani
 
cache memory
 cache memory cache memory
cache memory
NAHID HASAN
 
Cache memory
Cache memoryCache memory
Cache memory
Ansari Maviya
 
Cache memory
Cache  memoryCache  memory
Cache memory
Prasenjit Dey
 
CS304PC:Computer Organization and Architecture Session 11 general register or...
CS304PC:Computer Organization and Architecture Session 11 general register or...CS304PC:Computer Organization and Architecture Session 11 general register or...
CS304PC:Computer Organization and Architecture Session 11 general register or...
Asst.prof M.Gokilavani
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
Asif Iqbal
 
Cache coherence ppt
Cache coherence pptCache coherence ppt
Cache coherence ppt
ArendraSingh2
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
abdosaidgkv
 
Instruction format
Instruction formatInstruction format
Instruction format
Sanjeev Patel
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
prasadpawaskar
 
Computer Arithmetic
Computer ArithmeticComputer Arithmetic
Computer Arithmetic
Kamal Acharya
 

What's hot (20)

Cache memory
Cache memoryCache memory
Cache memory
 
instruction format and addressing modes
instruction format and addressing modesinstruction format and addressing modes
instruction format and addressing modes
 
Memory Addressing
Memory AddressingMemory Addressing
Memory Addressing
 
Computer architecture cache memory
Computer architecture cache memoryComputer architecture cache memory
Computer architecture cache memory
 
Unit 6 interprocessor arbitration
Unit 6 interprocessor arbitrationUnit 6 interprocessor arbitration
Unit 6 interprocessor arbitration
 
Cache Memory
Cache MemoryCache Memory
Cache Memory
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Address mapping
Address mappingAddress mapping
Address mapping
 
cache memory
 cache memory cache memory
cache memory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Cache memory
Cache  memoryCache  memory
Cache memory
 
CS304PC:Computer Organization and Architecture Session 11 general register or...
CS304PC:Computer Organization and Architecture Session 11 general register or...CS304PC:Computer Organization and Architecture Session 11 general register or...
CS304PC:Computer Organization and Architecture Session 11 general register or...
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Cache coherence ppt
Cache coherence pptCache coherence ppt
Cache coherence ppt
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
 
Instruction format
Instruction formatInstruction format
Instruction format
 
VIRTUAL MEMORY
VIRTUAL MEMORYVIRTUAL MEMORY
VIRTUAL MEMORY
 
8086 microprocessor-architecture
8086 microprocessor-architecture8086 microprocessor-architecture
8086 microprocessor-architecture
 
Computer Arithmetic
Computer ArithmeticComputer Arithmetic
Computer Arithmetic
 

Similar to Associative memory and set associative memory mapping

Cache recap
Cache recapCache recap
Cache recap
Fraboni Ec
 
Cache recap
Cache recapCache recap
Cache recap
James Wong
 
Cache recap
Cache recapCache recap
Cache recap
Hoang Nguyen
 
Memory mapping techniques and low power memory design
Memory mapping techniques and low power memory designMemory mapping techniques and low power memory design
Memory mapping techniques and low power memory design
UET Taxila
 
Cache memory
Cache memoryCache memory
Cache memory
Anand Goyal
 
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptxwaserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
abcxyz19691969
 
C++ Advanced Memory Management With Allocators
C++ Advanced Memory Management With AllocatorsC++ Advanced Memory Management With Allocators
C++ Advanced Memory Management With Allocators
GlobalLogic Ukraine
 
Lecture 25
Lecture 25Lecture 25
Lecture 25
Berkay TURAN
 
CACHEMAPPING POLICIE AND MERITS & DEMERITS
CACHEMAPPING POLICIE AND MERITS & DEMERITSCACHEMAPPING POLICIE AND MERITS & DEMERITS
CACHEMAPPING POLICIE AND MERITS & DEMERITS
AnkitPandey440
 
memory.ppt
memory.pptmemory.ppt
memory.ppt
ibmlenovo2021
 
memory.ppt
memory.pptmemory.ppt
memory.ppt
RohitPaul71
 
Advance computer architecture
Advance computer architectureAdvance computer architecture
Advance computer architecture
suma1991
 
2. Cache Mapping.pptx
2. Cache Mapping.pptx2. Cache Mapping.pptx
2. Cache Mapping.pptx
KarthikeyanC53
 
How Computer Cache Works
How Computer Cache WorksHow Computer Cache Works
How Computer Cache Works
Rishabh Dubey
 
Memory Management
Memory ManagementMemory Management
Memory Management
Rekha Karangiya
 

Similar to Associative memory and set associative memory mapping (20)

Cache recap
Cache recapCache recap
Cache recap
 
Cache recap
Cache recapCache recap
Cache recap
 
Cache recap
Cache recapCache recap
Cache recap
 
Cache recap
Cache recapCache recap
Cache recap
 
Cache recap
Cache recapCache recap
Cache recap
 
Cache recap
Cache recapCache recap
Cache recap
 
Cache recap
Cache recapCache recap
Cache recap
 
Memory mapping techniques and low power memory design
Memory mapping techniques and low power memory designMemory mapping techniques and low power memory design
Memory mapping techniques and low power memory design
 
Cache memory
Cache memoryCache memory
Cache memory
 
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptxwaserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
 
C++ Advanced Memory Management With Allocators
C++ Advanced Memory Management With AllocatorsC++ Advanced Memory Management With Allocators
C++ Advanced Memory Management With Allocators
 
Lecture 25
Lecture 25Lecture 25
Lecture 25
 
CACHEMAPPING POLICIE AND MERITS & DEMERITS
CACHEMAPPING POLICIE AND MERITS & DEMERITSCACHEMAPPING POLICIE AND MERITS & DEMERITS
CACHEMAPPING POLICIE AND MERITS & DEMERITS
 
memory.ppt
memory.pptmemory.ppt
memory.ppt
 
memory.ppt
memory.pptmemory.ppt
memory.ppt
 
12 memory hierarchy
12 memory hierarchy12 memory hierarchy
12 memory hierarchy
 
Advance computer architecture
Advance computer architectureAdvance computer architecture
Advance computer architecture
 
2. Cache Mapping.pptx
2. Cache Mapping.pptx2. Cache Mapping.pptx
2. Cache Mapping.pptx
 
How Computer Cache Works
How Computer Cache WorksHow Computer Cache Works
How Computer Cache Works
 
Memory Management
Memory ManagementMemory Management
Memory Management
 

More from SnehalataAgasti

Hazards in pipeline
Hazards in pipelineHazards in pipeline
Hazards in pipeline
SnehalataAgasti
 
Cache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniquesCache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniques
SnehalataAgasti
 
Memory organisation
Memory organisationMemory organisation
Memory organisation
SnehalataAgasti
 
Floating point presentation
Floating point presentationFloating point presentation
Floating point presentation
SnehalataAgasti
 
BOOTH Algorithm for Multiplication
BOOTH Algorithm for MultiplicationBOOTH Algorithm for Multiplication
BOOTH Algorithm for Multiplication
SnehalataAgasti
 
Division algorithm
Division algorithmDivision algorithm
Division algorithm
SnehalataAgasti
 

More from SnehalataAgasti (6)

Hazards in pipeline
Hazards in pipelineHazards in pipeline
Hazards in pipeline
 
Cache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniquesCache replacement policies,cache miss,writingtechniques
Cache replacement policies,cache miss,writingtechniques
 
Memory organisation
Memory organisationMemory organisation
Memory organisation
 
Floating point presentation
Floating point presentationFloating point presentation
Floating point presentation
 
BOOTH Algorithm for Multiplication
BOOTH Algorithm for MultiplicationBOOTH Algorithm for Multiplication
BOOTH Algorithm for Multiplication
 
Division algorithm
Division algorithmDivision algorithm
Division algorithm
 

Recently uploaded

Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
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
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 

Recently uploaded (20)

Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
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
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 

Associative memory and set associative memory mapping

  • 1. Associative Memory and set- associative memory mapping Ms. Snehalata Agasti CSE department
  • 2. Fully-Associative Mapping  In direct mapping, though cache memory block is vacant still conflict misses occurs.  To overcome this problem Tag bit and cache-offset field is combined.  So main memory block can be stored anywhere.  Physical address is divided into two parts.  Word-offset  Tag Tag Word-offset
  • 3. Problem using filly-associative mapping  Cache memory size= 64KB Block size= 32B Number of bits given for main memory addressing= 32 Find number of bits required for tag and word-offset?  Solution: - Block size=32B Block offset= log225=5 Tag= 32-5=27 Tag = 27 Word-offset = 5 32
  • 4. Set-associative Mapping Draw back in direct mapping:-  Compulsory miss occurs.  conflict miss occurs.  Cache memory could not be used effectively. Draw back in fully-associative mapping:-  Compulsory miss occurs.  Capacity miss occurs.  To over come the loopholes present in both mapping Set-associative mapping technique is used.
  • 5. Contd…  Cache lines are grouped into sets.  Particular block of main memory is mapped to particular set of cache lines.  Within the set, block can be mapped to the free cache lines.  To find the set number :- set number= main memory block number % Number of sets in cache.  Physical address is divided into three parts.  Block-offset  Set-offset  Tag Tag Set-offset Block-offset
  • 6. Problem using set-associative mapping  Cache memory size=64KB Main memory size=4GB Block size=32B , 4-way associative Find tag, set-offset and word-offset?  Solution:- Number of blocks in cache = size of cache memory / Block size =64KB / 32B = 2KB =21 x 210 =211 Number of sets in cache = no of blocks in cache / associativity = 2KB/4 = 211 / 24 = 29 Set offset = log229 =9
  • 7. Contd… Block size =32B Number of bits required for word offset= log225=5 Size of main memory =4GB= 22 x 230 = 232 Number of bits required for memory addressing = log2232 =32 Tag = 32-(set-offset + word-offset) = 32 – (9+5) =18 Tag=18 Set-offset=9 Block-offset=5
  • 8. Tag-directory size computation  Tag-directory size = Tag x number of blocks =18 x 211 = 36 x 210 = 36B  Tag-directory size= (tag + number of extra bits given) x (number of blocks)  [if in question it is given that number of dirty_bits=1 and number of modified bit =2]  Tag-directory size = (18 + 1+ 2) x 211 = 21 x211 = 42 x 2 10 = 42KB