Su cument Viewer 175% (413 of 793)Q Computer.Organization and Desig.. Chapter 5
ID: 3708841 • Letter: S
Question
Su cument Viewer 175% (413 of 793)Q Computer.Organization and Desig.. Chapter 5 Large and Fast: Exploiting Memory Hierarchy Bits in a Cache How many total bits are required for a direct-mapped cache with 16 KiB of data and 4-word blocks, assuming a 32-bit address? We know that 16 KiB is 4096 (22) words. With a block size of 4 words (22), there are 1024 (210) blocks. Each block has 4 X 32 or 128 bits of data plus a tag, which is 32 -10 2 2 bits, plus a valid bit. Thus, the total cache size is 210 x (4 x 32 (32 10 2 2) + 1)-210 x 147 147 Kibibits or 18.4 KiB for a 16 KiB cache. For this cache, the total number of bits in the cache is about 1.15 times as many as needed just for the storage of the data. Mapping an Address to a Multiword Cache Block Consider a cache with 64 blocks and a block size of 16 bytes. To what block number does byte address 1200 map? We saw the formula on page 384. The block is given byExplanation / Answer
Solution:
Block size = 16 bytes
cache is with 64 blocks (number of blocks)
number of bits for block size = 2^4=> 4 bits
1200 in binary is
10010110000
6 bits of the set is 001011
= 11th block
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)