Search for question
Question

Question 2: Consider a disk with the following characteristics: Page size = 4000bytes, seek time = 10ms,

rotational delay = 5ms, transfer time = 1ms/page. The cost for a random I/O is (seek time + rotational delay +

transfer time) = 16ms/page. The cost for sequential I/Os (that is a block of several pages which are next to each

other on the disk) is (seek time + rotational delay) = 15ms to find the starting point followed by 1ms/page to

transfer each page in the block. Assume you need to sort a file with 10,000,000 pages using 320 buffer pages.

Pass-0 creates sorted runs of 320 pages each, stored sequentially. For the subsequent passes, you have the

following alternatives:

(i) Do 319-way merges.

(ii) Create 16 "input" buffers of 16 pages each, create an "output" buffer of 64 pages, and do 16-way merges.

(iii) Create 4 "input" buffers of 64 pages each, create an "output" buffer of 64 pages, and do 4-way merges.

Which alternative is the fastest? Explain.