Consider a situation where external sort-merge is applied to relation S in Problem 1. Assuming that up to 107 disk blocks can be loaded into the main memory, answer each of the following questions: (a) Explain how many initial runs will be created. Also, describe how many block transfers and disk seeks will be needed to create all of these initial runs. (b) After the initial runs are created as explained above, external sort-merge repeatedly merges a number of runs into a bigger run until it obtains one final run. Assume that each merge pass uses three input buffers and one output buffer to merge each group of three runs into a larger run. Explain how many merge passes are needed to obtain one final run. Also, calculate the total number of block transfers and disk seeks during these merge passes. Justify your answer. Assume that (i) the input and output buffers are of the same size, (ii) the input and output buffers fully use the main memory into which up to 107 disk blocks can be loaded, and (iii) the final run is not written back to disk because it is consumed immediately by an operator while it is being generated. (c) Consider the merge passes described in (b). If each merge pass uses 9 input buffers and 1 output buffer, how many block transfers and disk seeks are necessary to obtain one final run? Also, explain whether it is more advantageous to use 3 input buffers as in (b) or 9 input buffers. Justify your answer by estimating the overall time for merging all runs into one final run. For this estimation, assume that each block transfer takes 0.1 milliseconds and each disk seek takes 10 milliseconds.
Consider a situation where external sort-merge is applied to relation S in Problem 1. Assuming that up to 107 disk blocks can be loaded into the main memory, answer each of the following questions:
(a) Explain how many initial runs will be created. Also, describe how many block transfers and disk seeks will be needed to create all of these initial runs.
(b) After the initial runs are created as explained above, external sort-merge repeatedly merges a number of runs into a bigger run until it obtains one final run. Assume that each merge pass uses three input buffers and one output buffer to merge each group of three runs into a larger run. Explain how many merge passes are needed to obtain one final run. Also, calculate the total number of block transfers and disk seeks during these merge passes. Justify your answer. Assume that (i) the input and output buffers are of the same size, (ii) the input and output buffers fully use the main memory into which up to 107 disk blocks can be loaded, and (iii) the final run is not written back to disk because it is consumed immediately by an operator while it is being generated.
(c) Consider the merge passes described in (b). If each merge pass uses 9 input buffers and 1 output buffer, how many block transfers and disk seeks are necessary to obtain one final run? Also, explain whether it is more advantageous to use 3 input buffers as in (b) or 9 input buffers. Justify your answer by estimating the overall time for merging all runs into one final run. For this estimation, assume that each block transfer takes 0.1 milliseconds and each disk seek takes 10 milliseconds.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps
The numbers 107 and 106 being mentioned in parts a and b, do you mean 107 and 106? Please fix all the answers in all parts and make sure to give a correct response for each part!!!!!