The main memory of a computer is organized as 128 blocks, with a block size of 16 words. The cache has eight block frames. In part (a) through (c), show the mappings from the numbered blocks in main memory to the block frames in the cache. Draw all lines showing the mappings as clearly as possible.
a) Show the direct mapping and the address bits that identify the tag field, the block number, and the word number.
b) Show the fully associative mapping and the address bits that identify the tag field, and the word number.
c) Show the two-way set-associative mapping and the address bits that identify the tag field, the set number, and the word number.
d) Consider the memory organization in (c), what is the hit ratio for a program that loops 3 times from locations 8 to 51 in main memory? You may leave the hit ratio in terms of a fraction.