retagged by
172 views
0 votes
0 votes
Consider Prof. Vamshias writes a program given below and runs on a system which has 2-way set associative 16 KB data cache with 32 bytes block where each word size is 32 bits and LRU replacement policy used. If the base address of the array is 0 and initially the cache is empty then the number of data cache misses are there ________. (Assume integer takes 4 bytes)

int i,a[1024*1024],x=0;

 for(i=0;i<1024;i++)

    x +=a[i] + a[1024 * i];

 

 

I am getting 1151 but the answer given is 1279
retagged by

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
4
Ashwani Yadav asked Dec 6, 2018
161 views
correct answer is 32.5 .why in the calculation, on cache miss, cache access time is not included?