Question

A direct-mapped cache has 4 blocks and each block holds four bytes of data. The memory system is byte-addressable. Determine
0 0
Add a comment Improve this question Transcribed image text
Answer #1

No of cache Blocks = 4 blocks = 22 // means 2 bits needed for index in cache block

Block size = 4 byte = 22 // means 2 bits needed for byte offset

6 bits...... Tagl 2 bits) Cache Block index (2 bits) Offset (2 bits) Cache Direct Mapping

Cache Block No Tag Match Miss/Hit Direct Mapp address (6 bits) Tag Index (2 bits) (2 bit) (cache block no) 00 11 Offset (2 bi

Note: In direct map cache First we go to particular cache block then we compare TAG bits if tag bits are match with already stored data in cache then it is called HIT, otherwise it is called MISS

No of hits = 05   

No of Miss =07

Total memory reference = 12

HIT Ratio = (5/12) =0.416

Miss Ratio = (7 /12) =0.583

Add a comment
Know the answer?
Add Answer to:
A direct-mapped cache has 4 blocks and each block holds four bytes of data. The memory...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Lab 8 final report A direct-mapped cache has 4 blocks and each block holds four bytes...

    Lab 8 final report A direct-mapped cache has 4 blocks and each block holds four bytes of data. The memory system is byte-addressable. Determine if each of the memory references below is a hit (H) or miss (M). You assume the cache is initially empty and memory references are given in decimal. 12 21 13 32 27 23 34 19 34 23 36 39 REFE RENC E H/M? I

  • A direct-mapped cache has 4 blocks and each block holds four bytes of data. The memory...

    A direct-mapped cache has 4 blocks and each block holds four bytes of data. The memory system is byte-addressable. Determine if each of the memory references below is a hit (H) or miss (M). You assume the cache is initially empty and memory references are given in decimal. Reference 27 0 13 24 50 24 36 14 48 45 47 48 H/M?

  • 12,21,13,32,27,23,34,19,34,23,36,39 estion 16 12 points A direct-mapped cache has 4 blocks and each block holds four...

    12,21,13,32,27,23,34,19,34,23,36,39 estion 16 12 points A direct-mapped cache has 4 blocks and each block holds four bytes of data. The memory system is byte addressable Determine if each of the memory references below is a hit H) or miss (Ml. You assume the cach Reference 12 21 13 32 27 23 HIM? Moving to another question will save this response Question 16 of 18 Case Window 888 Am 4 @ JN 5 3 8 0 D W E 70 T...

  • Consider a direct-mapped cache with 32 blocks Cache is initially empty, Block size = 16 bytes...

    Consider a direct-mapped cache with 32 blocks Cache is initially empty, Block size = 16 bytes The following memory addresses (in hexadecimal) are referenced: 0x2B4, 0x2B8, 0x2BC, 0x3E8, 0x3EC,0x4F0, 0x8F4, 0x8F8, 0x8FC. Map addresses to cache blocks and indicate whether hit or miss

  • QUESTION 2 Suppose a computer using direct mapped cache has 216 bytes of byte-addressable main memory...

    QUESTION 2 Suppose a computer using direct mapped cache has 216 bytes of byte-addressable main memory and a cache of 64 blocks, where each cache block contains 32 bytes. a. How many blocks of main memory are there? b) What is the format of a memory address as seen by the cache, (include field names and their sizes) c) To which cache block will the memory address (F8C916 map? What address in that block does it map to?

  • Question 33 10 pts For a direct mapped cache of 4 blocks with a cache block...

    Question 33 10 pts For a direct mapped cache of 4 blocks with a cache block size of 1 byte, in which cache block will each memory location map to? The order of accesses if given by the operation number. Indicate if each access is a hit or a miss, and what the tag value is for each entry. Assume that the cache is initially empty, and the accesses are in order of appearance. REDRAW AND COMPLETE THE CACHE TABLE...

  • A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes...

    A direct-mapped cache consists of 8 blocks. Byte-addressable main memory contains 4K blocks of 8 bytes each. Access time for the cache is 22ns, and the time required to fill a cache slot from main memory is 300ns. (This time allows us to determine the block is missing and bring it into cache.) Assume a request is always started in parallel to both cache and to main memory(so if it is not found in cache, we do not have to...

  • Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a...

    Suppose a computer using direct mapped cache has 232 byte of byte-addressable main memory, and a cache of 1024 blocks, where each cache block contains 32 bytes. a. How many blocks of main memory are there? b. What is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag, block, and offset fields? c.To which cache block will the memory address 0x000063FA map?

  • Assuming a direct-mapped cache with 4 four-word blocks that is initially empty, label each reference in...

    Assuming a direct-mapped cache with 4 four-word blocks that is initially empty, label each reference in the list as a hit or a miss and show the final contents of the cache. The following is a sequence of address references given as word addresses. 1, 5, 8, 4, 17, 19, 20, 6, 9, 8, 43, 5, 6, 21, 9, 17 Reference Hit or Miss Miss 17 19 20 43 Wordo Wordi Word2 Word 3 Block

  • For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram....

    For a 16K-byte, direct-mapped cache, suppose the block size is 32 bytes, draw a cache diagram. Indicate the block size, number of blocks, and address field decomposition (block offset, index, and tag bit width) assuming a 32-bit memory address.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT