Question

Q3. A computer has 128 MB of main memory organized logically as 32M blocks of 4 bytes each. It has a cache memory of 16 KB. A

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

Main memory size = 128 MB = \small 2^{27} \;bytes as 1 MB = \small 2^{20} \;bytes

Block Size = 4 Bytes

Number of blocks in main memory = 32 M = \small 2^{25}

Cache Memory Size = 16 KB = 214 bytes as 1 KB = \small 2^{10}\; bytes

a) Address lines for main memory = \small \bold{log_2(main \;memory \;size\;(in\;bytes)) = log_2{(2^{27})} = 27 \;bits}

b)

Number of lines in cache memory = (cache size / block size) = 16 KB / 4 B = 4 K = \small 2^{12}

Block index of Main memory (s) = \small log_2(number\;of\;blocks) = log_2(2^{25}) = 25 \;bits

word offset (w) = \small \bold{log_2(block\;size) = log_2(4) = 2 \;bits}

Line index (r) = \small \bold{log_2(number\;of\;blocks) = log_2(2^{12}) = 12 \;bits}

Cache Tag bits (s-r) = 25 - 12 = 13 bits

c)

Number of lines in cache memory = (cache size / block size) = 16 KB / 4 B = 4 K = \small 2^{12}

Number of sets in cache memory = (number of blocks / number of ways) = \small 2^{12} / 2 = \small 2^{11}

Block index of Main memory (s) = \small log_2(number\;of\;blocks) = log_2(2^{25}) = 25 \;bits

word offset (w) = \small \bold{log_2(block\;size) = log_2(4) = 2 \;bits}

Set index (d) = \small \bold{log_2(number\;of\;blocks) = log_2(2^{11}) = 11 \;bits}

Cache Tag bits (s-d) = 25 - 11 = 14 bits

Add a comment
Know the answer?
Add Answer to:
Q3. A computer has 128 MB of main memory organized logically as 32M blocks of 4...
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
  • Answer for this question plz Q1. a. Show how the decimal number (-120) will be represented...

    Answer for this question plz Q1. a. Show how the decimal number (-120) will be represented in the computer using THREE methods of 8-bit negative number representation. [3 Marks) b. Show how the real number 5308.75 will be represented in the computer using IEEE floating point format [2 marks] C. We want to design a circuit to detect the input sequence 11101 from a sequence of bits with accepted overlapped sequences. The circuit has a single bit input x and...

  • 7.3 What is the memory layout of the 16-bit value, 0x7654 in a big-endian 16-bit machine,...

    7.3 What is the memory layout of the 16-bit value, 0x7654 in a big-endian 16-bit machine, and a little-endian 16-bit machine? b. What would the layouts be in 32-bit machines? 7.19 A certain two-way set-associative cache has an access time of 4 ns, compared to a miss time of 60 ns. Without the cache, main memory access time was 50 ns. Running a set of bench-marks with and without the cache indicated a speedup of 90%. What is the approximate...

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

  • A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes/ca...

    A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes/cache line. Determine (1) the number of comparators needed and (2) the size of the tag field, for each of the following mapping schemes: a. Fully associative A computer system has a 64 KB main memory and a 4 KB (data area only) cache. There are 8 bytes/cache line. Determine (1) the number of comparators needed and (2) the size...

  • Assume the cache can hold 64 kB. Data are transferred between main memory and the cache...

    Assume the cache can hold 64 kB. Data are transferred between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K=2^14 lines of 4 bytes each. The main memory consists of 16 MB, with each byte directly addressable by a 24-bit address (2^24 =16M). Thus, for mapping purposes, we can consider main memory to consist of 4M blocks of 4 bytes each. Please show illustrations too for all work. Part...

  • Please refer the following memory system : Main memory : 64 MB Cache memory: 64 KB...

    Please refer the following memory system : Main memory : 64 MB Cache memory: 64 KB Block size of 1 KB 1. Direct Mapping Offset bits? Number of lines in cache? Line number bits? Tag size? 2. Fully Associative Mapping Offset bits? Tag size? 3. 2-way set-associative mapping Offset bits? Number of lines in cache? Set number bits? Tag size? 4. 4-way set-associative mapping Offset bits? Number of lines in cache? Set number bits? Tag size?

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

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

  • Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped...

    Given: An 8-bit computer system with 4 MB of main memory. It has a 16K-words direct-mapped cache with a block size of 16 Bytes. Sought: Calculate the cache line number when Byte address2271len from main memory is mapped to cache. Consider that numbering of main memory blocks and cache lines starts from zero. Express your answer in hexadecimal. It is required to show ALL incremental steps of the solution.

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