CS-343 Assignment 7 Solutions

Define Terms

Exercises

7.1 The authors' answer:

There are several reasons why you may not want to build large memories out of SRAM. SRAMs require more transistors to build than DRAMs and subsequently use more area for comparably sized chips. As size increases, access times increase and power consumption goes up. On the other hand, not using the standard DRAM interfaces could result in lower latency for the memory, especially for systems that do not need more than a few dozen chips.

The authors provide a blanket answer for 7.2 through 7.4:

The key features of solutions to these problems:

7.5 Use write-back for data-intensive applications. There will probably be multiple writes to each block before it needs to be replaced, and delaying the memory update until they have all completed can reduce the bandwidth demands on the memory bus. But for the best reliability, use write-through so the data in memory is always valid, and can be re-read in case of a cache failure.

7.9 2: miss, 3: miss, 11: miss, 16: miss, 21: miss, 13: miss, 64: miss, 48: miss, 19: miss, 11: hit, 3: miss, 22: miss, 4: miss, 27: miss, 6: miss, 11: miss. Final contents are in boldface:

Cache SetAddresses
000016, 64, 48
0001
00102
00113, 19, 3
01004
010121
011022, 6
0111
1000
1001
1010
101111, 11(hit), 27, 11
1100
110113
1110
1111

7.10 2: miss, 3: hit, 11: miss, 16: miss, 21: miss, 13: miss, 64: miss, 48: miss, 19: miss, 11: hit, 3: miss, 22: hit, 4: miss, 27: miss, 6: hit, 11: miss

Cache SetAddresses
001, 3(h), 16, 64, 48, 19, 3
0121, 22(h), 4, 6(h)
1011, 11(h), 27, 11
1113

7.12 Sixteen words per block is 24 * 25 = 29 = 512 bits per block. Each tag field is 32 - (8+6) = 18 bits, and there is one valid bit, so there are 512 + 18 + 1 = 531 bits per block. There are 256 blocks, for a total of 135,936 bits of storage in the cache.

7.14 The miss penalty is the time to transfer one block from main memory to the cache. Assume that it takes 1 clock cycle to send the address to the main memory.


Valid XHTML 1.1 Valid CSS