{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Data Structures & Alogs HW_Part_15

Data Structures & Alogs HW_Part_15 - 57(b Cutting...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
57 (b) Cutting the disk I/O time will substantially improve the external sorting time. A reasonable estimate is that cutting disk I/O time in half will cut the sorting time by around 1/3. (c) Main memory access time will not help a great deal, since disk I/O is the probable bottleneck. However, for the sorting operation, main memory access time is in fact more of a bottleneck than CPU speed, so it should help more to speed the memory than to speed the CPU. (d) Increasing the memory size by a factor of two will increase the fi le size that can be processed by a single pass of multi-way merge by a factor of four, in two passes by a factor of eight, and so no. If this leads to a reduction in the number of passes need to process the fi le, then a substantial time savings will be realized. This could easily cut the processing time by 1/3 or 1/4 since 2 or 3 passes of multiway merge under the initial conditions are reasonable to expect. 8.14 How to approach this depends on the form of the records. If they have rela- tively small, fi xed-length keys, the best solution would be to make a simple linear index fi le, as discussed in Chapter 11. Simply make a pass through the original record fi le and store in the index fi le for each record the key and a pointer to the original record. Then, sort the index fi le.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern