Cache Access Example (Part 2)

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

Комментарии •

  • @officialsterlingarcher
    @officialsterlingarcher 6 лет назад +73

    Why is it you can explain what takes my teacher about two full weeks of lectures in just two videos under 30 minutes. Thank you so much you're a life saver.

    • @IStMl
      @IStMl 4 года назад +5

      he spent 2 weeks on caches basics ??

    • @SmoothCode
      @SmoothCode 3 года назад +1

      you mean shitty teachers?

    • @akaris.6184
      @akaris.6184 11 месяцев назад

      @@IStMl depends on the syllabus. fully associative, set associative and direct mapped was like half of a topic for me, so it took 1.5-ish weeks

  • @lucazdelion
    @lucazdelion 7 лет назад +85

    I have finals tomorrow, god bless you

    • @aotoki1154
      @aotoki1154 5 лет назад

      What is the point of V beside the tag, when its value is 1 throughout the process?

    • @aotoki1154
      @aotoki1154 5 лет назад

      And in this case is the value of offset considered? Seems like none of them was used.

    • @chaewoonsong3525
      @chaewoonsong3525 5 лет назад

      i've got my final tomorrow lmao lets gooo

    • @DilpreetSingh-eh5kw
      @DilpreetSingh-eh5kw 5 лет назад

      @@chaewoonsong3525 do you understand the use of LSU bit?

    • @chaewoonsong3525
      @chaewoonsong3525 5 лет назад +2

      @@DilpreetSingh-eh5kw Yes, I can try to explain here - just had my final today lol.
      So the LRU stands for Least Recently Used which means we're adopting the eviction policy in which we kick out the address or data or tag or whatever you want to call it in the block that was literally the least recently used.
      So in this video, Matthew writes out the rows for our little 2 way set associative cache with 2 rows of cache blocks. We can see that up to 0x080, we store our tag in way 0 but when we have our first cache hit with 0x068, we are accessing the same index and thus we look at the first row of our cache. Our LRU bit is set to 1 before our hit because we have been storing our tag in Way 0 and that makes our Way 1 cache the "least recently used." (well we haven't even used it once here yet) so we indicate that by putting 1 there. But after our cache hit with 0x068, we cache our tag into Way 1 and that now makes Way 0 our least recently used, so we just indicate it by putting a 0 there.
      I think he put the LRU bit block to demonstrate how LRU works but in my exam we didn't have to indicate which block was LRU and stuff. Hope this helps and let me know if you have further questions! :)

  • @lukebayliss147
    @lukebayliss147 7 лет назад +3

    Exam in 2 days and just found this, I don't think I've ever loved someone over the internet as much as I do right now.

  • @RyanTorrecampo
    @RyanTorrecampo 7 лет назад +18

    Watching both of your videos made everything I know about cache click. Great examples. My final is tomorrow and now I feel that I understand everything about cache which is a quarter of the final. Thank you!

  • @eddenfaun316
    @eddenfaun316 3 года назад +1

    you're saving our lives , we're taking an exam an hour from now and it's all clear . Thanks

  • @Christian93G
    @Christian93G 3 года назад

    the explanation is really really exhaustive and simple to undestand

  • @dipenbhuva2061
    @dipenbhuva2061 2 года назад +6

    5:18 Doesnt the LRU change to 1 because of Hit for last address ??

  • @richardhall9815
    @richardhall9815 5 лет назад +22

    I didn't know Tom Hanks made videos about instruction pipelining in his free time!

  • @aarontan5748
    @aarontan5748 Год назад

    Thank you for both videos. Better than what I got at the university.

  • @pilotandy_com
    @pilotandy_com 6 лет назад

    Wow! Thank you for explaining this so well. I'm a hobbyist, so I don't have the benefit of textbooks and courses to work through. Now that I understand the workflows, the next step is describing it in hardware.

  • @zakeria09
    @zakeria09 4 года назад +3

    Final literally in 7 hours!! Thank you

  • @galaxygio123
    @galaxygio123 3 года назад

    I will have exam question very similar to this and you just saved my life! thanks a lot

  • @netcat22
    @netcat22 4 года назад

    Thank you very much! This helped a lot with my university assignment.

  • @christiana1D
    @christiana1D 6 лет назад

    thank you so much!! this one helped me and i have exam in few hours!!

  • @shikharchaudhary6984
    @shikharchaudhary6984 5 лет назад +3

    You did not update LRU from 0 to 1 for the last address of first stage.

  • @sarahkuhn1076
    @sarahkuhn1076 Год назад

    i don't understand how I get from 0x070 to the tag of 0000001 and set 1 offset 100000 etc. i.ex.i don't get the translation from the cache access address to the cache address

    • @matthewwatkins88
      @matthewwatkins88  Год назад

      My first thought is that you are dealing with two different "nomenuclatures", one being hexadecimal and the other being binary. Have you been keeping that it mind?

  • @rihamaltawy8739
    @rihamaltawy8739 6 лет назад +1

    Hi, although a fully associative cache has the best hit rate, for that particular example, it is worse than 2-way set associative, can you comment on that? Thank you for the nice video.

  • @mehakwaseem1479
    @mehakwaseem1479 5 лет назад

    Thank youu, you're a life savior. :)

  • @trishapatel6311
    @trishapatel6311 Год назад

    ur a life saver

  • @saramillan4400
    @saramillan4400 4 года назад

    Can you do a 4 way associative example?

  • @user-yh9sz6eo9y
    @user-yh9sz6eo9y 6 лет назад

    Very well explained. Helped me a lot, ty

  • @jensenmiller6410
    @jensenmiller6410 4 года назад

    Thank you, part 1 and 2 have pulled my ass out of the fire.

  • @wickedsnuk3812
    @wickedsnuk3812 6 лет назад +9

    after the last hit in the 1st time through, why we didnt update the lru as 1 ?

    • @aotoki1154
      @aotoki1154 5 лет назад +1

      What is the point of V beside the tag, when its value is 1 throughout the process?

    • @aotoki1154
      @aotoki1154 5 лет назад +1

      And in this case is the value of offset considered? Seems like none of them was used.

  • @deeparshankhadka7596
    @deeparshankhadka7596 4 года назад +1

    What is the size of the cache in the given example? Is it a cache of size 2, or will it be considered a 4 sized cache?

    • @marksladen2901
      @marksladen2901 4 года назад +2

      Right at the beginning of the video, it says 128 B cache. He probably emphasized more in the first video that it was 128 bytes.
      Matthew Watkins uses the term "ways." I have a textbook which uses the term "lines" and gives "lines" the letter "E" in the equation C = B × E × S
      Cache_size = Block_size × #_of_lines(or 'ways') × #_of_sets
      #_of_sets = Cache_size ÷ (Block_size × #_of_lines(or 'ways'))
      #_of sets = 128 ÷ (32 × 2)
      #_of sets = 2

  • @nickheiss2551
    @nickheiss2551 3 года назад

    have finals tomorrow thank you!!

  • @ggme7857
    @ggme7857 7 лет назад +2

    On the first time at 0x064 shouldn't you change the LRU to 1?. It doesn't change anything i am just asking to see if i got it right

    • @matthewwatkins88
      @matthewwatkins88  7 лет назад +2

      You're correct, it should be updated at the first access to 0x064. (Luckily the next access is to the same set and it is updated then, so the end result is not affected.)

    • @aotoki1154
      @aotoki1154 5 лет назад

      What is the point of V beside the tag, when its value is 1 throughout the process?

    • @aotoki1154
      @aotoki1154 5 лет назад

      And in this case is the value of offset considered? Seems like none of them was used.

  • @kabirdevpaulbaghel833
    @kabirdevpaulbaghel833 3 года назад

    u a real one

  • @ryanjackson0x
    @ryanjackson0x 5 лет назад

    Is there a transcript of the video?

  • @roxerg
    @roxerg 6 лет назад

    this saved my life
    ty

  • @manognajohn1508
    @manognajohn1508 6 лет назад

    god bless you , this one helped me a lot !!!

  • @lilianboughannam7048
    @lilianboughannam7048 11 месяцев назад

    why do we go with way 0 first?

    • @matthewwatkins88
      @matthewwatkins88  11 месяцев назад

      Assuming your question is "why do we start with way 0 (and not 1)" the answer is pretty simple, there is no reason why we couldn't have start with way 1 and then went with way 0. I would say though that we went with what is generally consider "conventnion."

  • @selvalooks
    @selvalooks 5 лет назад

    another good one , thanks a lot!!

  • @l.o2845
    @l.o2845 4 года назад

    great stuff 👌👌

  • @mrbfs07
    @mrbfs07 6 лет назад

    Thank you! Very good video

  • @mahdimahdavi2527
    @mahdimahdavi2527 3 года назад

    it's helpful
    thank you!

  • @muhammadatif25
    @muhammadatif25 6 лет назад

    if tag has matched but valid bit is 0, then will it be a hit or miss?

    • @scarybrowncub9102
      @scarybrowncub9102 6 лет назад +1

      It is impossible? When valid bit is 0, the cache line is not filled with anything.

  • @jessebelleman8070
    @jessebelleman8070 4 года назад

    Legend!

  • @stideengarbanzo9862
    @stideengarbanzo9862 5 лет назад

    thank you so much

  • @jiaweisun9663
    @jiaweisun9663 4 года назад

    You are an angel lol, saved my ass

  • @Shietaehyung
    @Shietaehyung 3 года назад

    great!!!!

  • @mich2k1
    @mich2k1 4 года назад

    unluckyly you dont say if is compulsory, conflict or capacity, too much easy in this way

  • @psyvatordarkpsy5284
    @psyvatordarkpsy5284 6 лет назад

    you saved my ass

  • @yehualawsimeneh7219
    @yehualawsimeneh7219 7 лет назад +2

    WOW WOW Nice vido

  • @matthewwatkins88
    @matthewwatkins88  5 лет назад

    No, sorry.

  • @tek1234
    @tek1234 5 лет назад

    Cancer exam exercises