Directions (Q91–95): Consider the following program fragment that deals with a table T with 17 rows and 1024 columns, computing an average for each column and printing it (i is the row index and j is the column index):
for j = [0...1023] {
temp = 0;
for i = [0...16]
temp = temp + T[i][j];
print(temp / 17.0);
}T[i][j] and temp are 32-bit floating-point values and memory is word addressable. temp is kept in a processor register, so accessing temp does not involve a memory reference. The main memory is paged and holds 16 pages of 1024 words each. The page replacement policy is least recently used (LRU). Unless stated otherwise, T is stored in the virtual address space in row-major format.
What is the ratio of page faults for the row-major to the column-major arrangement?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. 1024 : 1
Explanation
17,408 : 17 = 1024 : 1.More System Software and Operating System questions
- With T stored in row-major format, what is the main memory hit ratio?
- The order of steps of address translation in the Linux virtual memory scheme will be: A. Register B. Offset C. Page directory D. Page table…
- The sequence of steps for a page-replacement algorithm will be: A. Find a frame that is not currently being used B. Change the page table C…
- Which of the following control problems does NOT exist when processes are unaware of each other during interaction?
- Match List I with List IIList I List II A. Batch Multiprogramming I. Allows more efficient use of main memory B. Time sharing II. User no l…
- Match List I with List IIList I List II A. RAID level-2 I. Block-interleaved B. RAID level-3 II. Error-correcting-code C. RAID level-4 III.…