fully associative cache:
比如现在有1024个cache line,现在来了一个内存地址,那么就会有1024个计算单元同时来比较这1024个cache line的地址和这个内存地址是否匹配。 the complex hardware needed
direct mapped cache:
使用一个Hash函数,把每个地址可以换算成0到1023中的一个整数;映射到那个位置,就使用哪条cache line. may cause collisions of addresses to the same slot (similar to collisions in a hash table).
set associative cache:
比如我们可以将1024个cache line分成4路,也就是4*256组。对于每个地址,都可以将它换算成0到255中的一个整数。然后4个计算单元同时比较4路中对应位置的cache line是否和这个内存地址匹配。