0% found this document useful (0 votes)
14 views

Computer Architecture

Uploaded by

Hy People
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Computer Architecture

Uploaded by

Hy People
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Computer Architecture

Mapping Cache Memory

Prepared By:
Manisha Sharma
Priyanka Ghimire
Speaker Notes
 In this presentation, we will explore the concept of cache memory
mapping. Cache memory plays a vital role in improving computer
performance by bridging the speed gap between the CPU and main
memory. Mapping techniques determine how data from main memory
is placed and retrieved from the cache. We will delve into different
mapping techniques, their advantages, and disadvantages, along with
examples for better understanding.
INTRODUCTION
Cache memory acts as a temporary storage space for frequently used data and instructions. It's smaller
and faster than main memory (RAM). The CPU first checks the cache for needed data before accessing
the slower main memory.
What Is Cache Memory?
•Small, high-speed memory located between the CPU and main memory
•Stores frequently accessed data and instructions
•Faster access time compared to main memory
•Improves overall system performance
Why Cache Mapping
is important?
 Efficient utilization of cache space
 Reduces conflicts when multiple memory locations
map to the same cache line
 Determines data placement and retrieval from
main memory
Types of Cache Mapping
Direct Mapping

Associative Mapping

Set-Associative Mapping
Direct Mapped Cache
•Simplest mapping technique
•Each main memory block maps to a specific cache line
•Determined by a calculation using the block address and the number
of cache lines
Advantages Disadvantages
•Simple to implement •Can lead to cache conflicts
•Low hardware complexity •May suffer from thrashing
•Fast access time for cache hits under certain access patterns
Associative Mapped Cache
•More flexible than direct mapped cache
•Any main memory block can be placed in any available cache line
•Requires additional hardware for comparison during cache access
Advantages Disadvantages
• No cache Conflict • Complex Hardware Design
• Improved hit rate • Slower access time due to tag
comparison
Set-Associative Mapped Cache
•Combines benefits of direct mapped and associative mapped caches
•Main memory divided into sets, each containing multiple cache lines
•A block maps to a specific set but can be placed in any available line
within
Advantages
 Offers a balance between direct mapped and associative
mapped caches.
 Reduces conflict possibilities while maintaining a simpler
design than fully associative.

Disadvantages
The optimal number of ways (cache lines per set) needs to
be carefully chosen based on access patterns and cache
size.

You might also like