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

Problem #3 ain Computer Organization and Architecture A 256-byte direct mapped c

ID: 3843529 • Letter: P

Question

Problem #3 ain Computer Organization and Architecture A 256-byte direct mapped cache with 8-byte blocks receives requests for the following addresses (represented in hexadecimal): 010, 01C, 018, 010, 484, 51C, 01C, 210, 51C (byte-addresses) (a) Show how the 12-bit address is treated in performing a cache reference.
(b) In your cache, what will be the tags at the end of the sequence? Assume that cache is initially empty. Determine hit ratio and show the final states of the cache (including tag bits and valid bit). Show all of your work to get full-credit.
(c) Determine the total size of the cache in bits including the tag and valid bit. Problem #3 ain Computer Organization and Architecture A 256-byte direct mapped cache with 8-byte blocks receives requests for the following addresses (represented in hexadecimal): 010, 01C, 018, 010, 484, 51C, 01C, 210, 51C (byte-addresses) (a) Show how the 12-bit address is treated in performing a cache reference.
(b) In your cache, what will be the tags at the end of the sequence? Assume that cache is initially empty. Determine hit ratio and show the final states of the cache (including tag bits and valid bit). Show all of your work to get full-credit.
(c) Determine the total size of the cache in bits including the tag and valid bit. Problem #3 ain Computer Organization and Architecture A 256-byte direct mapped cache with 8-byte blocks receives requests for the following addresses (represented in hexadecimal): 010, 01C, 018, 010, 484, 51C, 01C, 210, 51C (byte-addresses) (a) Show how the 12-bit address is treated in performing a cache reference.
(b) In your cache, what will be the tags at the end of the sequence? Assume that cache is initially empty. Determine hit ratio and show the final states of the cache (including tag bits and valid bit). Show all of your work to get full-credit.
(c) Determine the total size of the cache in bits including the tag and valid bit.

Explanation / Answer

n equivalent way to find the right location within the cache is to use arithmetic again. We can find the index in two steps, as outlined earlier. — Do integer division of the address by 2n to find the block address. — Then mod the block address with 2k to find the index. The block offset is just the memory address mod 2n . For example, we can find address 13 in a 4-block, 2-byte per block cache. — The block address is 13 / 2 = 6, so the index is then 6 mod 4 = 2. — The block offset would be 13 mod 2 = 1.

Again, byte i of a memory block is stored into byte i of the corresponding cache block. — In our example, memory block 1536 consists of byte addresses 6144 to 6147. So bytes 0-3 of the cache block would contain data from address 6144, 6145, 6146 and 6147 respectively. — You can also look at the lowest 2 bits of the memory address to find the block offsets. Block offset Memory address Decimal 00 00..01 1000000000 00 6144 01 00..01 1000000000 01 6145 10 00..01 1000000000 10 6146 11 00..01 1000000000 11 6147

The direct-mapped cache is easy: indices and offsets can be computed with bit operators or simple arithmetic, because each memory address belongs in exactly one block. But, what happens if a program uses addresses

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