retagged by
423 views
0 votes
0 votes

A two-dimensional array int $a [32] [32]$ where each element takes $2$ byte, cache size $2^{12}$  bytes and line size is $2^6$  bytes. The following program segment is stored in the direct mapped cache.

for ( i= 1; i<= 32; ++ i)
for (j= 0; j<= 31; ++ j)
a[i][ j] = 0

If initially cache is empty then total number of compulsory cache miss for storing above array is ________

retagged by

1 Answer

Best answer
1 votes
1 votes

It is due total array element size occupy 32*32*2 bytes=$2^{11}$ bytes

where the cache size is $2^{12}$ bytes

Now each cache word size is $2^6$ bytes

so in first $2^{11}$/  $2^6$ references all array items in cache so compulsory misses are = $2^5$ = 32

edited by
Answer:

Related questions

427
views
2 answers
0 votes
Bikram asked May 27, 2017
427 views
Consider a memory hierarchy system consisting of two levels. The access time of level $1$ is $2$ ns. The miss penalty (The time to get data from level $2$, in ... $1$ is ___________ $\%$
635
views
2 answers
2 votes
Bikram asked May 27, 2017
635 views
Suppose there are $500$ memory references in which $50$ misses in the $1$st level cache and $20$ misses in the $2$nd level cache . Let ... memory reference/instruction , average number of stall cycles per instruction will be __________
595
views
2 answers
0 votes
Bikram asked May 27, 2017
595 views
Consider a two level memory hierarchy having only one level cache and main memory. Cache and Main memory access times are $20$ ns and $120$ ns/word respectively. ... is referenced $40 \%$ of the times, then average access time is _______ ns
352
views
1 answers
1 votes
Bikram asked May 27, 2017
352 views
Suppose that a direct-mapped cache has $2^{10}$ cache lines, with $2^4$ bytes of data per cache line. If the cache is used to store blocks for a ... bytes of space will be required for storing the tags is ________ (put the integer value)