A type of cache, conceptually between a fully-associative cache and a direct-mapped cache.

The cache is divided into a number of sets. A cache with four sets would be known as a Four-Way Set-Associative Cache. Each set will contain a large number of blocks. The most significant bits of the main store block address are used to index one of the blocks of every set. Each set is arranged like a direct-mapped cache, so that it has to record the rest of the main store block address as a Tag. So, although a memory block's location within a set is determined, the cache may store a memory block in any of its sets. This means that with 4 sets, four separate memory blocks with the same most significant bits can be cached.

Only one comparitor is required for each set to compare the desired block address with the cached tag.

A direct-mapped cache can be seen as a One-Way Set-associative cache, and a fully-associative cache can be seen as a set-associative cache were each set contains only one block.

Log in or register to write something here or to contact authors.