Super clear and very helpful. For every 100 tutorials videos on RUclips you come across something with this quality once. Thank you so much for making these videos!
Great video. I spent two hours on Computer Organization and Design by David Patterson and John L. Hennessy and didn't get anything but headache. This one explains it well.
I have that same headache at this very moment (and for the past 2 days). I use this guy's vids for my Theory and Computability class and they're lifesavers.
A line is the same thing as a block. It's the amount of data you take into or remove from the cache at a time. So if my line size (or block size) is 64 bytes, if I have a cache miss on a certain byte I'll take in the 64 bytes containing that byte. It's not efficient to just bring in a exactly what you're reading because then you don't benefit from spatial locality
I think tag size is 17 bits because we got 32 bit word and 9 bits of it are used for the index( to recognize the line from the cache), 6 bits are used for offset(to recognize the byte in the block),and if we add them together and subtract them from the word, we end up with 17 bits left for tag ( to recognize if what is loaded in the cache is the right block we're looking for from the main memory, so we got cache hit and don't need to fetch it from main memory) : 32 - (9+6) = 32 - 15 = 17 Also 9 represents 2^9, 6 represents 2^6 and 17 represents 2^17 and if we multiply them the result is 2^32 which equals 4,294,967,296(4GB) and that is the size of our main memory. 2^32/2^6= 2^26(67,108,864) gives us how many blocks/lines the main memory has. According to the cache which has 2^9 = 512 lines/blocks. So if we divide the number of cache blocks to the number of main memory blocks we'll find how many main memory blocks correspond to single cache block : 2^26/2^9= 2^17(131,072 blocks correspond to 1 cache block) which also gives us the number of tag bits we need(17) to be able to distinguish all blocks from main memory which may be in this block of the cache. On the end of the story we got: Each block from main or cache memory contains 2^6(64) bytes Main memory is 2^32(4,294,967,296 bytes) or 4GB Main memory has 2^26(67,108,864) blocks Cache has 2^9(512) blocks Cache memory is 2^9*2^6 = 13,312 bytes or 13KB I may be wrong somewhere so if it is so please make me aware of.
Super clear and very helpful. For every 100 tutorials videos on RUclips you come across something with this quality once. Thank you so much for making these videos!
You should honestly get a teaching award for these videos.
Great video. I spent two hours on Computer Organization and Design by David Patterson and John L. Hennessy and didn't get anything but headache. This one explains it well.
I have that same headache at this very moment (and for the past 2 days). I use this guy's vids for my Theory and Computability class and they're lifesavers.
Agree. Im using William Stallings's Computer Org. and Architecture and it is soooo dry and boring and only offers major headache 😩😩😩
Where are all you guys from? We use the same book in our Computer Organization course in Berlin, Germany.
Oh nice to see that we all learn the same stuff. Except we use the German translation.
Lol. I got the same book. My grad-level computer architecture class is in California, USA and this video explains everything so much more clearer.
So much more clarifying than the other video explanations on this topic
Great video! You made the material straightforward and very easy to understand.
Harry Porter and the Direct Mapped Cache
Great explanation and walk through. Thank you!
Thanks a lot for these videos.
keep it professor plz make more videos like that
thank you for these video tutorials, they are awesome.
Thanks so much big pimpin!
the way we map blocks is by using his formula, blockNumer mod NumberOfCacheLines
thanks, made my day!
can you guys explain to me what a line is in a cache?
A line is the same thing as a block. It's the amount of data you take into or remove from the cache at a time. So if my line size (or block size) is 64 bytes, if I have a cache miss on a certain byte I'll take in the 64 bytes containing that byte. It's not efficient to just bring in a exactly what you're reading because then you don't benefit from spatial locality
very well explained thanks a ton
thank you !
i know it's an old video, but i'm confused about the tag size at 3:37. I mean, looks like there's only 16 bits, but you counted +1. Why?
I think tag size is 17 bits because we got 32 bit word and 9 bits of it are used for the index( to recognize the line from the cache), 6 bits are used for offset(to recognize the byte in the block),and if we add them together and subtract them from the word, we end up with 17 bits left for tag ( to recognize if what is loaded in the cache is the right block we're looking for from the main memory, so we got cache hit and don't need to fetch it from main memory) :
32 - (9+6) =
32 - 15 = 17
Also 9 represents 2^9, 6 represents 2^6 and 17 represents 2^17 and if we multiply them the result is 2^32 which equals 4,294,967,296(4GB) and that is the size of our main memory.
2^32/2^6= 2^26(67,108,864) gives us how many blocks/lines the main memory has.
According to the cache which has 2^9 = 512 lines/blocks.
So if we divide the number of cache blocks to the number of main memory blocks we'll find how many main memory blocks correspond to single cache block : 2^26/2^9= 2^17(131,072 blocks correspond to 1 cache block) which also gives us the number of tag bits we need(17) to be able to distinguish all blocks from main memory which may be in this block of the cache.
On the end of the story we got:
Each block from main or cache memory contains 2^6(64) bytes
Main memory is 2^32(4,294,967,296 bytes) or 4GB
Main memory has 2^26(67,108,864) blocks
Cache has 2^9(512) blocks
Cache memory is 2^9*2^6 = 13,312 bytes or 13KB
I may be wrong somewhere so if it is so please make me aware of.
this is a very confusing topic >
harry porter? really? lol
lecture 69 eyyyyyy
Man I came here to learn magic WTF
My dumb ass read it as "harry potter" instead of "harry porter"