Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A computer system has 32 MBytes of main memory and a set associative cache C. As

ID: 2085455 • Letter: A

Question

A computer system has 32 MBytes of main memory and a set associative cache C. Assume that every cache line has 16 Bytes of data. The tag field of the main of the memory address is 10 bits wide. If the cache C were direct mapped, then the size of the tag field would have been equal to 7 bits. Using this information, find the set associativity of the cache C (that is, number of cache lines per set). Also, determine the total size of the cache C and express your answer in Kilobytes. Assume that every cache line has 4 extra bits in addition to tag and data.

Explanation / Answer

Both your L1 instruction and data caches separate a 32-bit address as follows:

bits 0 - 3 = offset bits 4 - 14 = index bits 15 - 31 = tag

Size of cache line: 2offset bits = 24 = 16 bytes

Number of cache lines: 2index bits = 211 = 2048

Total cache size: 16 2048 = 32 KB

Total tag size: 17 2048 = 34 Kb

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote