• retagged by
650 views
2 2 votes
Consider a system with 64KB cache and line size of 32 bytes. The cache will allocate a line on write miss. Assume cache is connected to lower level memory in the hierarchy through a 64-bit wide bus. The number of CPU cycles for a B-bytes write access on this bus is 10+5((B/4)-1).
Consider below C code snippet :

#define PORTION 1
Base = 8 * i;
for (unsigned int j = base; j < base + PORTION; j++)
Data[j] = j; // storing j into memory

Assume j is stored in register and unsigned int size 32 bits.

1. For write through cache, how many CPU cycles are spent on write transfers to the memory for the all the combined iterations of the j loop in the above C code snippet?
2. If the cache is configured as write back cache, how many CPU cycles are spent on a write back a cache line?

Please log in or register to answer this question.

Position:
Show:

Related questions

1 1 vote
2 2 answers
911
911 views
0 0 votes
0 0 answers
298
298 views
eyeamgj asked Sep 15, 2018
298 views
https://gateoverflow.in/35154/write-back-and-write-through every thing is clear but a doubt is tht why only the case of dirty bit is considered ...and why the case of cle...
3 3 votes
1 1 answer
3.1k
3.1k views
sh!va asked Mar 2, 2017
3,096 views
Consider a computer with the following features:90% of all memory accesses are found in the cache (hit ratio = 0.9);The block size is 2 words and the whole block is read ...