Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given a direct mapped cache with 16 blocks of size equal to 1 word, label each w

ID: 3578129 • Letter: G

Question

Given a direct mapped cache with 16 blocks of size equal to 1 word, label each word-level memory reference in the following sequence a hit or a miss, and show the final contents of the cache:
13, 1, 12, 38, 89, 2, 2, 2, 4, 39, 40, 41.

#2) Repeat, but now let the block size = 2 words, wherein 2 words of memory are loaded in to fill a cache block for each miss on a request. Thus a request for memory word address 1 word prompt the caching system load in memory addresses [0,1] (0 AND 1) into the first 2-word block location.  
For this problem, let the total size of the cache remains the same — so half as many blocks, but each twice as big.

#3) Repeat the exercise from #1 using the same sequence, and with a block size = 1 word, same cache size, but use a 2-way set associative scheme scheme with LRU replacement .

Explanation / Answer

1) Here we have 16 block each with 1 word size, hence cache from 0 to 15

Address Hit/Miss Description 13 Miss Fetched 13 and keep in cache 13 1 Miss Fetched 1 and keep in cache 1 12 Miss Fetched 12 and keep in cache 12 38 Miss Fetched 38 and keep in cache 6 89 Miss Fetched 89 and keep in cache 8 2 Miss Fetched 2 and keep in cache 2 2 Hit Already in cache 2 2 Hit Already in cache 2 4 Miss Fetched and keep in cache 4 39 Miss Fetched 39 and keep in cache 7 40 Miss Fetched 40 and keep in cache 8 , replaces 89 41 Miss Fetched 41 and keep in cache 9
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote