The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

Consider the following extract from a program, written in a C-like language, that computes the transpose of a matrix.

for (i=0; i<N; i++)
    for (j=0; j<N; j++)

$A$ and $B$ are $N \times N$ matrices with floating point etries that are stored in memory in row-major order as shown in the example below:

A[0,0] A[0,1] A[0,2] ... A[0,N-1] A[1,0] A[1,1] ... A[N-1,N-1]

This program runs uder an OS that uses demand-paging. Considering ONLY memory references to the matrix entries, and using the information given below, compute the page fault rate for the matrix transposition code given above.

  • Page size: $2^{10} bytes
  • Number of frames allocated to the program: 8
  • Page replacement policy: LRU
  • $N=2^{16}$
  • Size of each matrix entry: 8 bytes
  • Each of $A$ and $B$ is stored starting from the beginning of a page
  • None of the pages allocated to $A$ and $B$ are initially in memory.
asked in Others by Veteran (116k points) | 18 views

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
49,447 questions
53,651 answers
70,912 users