Operations in Cache Memory

  • The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere. 
  • If requested data is contained in the cache (cache hit), this request can be served by simply reading the cache, which is comparatively faster.
  • Otherwise (cache miss), the data has to be recomputed or fetched from its original storage location, which is comparatively slower.
  • To be cost efficient and to enable an efficient use of data, caches are relatively small.
  • References exhibit temporal locality if data is requested again that has been recently requested already.
  • References exhibit spatial locality if data is requested that is physically stored close to data that has been requested already.

Cache operation

  • CPU requests contents of memory location.
  • Check cache for this data.
  • If present, get from cache (fast).
  • If not present, read required block from main memory to cache.
  • Then deliver from cache to CPU.
  • Cache includes tags to identify which block of main memory is in each cache slot.

Definition of Hit and Miss Ratios

Hit ratio

  • Percentage of requests satisfied from cache
  • Given as value between 0 and 1

Miss ratio

  • Percentage of requests not satisfied from cache
  • Equal to 1 minus hit ratio

Comments

Popular posts from this blog

Pentium microprocessors

Multilevel Organization of Cache Memory