All mock tests are FREE till 31 December — register to save your progress

A table T with 17 rows and 1024 columns is stored in memory. T[i][j] and the variable temp are 32-bit floating-point values; memory is word-addressable (1 word = 1 element) and temp is kept in a processor register (no memory reference for temp). Main memory can hold only 16 pages of 1024 words each, with LRU page replacement. The following program computes and prints the average of every column:
for j = 0 to 1023:
  temp = 0
  for i = 0 to 16:
    temp = temp + T[i][j]
  print(temp / 17.0)

If T is stored in the virtual address space in row-major format, what is the main memory hit ratio?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. (A) 0

More System Software and Operating System questions