1Textbook Readings¶
P&H 5.1-5.4, 5.8, 5.9, 5.13
2Additional References¶
Amazing Illustrations by Ketrina (Yim) Thompson: CS Illustrated Cache Handouts
3Exercises¶
Check your knowledge!
3.1Short Exercises¶
True/False: Increasing cache size by adding more blocks always improves (increases) hit rate for all programs
Solution
False. Whether this improves the hit rate for a given program depends on the characteristics of the program. For example, a program that loops through an array once may have each access be separated by more than one block (e.g., if the block size is 8B but we access every fourth element of an integer array, our accesses are separated by 16B). This results in compulsory misses, which cannot be reduced just by adding more blocks to the cache.