GATE CSE
First time here? Checkout the FAQ!
x
+4 votes
144 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 Veteran (11.5k points) 7 63 149 | 144 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.

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23642 Points

  2. Bikram

    17188 Points

  3. Habibkhan

    8734 Points

  4. srestha

    6404 Points

  5. Debashish Deka

    5478 Points

  6. jothee

    5098 Points

  7. Sachin Mittal 1

    4882 Points

  8. joshi_nitish

    4478 Points

  9. sushmita

    4008 Points

  10. Rishi yadav

    3960 Points


Recent Badges

Popular Question Bikram
Regular Mr.OOPs
Avid Reader Venkat Sai
Popular Question jothee
Verified Human anchal Singh
Great Question Kathleen
Verified Human Ankita_ Pawar
Avid Reader kenzou
Notable Question Sumit Chaudhary 2
Nice Comment rahul sharma 5
27,380 questions
35,231 answers
84,395 comments
33,391 users