Direct-Mapped Cache
This programming assignment builds off the Module 10 Direct-mapped Cache assignment. Write a C
program that simulates the 16-byte memory segment and 8-byte cache. Given the series of memory
accesses noted, write the necessary code to complete and output the table below.
Use the first Contents/Tag column to insert an item to the cache the first time and use the second
Contents/Tag column if a cache entry is overwritten. Note: no index will have more than two blocks
mapped to it. The first two examples have been provided.
Lastly, count and output how many cache hits occur given the memory accesses. Count and output how
many cache misses that have occurred.
Remember, the strategy is to overwrite existing elements in the cache if cache slot is already full.
The post Direct-Mapped Cache appeared first on My Assignment Online.