Let's say I have a disk with an average seek time of 10ms, an average rotational latency of 5ms and a transfer time of 1ms for a 4kb block and the cost of reading the block is the sum of these values. If I have to sort a large relation consisting of 10,000,000 blocks of 4kb each and I have 320 blocks of main memory available for buffering then how would I determine the cost of this multi phase multiway merge sort. I know that in the first phase you need to create sorted runs of 320 blocks each then do 319-way merges. Also because of the small memory, this would usually be in 2 phases but here it will turn into 3 phases. I also know that the number of sorted sublists is 10,000,000/320 = 31,250 but I'm not sure where to go from here to determine the cost. 
Determining the cost of multi phase multiway merge sort
memory management;databases;mergesort