CS2400 HomeWork
CS2400 Fall 2020
Homework 05 (50 Points) – Due Nov 30th 2020
1. Here is a series of address references given as word addresses: 2, 3, 11,
16, 21, 13, 64, 48, 19, 11, 3, 22, 4, 27, 6 and 11. (5 Points)
a. Assuming a Direct-mapped cache with 16 one-word blocks that is
initially empty, Find number of hits and misses.
b. Now assume that the cache is a 2-way set associative, one-word
blocks, total 16-word capacity, Find number of hits and misses.
2. A computer is using a fully associative cache and has 216 bytes of
memory and a cache of 64 blocks, where each block contains 32 bytes.
(15 points)
a. How many blocks of main memory are there?
b. What will be the sizes of the tag, index, and byte offset fields?
c. To w h i c h c a c h e s e t w i l l t h e m e m o r y a d d r e s s
0xF8C9(hexadecimal) map?
3. A computer using a direct mapped cache has 220 Bytes of memory and a
cache of 32 blocks, each block contains 16 Bytes. (15)
a. How many blocks of main memory are there?
b. What will be the sizes of the tag, index, and byte offset fields?
c. To which cache set will the memory address 0x0DB63 map?
4. Suppose we have a 4 GB memory that is byte addressable, and a 2 MB
cache with 256 bytes per block. (15 points)
a. How many total lines are in the cache?
b. If the cache is direct mapped, how many cache lines could a
specific memory block be mapped to?
c. If the cache is direct mapped, what would be the format (tag
bits, index, offset bits) of the address?
R@R
1
CS2400 HomeWork
CS2400 Fall 2020
Submit the files with answers in doc or pdf format in Canvas before the
due date.
R@R
2