Types of caches and which is better. How does the cache fetch a data from the main memory?
Sigiloso
Response to the first part: The fundamental types of caches are direct-mapped cache, set-associative cache and fully associative cache. The question of "the best" type of cache is dependent on the objective and there are trade-offs: a small direct-mapped cache is the fastest scheme but it also exhibits the highest miss rate and is prone to conflict misses. A set-associative cache alleviates conflict misses, and the miss rate scales down with an increase in the number of sets; however, the higher the number of sets, the larger the latency for retrieving words i.e. high hit time. A fully associative cache has the lowest miss rate but the highest hit time.