Skip to main content

I guess you got the access time wrong. Access time means time to locate a data on a memory. So, whoever accesses the memory (be it CPU or some other device) it will be the same.

Coming to first question here. A block is transferred from L2 to L1. And L1 block size in L2 is 16being 4 words and so these 16 words must be brought to L1. And since data bandwidth isbeing 4 wordsbytes, this would require 4 accesses toit requires 1 L2 access (for read) and for accesses to1 L1 which would give 4 * 20 + 4 * 2 = 88ns transferaccess (for store). So, time = 20+2 = 22 ns.

For the second question, it is mentioned that an entireL2 block is transferred from mainsize being 16 words and bandwidth between memory to L2 and then to L1. SoL2 being 4 words, main memory is accesseswe require 4 timesmemory access (as data width is 4 words and block size is 16 wordsfor read) and L2 is accessed 4 timesL2 access (for store). Now, these 16 words are transferred from L2we need to L1. (Question clearly says that this happens aftersend the previous operation -> first a block is transferred from main memory to L2 cache, and then arequested block is transferred from L2 cache to L1 cache). Thiswhich would mean 4require 1 more L2 accessesaccess (for read) and 41 L1 accessesaccess (for store). So, total transfer time

= 4 * (200 + 20) + 4 *   (20 + 2)

= 880 + 8822

= 968902 ns

I guess you got the access time wrong. Access time means time to locate a data on a memory. So, whoever accesses the memory (be it CPU or some other device) it will be the same.

Coming to first question here. A block is transferred from L2 to L1. And block size in L2 is 16 words and so these 16 words must be brought to L1. And since data bandwidth is 4 words, this would require 4 accesses to L2 and for accesses to L1 which would give 4 * 20 + 4 * 2 = 88ns transfer time.

For the second question, it is mentioned that an entire block is transferred from main memory to L2 and then to L1. So, main memory is accesses 4 times (as data width is 4 words and block size is 16 words) and L2 is accessed 4 times. Now, these 16 words are transferred from L2 to L1. (Question clearly says that this happens after the previous operation -> first a block is transferred from main memory to L2 cache, and then a block is transferred from L2 cache to L1 cache). This would mean 4 L2 accesses and 4 L1 accesses. So, total transfer time

= 4 * (200 + 20) + 4 * (20 + 2)

= 880 + 88

= 968

I guess you got the access time wrong. Access time means time to locate a data on a memory. So, whoever accesses the memory (be it CPU or some other device) it will be the same.

Coming to first question here. A block is transferred from L2 to L1. And L1 block size being 4 words and data bandwidth being 4 bytes, it requires 1 L2 access (for read) and 1 L1 access (for store). So, time = 20+2 = 22 ns.

For the second question, L2 block size being 16 words and bandwidth between memory and L2 being 4 words, we require 4 memory access (for read) and 4 L2 access (for store). Now, we need to send the requested block to L1 which would require 1 more L2 access (for read) and 1 L1 access (for store). So, total time

= 4 * (200 + 20) +   (20 + 2)

= 880 + 22

= 902 ns

Source Link

I guess you got the access time wrong. Access time means time to locate a data on a memory. So, whoever accesses the memory (be it CPU or some other device) it will be the same.

Coming to first question here. A block is transferred from L2 to L1. And block size in L2 is 16 words and so these 16 words must be brought to L1. And since data bandwidth is 4 words, this would require 4 accesses to L2 and for accesses to L1 which would give 4 * 20 + 4 * 2 = 88ns transfer time.

For the second question, it is mentioned that an entire block is transferred from main memory to L2 and then to L1. So, main memory is accesses 4 times (as data width is 4 words and block size is 16 words) and L2 is accessed 4 times. Now, these 16 words are transferred from L2 to L1. (Question clearly says that this happens after the previous operation -> first a block is transferred from main memory to L2 cache, and then a block is transferred from L2 cache to L1 cache). This would mean 4 L2 accesses and 4 L1 accesses. So, total transfer time

= 4 * (200 + 20) + 4 * (20 + 2)

= 880 + 88

= 968