How many blocks are replaced




















List the final state of the cache, Dec 31 AM. Vijay answered on January 02, Do you need an answer to a question different from the above? We want to correct this solution. Tell us more. Was the final answer of the question wrong?

Were the solution steps not detailed enough? Was the language and grammar an issue? Didn't find yours? Ask a new question Get plagiarism-free solution within 48 hours. Review Please. Next Previous. Create an Account and Get the Solution. Log into your existing Transtutors account. Have an account already? This is a way set-associative cache. Can we organize the blocks into four sets? Yes, we can. How about 8 sets? Each set would have 7 blocks. This is a 7-way set-associative cache.

How about 32? This is not possible. Storage Requirements. The data. The tags. The valid bits. The dirty bits. The LRU bits. The LRU bits are associated with the set. They tell us in which order the blocks within the set were accessed. As we explained we need at least lg ways!

Determining Hits and Misses. Given a cache with 8 four byte blocks determine how many hits and misses will occur. Since the block size is four bytes the lower two bits are the offset within the block. These are show in italics. Since there are 8 blocks, and this is a direct-mapped cache, there are 8 sets. Hence, the next 3 bits are the set.

These are underlined. Bring Block 00XX from memory into set Bring block 01XX from memory into set Bring block 10XX from memory into set Bring block 11XX from memory into set Bring block 00XX from memory into set Replace block 11XX. Bring Block 00XX from memory. Bring block 01XX from memory. Bring block 10XX from memory. Bring block 11XX from memory. Bring block 00XX from memory. Notes on Caches Andreas Moshovos Spring Please refer to the book for a complete treatment of caches.

Cache Indexing A cache is organized as a two-dimensional array of blocks. So the SET field is 9 bits wide. It follows that that TAG field is 24 — 9 — 3 bits wide.

Example 3 If we have 7KB of data cache and assuming B blocks what can the associativity be? How about 16 sets? Each set would have 4.



0コメント

  • 1000 / 1000