CS 303 CACHE MEMORY NOTES (readable in app) – TCPTUTOR

30
451

CACHE MEMORY MAPPING

Use of a cache memory

  • When a read request is received from the CPU, the contents of a
    block of memory words containing the location specified are
    transferred into the cache one word at a time.
  • When the program references any of the locations in the block, the
    desired contents are read directly from the cache.
  • The correspondence between the main memory blocks and those in
    the cache is specified by mapping function.
  • When the cache memory is full and memory word that is not in the
    cache is referenced, the cache control hardware must decide which
    block should be removed to create space for the new- decision by
    replacement algorithm.

Mapping Technique

  • Direct Mapping technique
  • Associative Mapping technique
  • Set associative mapping technique

1. Direct- mapped cache

Example:

  • Cache consisting of 128 blocks of 16 words each, for a
    total of 2048(2K ) words
  • Main memory is addressable by a 16-bit address.
  • The main memory has 64K words, which will view as 4K
    blocks of 16 words each.
  • In this technique block j of the main memory maps onto
    block j modulo 128 of the cache
  • Direct mapping – easy to implement – not very flexible.
  • Determined from memory address

Features

  • The low order 4 bits select one of 16 words in a block.
  • When a new block enters the cache 7-bit cache block field
    determines the cache position in which this block must be
    stored.
  • The high – order 5 bits of the memory address of the block are
    stored in 5 tag bits associated with its location in the cache.
  • The high –order 5 bits of the address are compared with the tag
    bits associated with that cache location. If they match, then the
    desired word is in that block of the cache.

2. Associative –mapped cache

  • Much more flexible – higher costs (must search all
    128 tag patterns to determine if a given block is in
    cache.) (All tags must be searched in parallel)
  • A main memory block can be placed into any cache
    block position.
  • Existing blocks only need to be ejected if cache is full.

3. Set Associative Mapped cache

  • Blocks of cache are grouped into sets
  • A block of main memory can reside in any block of a specific
    set.
  • reduces hardware necessary for searching tag addresses in
    associative mapped.
  • K-blocks per set is a k-way set associative cache

30 COMMENTS

  1. Basically to follow up on the update of this
    subject on your web site and would like to let you know
    just how much I appreciated the time you took to put together this valuable
    post. In the post, you really spoke on how to seriously
    handle this matter with all ease. It would be my personal pleasure to get some more ideas from your web site and come up to offer other individuals
    what I discovered from you. Many thanks for your usual wonderful effort. https://twittersmedia.com/blog/53361/patch-to-lose-fat-acquire-a-perfectly-slim-body-in-the-month/

  2. 防曬粉 BB粉底霜 亮麗柔滑打底乳液 亮麗柔滑控油打底乳液 有機幹細胞修護CC霜 潤澤防曬底霜 礦物質潤澤慕斯 礦物質奇幻粉餅 礦物質蜜粉 完美礦物粉底 控油定妝蜜粉 高清控油粉餅 控油蜜 保濕滋潤噴霧 有機抗氧爽膚噴霧 有機抗敏保濕

  3. I just want to tell you that I am very new to blogging and site-building and absolutely savored your blog. Most likely I’m want to bookmark your website . You certainly have exceptional stories. Thanks for sharing with us your website.

  4. 我們採用國際及美國食品及藥物管理局FDA認可的CO2 激光儀 LUTRONICS® SPECTRA SPR, 具安全性, 準確度高 . 二氧化碳激光可安全地去除皮膚上的癦痣、肉粒、疣、老人斑等問題。此激光的幼細光束可準確及直接地將要去除的組織氧化,過程快捷,傷口細小及乾淨,對周圍的皮膚傷害減至最少。一般1-2次就可永久去除。

  5. Hello there I am so thrilled I found your blog
    page, I really found you by error, while I was searching on Bing for something else, Regardless I am here
    now and would just like to say cheers for a tremendous post and a all round interesting blog (I also love the theme/design), I don’t have time
    to browse it all at the moment but I have book-marked it
    and also included your RSS feeds, so when I have time I
    will be back to read a great deal more, Please do keep up the great work. http://beestation.beeskee.com/wiki/index.php?title=Exercises_To_Improve_Penis_Size

  6. Thanks so much for giving everyone a very wonderful possiblity to read in detail from this website. It is often so good and as well , jam-packed with amusement for me and my office mates to visit your site at the least thrice per week to read the newest items you have got. Of course, I’m certainly fascinated considering the splendid tricks served by you. Certain two ideas in this article are undoubtedly the most suitable we have all had.

  7. Awesome blog! Do you have any tips and hints for aspiring writers?
    I’m hoping to start my own site soon but I’m a little lost on everything.
    Would you suggest starting with a free platform like WordPress or
    go for a paid option? There are so many choices out there that I’m
    completely confused .. Any recommendations? Cheers!

  8. After looking into a few of the blog articles on your site, I honestly appreciate your
    technique of writing a blog. I book marked it to my bookmark site list and will be checking
    back in the near future. Take a look at my web site too and tell
    me what you think.

  9. Hello there! I could have sworn I’ve been to this blog before but after reading through some of the post I realized it’s new to
    me. Nonetheless, I’m definitely glad I found it and I’ll
    be bookmarking and checking back frequently!

  10. This design is steller! You certainly know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved to start my own blog (well,
    almost…HaHa!) Excellent job. I really loved what you had
    to say, and more than that, how you presented it.
    Too cool!

LEAVE A REPLY

Please enter your comment!
Please enter your name here