0% found this document useful (0 votes)
15 views3 pages

Cache Memory Mapping Problems and Solutions

The document contains a series of problems related to direct mapped, fully associative, and set associative caches, focusing on calculating parameters such as tag bits, tag directory size, and main memory size based on given cache sizes and block sizes. Each problem presents a unique scenario requiring specific calculations related to cache memory architecture. The problems are structured to enhance understanding of cache design and memory management concepts.

Uploaded by

srikarreddy022
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Cache Memory Mapping Problems and Solutions

The document contains a series of problems related to direct mapped, fully associative, and set associative caches, focusing on calculating parameters such as tag bits, tag directory size, and main memory size based on given cache sizes and block sizes. Each problem presents a unique scenario requiring specific calculations related to cache memory architecture. The problems are structured to enhance understanding of cache design and memory management concepts.

Uploaded by

srikarreddy022
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Direct Mapping

Problem-01:
Consider a direct mapped cache of size 16 KB with block size 256 bytes. The size
of main memory is 128 KB. Find-
Number of bits in tag
Tag directory size

Problem-02: Consider a direct mapped cache of size 512 KB with block size 1
KB. There are 7 bits in the tag. Find-
Size of main memory
Tag directory size

Problem-03: Consider a direct mapped cache with block size 4 KB. The size of
main memory is 16 GB and there are 10 bits in the tag. Find-
Size of cache memory
Tag directory size

Problem-04: Consider a direct mapped cache of size 32 KB with block size 32


bytes. The CPU generates 32 bit addresses. The number of bits needed for cache
indexing and the number of tag bits are respectively-
10, 17
10, 22
15, 17
5, 17

Problem-05: Consider a machine with a byte addressable main memory of 232


bytes divided into blocks of size 32 bytes. Assume that a direct mapped cache
having 512 cache lines is used with this machine. The size of the tag field in bits
is ______.

Problem-06: An 8 KB direct-mapped write back cache is organized as multiple


blocks, each of size 32 bytes. The processor generates 32 bit addresses. The
cache controller maintains the tag information for each cache block comprising
of the following-
1 valid bit
1 modified bit
As many bits as the minimum needed to identify the memory block mapped in
the cache
What is the total size of memory needed at the cache controller to store meta
data (tags) for the cache?
4864 bits
6144 bits
6656 bits
5376 bits

Fully Associative Cache


Problem-01: Consider a fully associative mapped cache of size 16 KB with block
size 256 bytes. The size of main memory is 128 KB. Find-
Number of bits in tag
Tag directory size

Problem-02: Consider a fully associative mapped cache of size 512 KB with


block size 1 KB. There are 17 bits in the tag. Find-
Size of main memory
Tag directory size

Problem-03: Consider a fully associative mapped cache with block size 4 KB.
The size of main memory is 16 GB. Find the number of bits in tag.

Set Associative Cache


Problem-01: Consider a 2-way set associative mapped cache of size 16 KB with
block size 256 bytes. The size of main memory is 128 KB. Find-
Number of bits in tag
Tag directory size

Problem-02: Consider a 8-way set associative mapped cache of size 512 KB


with block size 1 KB. There are 7 bits in the tag. Find-
Size of main memory
Tag directory size
Problem-03: Consider a 4-way set associative mapped cache with block size 4
KB. The size of main memory is 16 GB and there are 10 bits in the tag. Find-
Size of cache memory
Tag directory size

Problem-04: Consider a 8-way set associative mapped cache. The size of cache
memory is 512 KB and there are 10 bits in the tag. Find the size of main memory.

Problem-05: Consider a 4-way set associative mapped cache. The size of main
memory is 64 MB and there are 10 bits in the tag. Find the size of cache memory.

You might also like