• recategorized by
342 views
0 0 votes

 

Consider the following program fragment that deals with a table $\mathrm{T}$ with $17$ rows and $1024$ columns, computing an average for each column and printing it to screen ( $\mathrm{i}$ is row index and $\mathrm{j}$ is column index):

for j = 0  . .1023]{
temp $=0$;
for $\mathrm{i}=[0 \ldots 16]$;
temp $=$ temp $+T[i][i]$
print $($ temp $/ 17.0) ;\}$

$\mathrm{T}$ [i] [i] and temp are $32$ bit floating point values and memory is word addressable. The temporary variable temp is kept in a processor register so access to temp does not involve a memory reference. The main memory is page and holds $16$ pages of size $1024$ words, the page replacement policy is "least recently used ", If $\mathrm{T}$ is stored in the virtual address space in row major format.

Consider that $\mathrm{T}$ is stored in column major format, how many page faults will be encountered?

  1. $14$
  2. $15$
  3. $16$
  4. $17$

 

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
0 0 answers
491
491 views
admin asked Jul 28, 2023
491 views
Given below are two statements: one is labelled as Assertion $\text{A}$ and the other is labelled as Reason $\text{R}$.A virtual memory system uses first-in first-out pag...
0 0 votes
0 0 answers
1.1k
1.1k views
admin asked Jul 28, 2023
1,107 views
Consider the following program fragment that deals with a table $\mathrm{T}$ with 17 rows and 1024 columns, computing an average for each column and printing it to screen...
0 0 votes
0 0 answers
538
538 views
admin asked Jul 28, 2023
538 views
Consider the following program fragment that deals with a table $\mathrm{T}$ with $17$ rows and $1024$ columns, computing an average for each column and printing it to sc...
0 0 votes
0 0 answers
417
417 views
admin asked Jul 28, 2023
417 views
Consider the following program fragment that deals with a table $\mathrm{T}$ with $17$ rows and $1024$ columns, computing an average for each column and printing it to sc...