This preview shows page 1. Sign up to view the full content.
Unformatted text preview: in two passes, and any buffers leftover can be used for hybrid hashing. On the answer sheet (not here!), mark the circle that is by the closest value of K. 1 [1pt] A reasonable answer is 75, as follows: In pass one we have about (B K) pages for output partitions. We want each to be no bigger than B or so. So N <= (B K)*B. Plugging, with B=150 and N=10,000 (40000/4), we get B K = 66.67, or K = 150 66.67 = 83.33. We also accepted 50: If we have R buffer pages, then we can sort up to R2 pages in two passes. R=B K, so we want to solve (B K)2 = N. Plugging in, with B=150 and N=10,000 (40,000/4), we get K=50. Note that while we could technically use all B buffers during the merge phase as mentioned above, the question stat...
View
Full
Document
 Fall '08
 Staff

Click to edit the document details