Lecture 6/9:Caches-Direct Mapped

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2015
  • Part 6 of a 9 part series on cache memories. Prof. Harry Porter, Portland State University. For more, visit cs.pdx.edu/~harry

ความคิดเห็น • 30

  • @michaelw3571
    @michaelw3571 5 ปีที่แล้ว +5

    You should honestly get a teaching award for these videos.

  • @ahmadalwazzan384
    @ahmadalwazzan384 7 ปีที่แล้ว +41

    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.

    • @alantrammel7179
      @alantrammel7179 7 ปีที่แล้ว +2

      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.

    • @DuongNguyen-qz6ss
      @DuongNguyen-qz6ss 6 ปีที่แล้ว +2

      Agree. Im using William Stallings's Computer Org. and Architecture and it is soooo dry and boring and only offers major headache 😩😩😩

    • @allwhatyouwant
      @allwhatyouwant 6 ปีที่แล้ว

      Where are all you guys from? We use the same book in our Computer Organization course in Berlin, Germany.

    • @allwhatyouwant
      @allwhatyouwant 6 ปีที่แล้ว

      Oh nice to see that we all learn the same stuff. Except we use the German translation.

    • @sm00thiee
      @sm00thiee 5 ปีที่แล้ว +1

      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.

  • @jesper2455
    @jesper2455 5 ปีที่แล้ว +1

    Super clear and very helpful. For every 100 tutorials videos on TH-cam you come across something with this quality once. Thank you so much for making these videos!

  • @RhoPGC
    @RhoPGC 4 ปีที่แล้ว +4

    Harry Porter and the Direct Mapped Cache

  • @azy789
    @azy789 8 ปีที่แล้ว +11

    So much more clarifying than the other video explanations on this topic

  • @kevincabrera7264
    @kevincabrera7264 8 ปีที่แล้ว +4

    Great video! You made the material straightforward and very easy to understand.

  • @sheahunt8801
    @sheahunt8801 6 ปีที่แล้ว +2

    Great explanation and walk through. Thank you!

  • @tonym.644
    @tonym.644 7 ปีที่แล้ว

    thank you for these video tutorials, they are awesome.

  • @mariav1234
    @mariav1234 7 ปีที่แล้ว +2

    Thanks a lot for these videos.

  • @ChChCheckIt
    @ChChCheckIt 5 ปีที่แล้ว

    Thanks so much big pimpin!

  • @AmitKumar-hf8ck
    @AmitKumar-hf8ck 7 ปีที่แล้ว +1

    keep it professor plz make more videos like that

  • @82907
    @82907 6 ปีที่แล้ว +2

    thanks, made my day!

  • @jett5385
    @jett5385 5 ปีที่แล้ว

    the way we map blocks is by using his formula, blockNumer mod NumberOfCacheLines

  • @devinramsden5412
    @devinramsden5412 4 ปีที่แล้ว

    very well explained thanks a ton

  • @yanakernerman1181
    @yanakernerman1181 5 ปีที่แล้ว +1

    thank you !

  • @ryusaki6902
    @ryusaki6902 6 ปีที่แล้ว

    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?

    • @deqnski890able
      @deqnski890able 5 ปีที่แล้ว

      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.

  • @gianmariovirdis692
    @gianmariovirdis692 5 ปีที่แล้ว +1

    can you guys explain to me what a line is in a cache?

    • @samuelwallace7036
      @samuelwallace7036 5 ปีที่แล้ว +2

      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

  • @1998goodboy
    @1998goodboy 5 ปีที่แล้ว

    lecture 69 eyyyyyy

  • @TightyWhities94
    @TightyWhities94 7 ปีที่แล้ว +19

    harry porter? really? lol

  • @pressgreen
    @pressgreen 5 ปีที่แล้ว +1

    Man I came here to learn magic WTF

  • @mk9834
    @mk9834 4 ปีที่แล้ว +1

    this is a very confusing topic >

  • @RayyanMemonTheJoker
    @RayyanMemonTheJoker 5 ปีที่แล้ว

    My dumb ass read it as "harry potter" instead of "harry porter"