Block Placement

There are three methods in block placement:

Direct mapped : if each block has only one place it can appear in the cache, the cache is said to be direct mapped. The mapping is usually

(Block address) MOD (Number of blocks in cache)

Fully Associative : if a block can be placed anywhere in the cache, the cache is said to be fully associative.

Set associative : if a block can be placed in a restricted set of places in the cache, the cache is said to be set associative . A set is a group of blocks in the cache. A block is first mapped onto a set, and then the block can be placed anywhere within that set.
The set is usually chosen by bit selection; that is,

(Block address) MOD (Number of sets in cache)

The range of caches from direct mapped to fully associative is really a continuum of levels of set associativity: Direct mapped is simply one-way set associative and a fully associative cache with m blocks could be called m -way set associative.

The vast majority of processor caches today are direct mapped, two-way set associative, or four-way set associative.