
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 nowThis is a popular solution!
Step by stepSolved 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!!!!!
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!!!!!
- use the partition function given when writing quicksort algorithmarrow_forwardConsider a file system that uses a modifed contiguous-allocation scheme with support for extents. A file is a collection of extents, with each ex- tent corresponding to a contiguous set of blocks. A key issue in such systems is the degree of variability in the size of the extents. What are the advantages and disadvantages of the following schemes: a. All extents are of the same size, and the size is predetermined. b. Extents can be of any size and are allocated dynamically. c. Extents can be of a few fixed sizes, and these sizes are predeter- mined.arrow_forwardAnother placement algorithm for dynamic partitioning is referred to as worst-fit. In this case, the largest free block of memory is used for bringing in a process. Discuss the pros and cons of this method compared to first-, next-, and best-fit. What is the average length of the search for worst-fit?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





