Solution To Problem1 of Assignment 2
Solution To Problem1 of Assignment 2
1. Consider a memory system that uses a 32-bit address to address at the byte level, plus a cache
that uses a 64-byte line size.
a. Assume a direct mapped cache with a tag field in the address of 20 bits. Show the address
format and determine the following parameters: number of addressable units, number of
blocks in main memory, number of lines in cache, size of tag.
Solution :
The no. of addressable units = 232 bytes.
b. Assume an associative cache. Show the address format and determine the following
Solution:
The no. of addressable units = 232 bytes.
Line size = 64 bytes (Given) = block size
Hence, size of word field = 6 bits, as 26 = 64.
The no. of main memory blocks = 232 / 64 = 226 = 64M blocks.
c. Assume a four-way set-associative cache with a tag field in the address of 9 bits.
Show the address format and determine the following parameters: number of addressable
units, number of blocks in main memory, number of lines in set, number
Solution:
The no. of addressable units = 232 bytes.
Total no. of cache lines = no. of sets X lines in a set = 2 17 X 4 = 219 lines.