Drag

# 作业代写｜CSEE W3827 – Fundamentals of Computer Systems HW #9

## Topics: Caching

Note that this homework has 3 problems and is 1 pages long.

1. Here is a series of address references given as word addresses: 5, 7, 13, 15, 5, 19, 21, 5, 7, 13, 22, 5, 23 Assuming a direct-mapped cache with 16 one-word blocks that is initially empty, label each reference in the list as a hit or a miss and show the fifinal contents of the cache.
1. Repeat the above labelling, but for the case where there are four 4-word blocks in the cache.Same as question 1, except the block of 4 addresses is pulled into the cache per address request.
1. Consider a computer architecture that has a dynamically changing caching policy, such that it changes either the blocksize or the associativity of the caching policy in the middle of execution. In some cases, the change may require the computer to invalidate existing blocks in the cache because the blocks stored under the old caching policy are either misplaced or incomplete according to the new policy. For each case below, indicate whether the change may lead to blocks in the cache that are no longer valid, or if all blocks that were in the cache before the change remain valid after the change.

For each case, perform an example using an initial blocksize of 16 words per block, and a cache containing 256 words (i.e., initially it contains 16 blocks). For the case where the change may lead to an invalid block in cache,give an example. For the case where the block always remains valid, use an example to demonstrate why, 2 or 3 sentences per case below should suffifice. Don’t write a novel!

(a) Direct-mapped: blocksize doubles from 16 words / block to 32 words / block

(b) Direct-mapped: blocksize halves from 16 words / block to 8 words / block

(c) Fully assoc: blocksize doubles from 16 words / block to 32 words / block

(d) Fully assoc: blocksize halves from 16 words / block to 8 words / block

(e) Set assoc, goes from 4-way to 8-way associative

(f) Set assoc, goes from 4-way to 2-way associative