Segmented or protected lru segmented or protected lru

This preview shows page 16 - 23 out of 23 pages.

Segmented or Protected LRU Segmented or Protected LRU [I/O: Karedla, Love, Wherry, IEEE Computer 27(3),  1994] [Cache: Wilkerson, Wade, US Patent 6393525, 1999] Partition LRU list into  filter  and  reuse  lists On insert, block goes into  filter  list On reuse (hit), block promoted into  reuse  list Provides scan & some thrash resistance Blocks without reuse get evicted quickly Blocks with reuse are protected from scan/thrash  blocks No storage overhead, but LRU update  slightly more complicated 16
Image of page 16

Subscribe to view the full document.

Protected LRU: LIP Protected LRU: LIP Simplified variant of this idea: LIP Qureshi et al. ISCA 2007 Insert new blocks into LRU position,  not MRU position Filter list  of size 1,  reuse list  of size (a-1) Do this adaptively: DIP Use  set dueling  to decide LIP vs. LRU 1 (or a few) set uses LIP vs. 1 that uses  LRU Compare hit rate for sets Set policy for all other sets to match best  17
Image of page 17
Not Recently Used (NRU) Not Recently Used (NRU) Keep NRU state in 1 bit/block Bit is set to 0 when installed (assume reuse) Bit is set to 0 when referenced (reuse observed) Evictions favor NRU=1 blocks If all blocks are NRU=0 Eviction forces all blocks in set to NRU=1 Picks one as victim (can be pseudo-random, or rotating, or  fixed left-to-right) Simple, similar to virtual memory clock algorithm Provides some scan and thrash resistance Relies on “randomizing”  evictions rather than strict LRU  order Used by Intel Itanium, Sparc T2 © Shen, Lipasti 18
Image of page 18

Subscribe to view the full document.

Least Frequently Used Least Frequently Used Counter per block, incremented on  reference Evictions choose lowest count Logic not trivial ( a 2  comparison/sort) Storage overhead 1 bit per block: same as NRU How many bits are helpful? © Shen, Lipasti 19
Image of page 19
© 2005 Mikko Lipasti 20 Pitfall: Cache Filtering Effect Pitfall: Cache Filtering Effect Upper level caches (L1, L2) hide reference  stream from lower level caches Blocks with “no reuse”  @ LLC could be very  hot (never evicted from L1/L2) Evicting from LLC often causes L1/L2  eviction (due to inclusion) Could hurt performance even if LLC miss  rate improves
Image of page 20

Subscribe to view the full document.

21 Recap Recap Replacement policies affect  capacity  and  conflict  misses Policies covered: Belady’s optimal replacement Least-recently used (LRU) Practical pseudo-LRU (tree LRU) Protected LRU LIP/DIP variant Set dueling  to dynamically select  policy Not-recently-used (NRU) or  clock   algorithm Least frequently used (LFU)
Image of page 21
References References S. Bansal and D. S. Modha. “CAR: Clock with Adaptive Replacement”, In FAST, 2004.
Image of page 22

Subscribe to view the full document.

Image of page 23
You've reached the end of this preview.
  • Fall '09
  • PROFGURISOHI
  • CPU cache, Cache algorithms, cache replacement policies, Mikko Lipasti

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern