CS 3853 Computer Architecture Recitation 8 Answers
Quiz 6a
- 16K = 214, so 14 bits for the page offset. Bits for the page number: 52 - 14 = 38.
- 32 = 25, so 5 bits for the block offset.
Number of blocks = 8K/32 = 256. Number of sets = 256/2 = 27, so 7 bits for the index.
- 43 - 5 - 7 = 31 bits for the tag.
Quiz 6b
- 32K = 215, so 15 bits for the page offset. Bits for the page number: 50 - 15 = 35.
- 128 = 27, so 7 bits for the block offset.
Number of blocks = 32K/128 = 256. Number of sets = 256/4 = 26, so 6 bits for the index.
- 42 - 7 - 6 = 29 bits for the tag.
Problems
-
- 64 (virtual address size)
- 49 (a - c)
- 15 (page size is 32K = 215)
- 43 (b - e)
- 6 (64 = 26, TLB is direct mapped)
- 8 (c - g)
- 7 (128 = 27, cache block size)
- 43 (same as d)
- 27 (number of bits in a frame number = m - c)
- 27 (same is i)
- 1024 (bits in an L1 cache block = 128*8)
- 27 (same as i)
- 42 (physical address size)
- 20 (m - o - p)
- 15 (number of blocks in L2 cache is 8MB/128 = 64K, number of sets = 32K = 215)
- 7 (same as g since both caches have the same block size)
- 20 (same as n)
- 1024 (bits in an L2 cache block)
- 1 + .02 × 20 = 1.4
- Time to transfer 64 bytes: 64/10,000,000,000 = 64 × 10-10 seconds = 6.4 ns, so the
total time is 36.4 ns.
- 1 + 1.2 × .02 × 30 = 1.72