cs186_sp08_mt1-8 - i. The ability to sort two files at...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Name: __________________________________ Sorting (14 pts) Answer the following questions about external merge sorts. a. (3 pts) Consider an external sort of a large file that does not fit in memory. What is the main impact of increasing the amount of memory available to the sort process? i. The sort will likely proceed faster because the sort will read less data on each pass. ii. The sort will likely proceed faster because the sort will potentially do fewer passes. iii. The speed of the sort will not be affected. iv. The sort will likely proceed slower because of the need to read more data on each pass. ANSWER: _______ b. (3 pts) The primary benefit of double buffering is:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i. The ability to sort two files at once. ii. The ability to merge two runs at once. iii. The ability to reduce the number of passes in the sort. iv. The ability to overlap computation and I/O. ANSWER: _______ c. (4 pts) After each pass (except pass 0) of a 2-way external merge sort, we have: i. Half as many runs of data as before the pass, but each run is twice as large ii. Twice as many runs of data as before the pass, and each run is the same size iii. The same number of runs of data as before the pass, and each run is the same size iv. Half as many runs of data as before the pass, and each run is half as large ANSWER: _______ 8...
View Full Document

This note was uploaded on 08/26/2009 for the course CS 186 taught by Professor Staff during the Spring '08 term at University of California, Berkeley.

Ask a homework question - tutors are online