Six files F1, F2, F3, F4, F5 and F6 have 100, 200, 50, 80, 120, 150 records…
2015
Six files F1, F2, F3, F4, F5 and F6 have 100, 200, 50, 80, 120, 150 records respectively. In what order should they be stored so as to optimize act. Assume each file is accessed with the same frequency
- A.
F3, F4, F1, F5, F6, F2
- B.
F2, F6, F5, F1, F4, F3
- C.
F1, F2, F3, F4, F5, F6
- D.
Ordering is immaterial as all files are accessed with the same frequency.
Attempted by 216 students.
Show answer & explanation
Correct answer: A
To optimize access time when files are accessed with equal frequency, they should be ordered by size in ascending order. This minimizes the average search time because smaller files are placed earlier, reducing the expected number of records scanned before finding a file. The given record counts are: F3(50), F4(80), F1(100), F5(120), F6(150), and F2(200). Arranging them from smallest to largest yields the sequence: F3, F4, F1, F5, F6, F2. This matches Option A. Option C is incorrect because it follows the original index order rather than file size. Option D is wrong since access frequency being equal does not make ordering immaterial; physical placement still impacts search efficiency. Therefore, sorting by size ascending is the optimal strategy.