Cache Mapping

OS loads data from Secondary Memory to RAM and then Blocks of main memory are map to cache lines. This process called the cache mapping.

The main memory is divide into no. of blocks and Cache memory divided into no. of lines. The block size of the main memory is equal to the line size of the cache memory.

Need of Cache

CPU works in GIPS (Gaga instruction per second) or MISP (Mega instruction per second), While Main memory works in millisecond per second

(CPU 1hr=   HD 10lakh hour)

So to maintain speed we use RAM, Cache and registers. We don’t use all memory as RAM because it is too costly.

How Blocks of Main Memory are fit into Lines of Cache?

There are three basic types of cache mapping which are explain below

  1. Direct Mapping
  2. Fully associative mapping
  3. K-way Set associative

We will explain all with examples in the next lectures

Help Other’s By Sharing…

Contact Us

Burewala, Vehari, Punjab, Pakistan

cstaleem1@gmail.com

Website: CStaleem.com

Pin It on Pinterest