sector mapping

sector mapping

In this scheme the memory and cache are divided into blocksof 2^m bytes (the cache line size). A sector consists of2^n consecutive blocks.

When a block is cached, it is read into the correct positionin any sector of the cache, given by discarding the bottom maddress bits and taking the next n as the block number withinthe sector.

That whole sector is then tagged with the remaining upperaddress bits and the other blocks in the sector are marked asinvalid. This scheme takes advantage of locality of referenceto consecutive blocks and needs fewer tags thus reducing thecost of associative access to the tags.