- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Discuss the Set Associative Mapping in Computer Architecture?
Set associative mapping combines direct mapping with fully associative mapping by arrangement lines of a cache into sets. The sets are persistent using a direct mapping scheme. However, the lines within each set are treated as a small fully associative cache where any block that can save in the set can be stored to any line inside the set.
The diagram represents this arrangement using a sample cache that uses four lines to a set.
A set-associative cache that includes k lines per set is known as a k way set-associative cache. Because the mapping approach uses the memory address only like direct mapping does, the number of lines included in a set should be similar to an integer power of two, for example, two, four, eight, sixteen, etc.
Example − Consider a cache with 29 = 512 lines, a block of memory contains 23 = 8 words, and the full memory space includes 230 = 1G words. In a direct mapping scheme, this can leave 30 – 9 – 3 = 18 bits for the tag.
By sending from direct mapping to set associative with a set size of two lines per set, the various sets achieved equals half the number of lines. In the instance of the cache having 512 lines, we can achieve 256 sets of two lines each, which would require eight bits from the memory address to recognize the set.
This can leave 30 – 8 – 3 = 19 bits for the tag. By sending to four lines per set, the number of sets is decreased to 128 sets needing 7 bits to recognize the set and twenty bits for the tag.
- Related Articles
- Discuss the Associative Mapping in Computer Architecture?
- Discuss the Hardware Algorithm in Computer Architecture?
- Discuss the MultiLevel Interrupts in Computer Architecture?
- Discuss the Memory Hierarchy in Computer Architecture?
- Discuss the I/O Interface in Computer Architecture?
- Discuss the Data Transfer Schemes in Computer Architecture?
- Discuss the Single Level Interrupts in Computer Architecture?
- What is Instruction Mapping in Computer Architecture?
- Discuss the various Input-Output Instructions in Computer Architecture?
- What is Direct Mapping Process in Computer Architecture?
- How to Address Mapping using Pages in Computer Architecture?
- What are Computer Registers in Computer Architecture?
- Computer System Architecture
- What is computer architecture?
- Differences between Computer Architecture and Computer Organization
