CS-343 Chapter 7 Study Guide

Disclaimer

Studying this web page will not prepare you for the final exam. It simply lists some terms you should be familiar with and provides you with solutions to some homework exercises that can't be put on public web sites.

In addition to this material, you need to review all reading assignments, homework assignments/solutions, and class notes pertaining to chapters 6 and 7.

Define Terms

Here are some terms you should be able to define:

Unpublished Solutions for Assignment 11

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 (Not assigned) 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.