简体   繁体   中英

How to Calculate Cache Overhead?

I've been given a problem by my computer architecture professor but it is using some terminology that I cannot find in our textbook.

Basically, I'm given a cache with the following parameters:

-4KB address space -Byte-addressable memory -Direct-Mapped -2 blocks in cache -4-word blocks

I have no problem drawing out this cache and modeling what would happen with various inputs. However there is one question I'm being asked:

"The cache stores overhead information. What percentage of the total cache storage is this overhead?"

I have no idea what this means. I've been searching "cache overhead" on Google and StackOverflow and I haven't been able to find anything that places those two words together in a helpful context for me. I don't see it in my textbook either.

Any insight would be greatly appreciated.

Thank You!

I got an answer for the question. I'll post it here in case anyone else has trouble.

Apparently, overhead is a more general term in Computer Science that I'd never heard before, referring to extraneous resources - in this case, bits.

When referring to cache overhead, the question was referring to bits that are necessary for the cache, but that do not include the data itself.

In this particular case, the cache included the validity bid, and the tag. In order to calculate the overhead as a percentage, I had to take the sum of all validity bits and tag bits and divide them by the total cache size.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM