caculate the size of cache memory

huda's Avatar, Join Date: Jan 2009
Go4Expert Member
plesae, i need any information relate calculating the size of cache
direct mapping ,full associative ,and 16-way set associative cache.


if:main memory=8k blocks
cache= 512 block
block size=8 word
the size of word=16 bit
i know , the size will be different by depending on the way, but how?

thanks
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Can you explain what size you are trying to calculate?
huda's Avatar, Join Date: Jan 2009
Go4Expert Member
Quote:
Originally Posted by shabbir View Post
Can you explain what size you are trying to calculate?
i mean , the amount of storage for each one.
for ex. if I need to caculate for direct mapping :
no. of blocks in cache * size of word

im not sure if was a true or not.
if so, what about set associative and associative?

thanks
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
I don't know if you can calculate cache size; the size of cache is a memory optimisation technique. A larger cache will give you a higher hit ratio but comes at a higher price, so there is a tradeoff. The availability of die space will be a factor as well, maybe that's why all Core i7 processors have the same amount - I might have expected 965 Extreme to have more cache than the 920, but that's not the case.

Looking at some of the terminology used I think you should study in detail the following article:
http://en.wikipedia.org/wiki/CPU_cache
I've referred you to this before so please make sure you read it this time. Don't assume that just because it's Wikipedia it must be unreliable.
huda's Avatar, Join Date: Jan 2009
Go4Expert Member
I tried to look for your email in your profile,but I didn't find it.
if possible ,send it, in which I can send two pdf books ,I have it . unfortunately,I haven't pdf of book of morris mano ,but the book of Pattreson isn't less importance than of Morris's book.
Also, i will send a page of morris's book in which ,he talked about the size of set associative cache that I focused my inquiry in this thread on it. sorry, if it isn't clear because I took a picture of this page by camera where ,i haven't any other facility in my home.

thanks,
huda