GATE CSE
First time here? Checkout the FAQ!
x
+4 votes
134 views

Consider the following piece of code which multiplies two matrices:

int a[1024][1024], b[1024][1024], c[1024][1024];
multiply()
{
   unsigned i, j, k;
   for(i = 0; i < 1024; i++)
       for(j = 0; j < 1024; j++)
           for(k = 0; k < 1024; k++)
               c[i][j] += a[i,k] * b[k,j];
}

Assume that the binary for executing this function fits in one page, and the stack also fits in one page. Assume further that an integer requires 4 bytes for storage. Compute the number of TLB misses if the page size is 4096 and the TLB has 8 entries with a replacement policy consisting of LRU.

asked in Operating System by Boss (7.4k points)   | 134 views
@sushmita..whats the answer??
since page size is 4096 bytes and integer reuires 4 bytes ,so we can have store 1024 elements in one page.

for each table entry,one miss will be counted..

further i am not able to understand..

Please log in or register to answer this question.



Top Users Sep 2017
  1. Habibkhan

    6362 Points

  2. Warrior

    2234 Points

  3. Arjun

    2212 Points

  4. nikunj

    1980 Points

  5. manu00x

    1726 Points

  6. SiddharthMahapatra

    1718 Points

  7. Bikram

    1716 Points

  8. makhdoom ghaya

    1660 Points

  9. A_i_$_h

    1528 Points

  10. rishu_darkshadow

    1512 Points


25,988 questions
33,561 answers
79,406 comments
31,026 users