Question

Suppose that a main memory has 8192 blocks each block having 32 words. Show the memory...

Suppose that a main memory has 8192 blocks each block having 32 words. Show the memory address format (see figures 4.10 and 4.12 of your textbook for examples) for each of the cache organizations below.

a. a direct map cache with 64 lines of 32 words each

b. a set associative cache with 16 sets each with four lines of 32 words each

c. a fully associate cache with 128 lines of 32 words each

PLEASE EXPLAIN IN DETAIL

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Number of blocks in Main memory size = 8192= 213

Block Size = 32 Words = 25 words

Memory Size = 213 * 25 = 218 words

Memory address = 18 bits

a) Direct Map Cache

Number of lines = 64 = 26 => Line offset = 6 bits

Line Size = 32 Words = 25 => Word offset = 5 bits

Remaining Tag bits = 18 - 5 - 6 = 7 bits

Tag Line Offset Word Offset
7 6 5

b) 4-Way Set-associative Cache

Number of Sets = 16 = 24 => Set offset = 4 bits

Line Size = 32 Words = 25 => Word offset = 5 bits

Remaining Tag bits = 18 - 5 - 4 = 9 bits

Tag SetOffset Word Offset
9 4 5

c) Fully-associative Cache

Number of Lines = 128 = 27

Line Size = 32 Words = 25 => Word offset = 5 bits

Remaining Tag bits = 18 - 5 = 13 bits

Fully associative cache only have tag and word offset as it directly maps main memory block.

Tag    Word Offset
13 5
Add a comment
Know the answer?
Add Answer to:
Suppose that a main memory has 8192 blocks each block having 32 words. Show 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
  • Suppose a computer has 216 words of main memory, and a cache of 64 blocks, where...

    Suppose a computer has 216 words of main memory, and a cache of 64 blocks, where each cache block contains 32 words. Please explain step by step. a) If this cache is a direct-mapped cache, what is the format of a memory address as seen by the cache, i.e., what are the sizes of the tag and word fields? b) To which cache block will the memory reference F8C9 map?   c) If this cache is fully associative, what is the...

  • Suppose a computer using set associative cache has 216 words of main memory and a cache...

    Suppose a computer using set associative cache has 216 words of main memory and a cache of 32 blocks, and each cache block contains 8 words. 3. If this cache is 2-way set associative, what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, set, and word fields? If this cache is 4-way set associative, what is the format of a memory address as seen by the cache?...

  • 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?

  • Problem 6. Suppose we have a computer with 32 megabytes of main memory, 256 bytes of...

    Problem 6. Suppose we have a computer with 32 megabytes of main memory, 256 bytes of cache, and a block size of 16 bytes. For each configuration below, determine the memory address format, indicating the number of bits needed for each appropriate field (i.e. tag, block, set, offset). Show any relevant calculations. Direct cache mapping and memory is byte-addressable a) Direct cache mapping and memory is word-addressable with a word size of 16 bits b) c) 2-way set associative cache...

  • 1- A 64-bit computer system employs a 16Gbyte main memory and a 32 Kilo word cache. Determine the...

    1- A 64-bit computer system employs a 16Gbyte main memory and a 32 Kilo word cache. Determine the number of bits in each field of the memory address register (MAR) as seen by cache in the following organizations (show your calculations): Fully associative mapping with line size of 2 words. A. Direct mapping with the line size of 8 words. B. C. 4-way associated mapping with the line size of 1 words. 1- A 64-bit computer system employs a 16Gbyte...

  • Name #5 Suppose a compute memory and a cache of 1024 blocks, where each cache block...

    Name #5 Suppose a compute memory and a cache of 1024 blocks, where each cache block contains a) How many blocks of main memory are there? b) Wha r using direct mapped cache has 4bytes of byte-addressable main t is the format of a memory address as seen by the cache; that is, what are the sizes of the tag, block, and offset fields? To which cache block will the memory address 0x000063FA map? c)

  • A computer with a 24‐bit address bus has a main memory of size 16 MB and...

    A computer with a 24‐bit address bus has a main memory of size 16 MB and a cache size of 64 KB. The word length is two bytes. a. What is the address format for a direct mapped cache with a line size of 32 words? b. What is the address format for a fully associative cache with a line size of 32 words? c. What is the address format for a 4‐way set associative cache with a line size...

  • 6. A 2-way set associative cache consists of four sets. Main memory contains 2K blocks of...

    6. A 2-way set associative cache consists of four sets. Main memory contains 2K blocks of eight words each. a. Show the main memory address format that allows us to map addresses from main memory to cache. Be sure to include the fields as well as their sizes. b. Compute the hit ratio for a program that loops 5 times from locations 8 to 51 in main memory. You may leave the hit ratio in terms of a fraction.

  • Suppose a computer using a fully associative cache has 232 bytes of byte-addressable main memory and...

    Suppose a computer using a fully associative cache has 232 bytes of byte-addressable main memory and a cache of 1024 blocks, were each cache block contains 32 bytes. Consider a memory address as seen by the cache. How many bits are in the tag field?

  • 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?

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
ADVERTISEMENT