GATE CSE
First time here? Checkout the FAQ!
x
0 votes
70 views
Consider below code written in C  
         Loop A
sum = 0;
 for (i = 0; i < 128; i++)
for (j = 0; j < 64; j++)
        sum += A[i][j];
         Loop B
sum = 0;
for (j = 0; j < 64; j++)
for (i = 0; i < 128; i++)
                                    sum += A[i][j];
The matrix A is stored contiguously in memory in row-major order. Consider a 4KB direct-mapped data cache with 8-word (32-byte) cache lines.

The L2 cache in the Pentium 4 holds 256 KBytes of data. The cache is 8-way set associative. Each block holds 128 bytes of data. If physical addresses is 32 bits long, each data word is 32 bits, and entries are word addressable, what bits of the 32 bit physical address comprise the tag, index and offset?

i)(19,8,8)

ii)(20,8,7)

iii)(17,8,7)

iv)(18,8,6)
asked in CO & Architecture by Active (1.4k points)   | 70 views

1 Answer

0 votes
third one is correct???
answered by (55 points)  
Top Users Jan 2017
  1. Debashish Deka

    7508 Points

  2. Habibkhan

    4716 Points

  3. Vijay Thakur

    4368 Points

  4. sudsho

    4316 Points

  5. saurabh rai

    4170 Points

  6. santhoshdevulapally

    3436 Points

  7. Arjun

    3432 Points

  8. Bikram

    3240 Points

  9. GateSet

    3202 Points

  10. Sushant Gokhale

    3042 Points

Monthly Topper: Rs. 500 gift card

18,898 questions
23,865 answers
51,932 comments
20,186 users