Question: Suppose you have a 16-bit machine with a 16-entry direct-mapped cache. Each cache entry can hold 256 bytes of data. A program is run on
Suppose you have a 16-bit machine with a 16-entry direct-mapped cache. Each cache entry can hold 256 bytes of data. A program is run on this machine that makes the following memory accesses in hexadecimal (each memory address addresses a byte of data):
3F8E, 4F8E, 4F8D, 4FC2, 0000, 0000, 2F01, 4F8E, 2F67, 2268, 2F69, 2E32
a. How many bits wide is the cache's tag field?
b. Assuming the cache is initially empty, what are the final contents of the cache after the program runs? Draw a diagram of the cache showing all its fields, but fill in the tag fields only!
c. Suppose a cache hit takes 10 ns, a cache miss takes 200 ns, and a memory access without a cache takes 190 ns. How much time is saved by this cache on this program over an equivalent cacheless machine running this program?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
