Q2) A two way set associative cache memory uses blocks of 4 words . The each can accommodate a total of 2048 words from main memory . The main memory size is 128 X 32 . What is the size of the cache memory ?
Q: A two-way set associative cache memory uses blocks of four words.The cache can accommodate a total of 2048 words from main memory.The main memory size is 128K X 32.Find out the no. of bits in each of the TAG,SET,WORD fields of the main memory address required to design the cache memory. Ans. Main memory size=128K* 32 =2^(10+7) * 32 =2^17 * 32 From this we get, 1 word = 32 bits Therefore, Main memory size=2^17 words Therefore, for P.A. we need 17 bits. Cache can accommodate 2048 words. Therefore, Cache Size= 2^11 words Given, 1 block has 4 words (i.e.2^2 words) Therefore, Offset (or WORD) bits=2 bits Now, No. of Cache lines= (Cache Size)/(Block or Line Size) =2^11/2^2 =2^9 Since it's a 2-way set associative cache, 1 set =2^1 lines Hence, No. of Sets=(No. of cache lines)/(Set Size) =2^9/2^1 =2^8 Therefore, SET bits = 8 So, TAG bits= P.A. bits - (SET bits + WORD bits) =17 - (8+2) =7 bits Hence, TAG+SET+WORD = 7+8+2
What's the use of block offset in set associative mapping? Since the block from MM is assigned a set based on it's set no. bits and then it can enter any block within the set, doesn't this make the block offset useless?
The offset is used after the second step, first step identifies the set (instead of line) and then the second step has comparators identifying the tag between the 2 lines stored within the set, so by the time you find the cache line you're looking for, there are still only 4 bytes within that line.
I wish I can understand Indian accent 😂, it is so frustrating that I can have these amazing video explanations but I get thrown off frequently by some word that is mispronounced, the subtitle helps a little but it covers the lower part of the screen, and some words are totally mispronounced to the point neither the subtitle nor do I can figure out what he is saying
I am sorry for my comment if this is your real accent. If not, then it would be really helpful knocking off the fake accent, so the video becomes pleasurable to listen to and easily understandable. Real quality content and a great explanation by an expert, but, the audio (as it feels un-natural) makes it unbearable to listen to.
We only try to keep the pronunciation accurate, and we don’t deliberately fake an accent. The teacher has the same English accent when he is not recording. So, we should accept his accent and focus on his wonderful illustrations.
so clearly. This lesson fits for me because it has examples, not pure cheory.
What a explanation! Your animation make learning more intresting 🙂🙂🙂❤️❤️❤️
Wonderful class, your explanations are so clear. Thank you so much.
so helpful and so clear
Q2) A two way set associative cache memory uses blocks of 4 words . The each can accommodate a total of 2048 words from main memory . The main memory size is 128 X 32 . What is the size of the cache memory ?
Q: A two-way set associative cache memory uses blocks of four words.The cache can accommodate a total of 2048 words from main memory.The main memory size is 128K X 32.Find out the no. of bits in each of the TAG,SET,WORD fields of the main memory address required to design the cache memory.
Ans.
Main memory size=128K* 32
=2^(10+7) * 32
=2^17 * 32
From this we get, 1 word = 32 bits
Therefore,
Main memory size=2^17 words
Therefore, for P.A. we need 17 bits.
Cache can accommodate 2048 words.
Therefore, Cache Size= 2^11 words
Given, 1 block has 4 words (i.e.2^2 words)
Therefore,
Offset (or WORD) bits=2 bits
Now,
No. of Cache lines= (Cache Size)/(Block or Line Size)
=2^11/2^2
=2^9
Since it's a 2-way set associative cache,
1 set =2^1 lines
Hence,
No. of Sets=(No. of cache lines)/(Set Size)
=2^9/2^1
=2^8
Therefore, SET bits = 8
So,
TAG bits= P.A. bits - (SET bits + WORD bits)
=17 - (8+2)
=7 bits
Hence, TAG+SET+WORD = 7+8+2
Thanks sir.
@nesoacademy Thanks a lot sir for the consideration for a student :)🎉
Thank you so much sir
thanks mate, you are a hero!
Thank you so much sir. Its helpful!! ❤😊
thank you so much, God bless you
good video
Make DBMS video as playlists
Thank you
brilliant!!
What's the use of block offset in set associative mapping? Since the block from MM is assigned a set based on it's set no. bits and then it can enter any block within the set, doesn't this make the block offset useless?
The offset is used after the second step, first step identifies the set (instead of line) and then the second step has comparators identifying the tag between the 2 lines stored within the set, so by the time you find the cache line you're looking for, there are still only 4 bytes within that line.
Is it also called instruction set architecture? If not where from I can instruction set architecture?
How to solve plz shared a vdo on this question plz need the most
Sir, please teach Software engineering as well. This is my humble request to you
Nice.
aayein
Your accent lol
Hmm? Nothing funny bro. Stop mocking others accent. He is providing us good thing and we should study it. That's it.
I wish I can understand Indian accent 😂, it is so frustrating that I can have these amazing video explanations but I get thrown off frequently by some word that is mispronounced, the subtitle helps a little but it covers the lower part of the screen, and some words are totally mispronounced to the point neither the subtitle nor do I can figure out what he is saying
Which country do you belong?
@@ajinkyakale3353 prob from Middle East
No...the words are not "mispronounced". That's the way it's said..and none of the western watchers have a problem with it.
Bro learn Indian English it will help throughout your life 😂
But they are tho
I am sorry for my comment if this is your real accent.
If not, then it would be really helpful knocking off the fake accent, so the video becomes pleasurable to listen to and easily understandable. Real quality content and a great explanation by an expert, but, the audio (as it feels un-natural) makes it unbearable to listen to.
We only try to keep the pronunciation accurate, and we don’t deliberately fake an accent. The teacher has the same English accent when he is not recording. So, we should accept his accent and focus on his wonderful illustrations.
@@nesoacademy makes sense, thanks a lot.
:)
Bro there is caption
Byte addressable doesn't mean word=1Byte!
one word is always 4 Bytes