Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider a file containing 400 million (i.e., 400106 ) song reviews: revid ( 8 bytes), sname ( 40 bytes), rating ( 2 bytes), comments (
Consider a file containing 400 million (i.e., 400106 ) song reviews: revid ( 8 bytes), sname ( 40 bytes), rating ( 2 bytes), comments ( 40 bytes). Suppose it is stored unsplit on a disk which features the following average times: seek =7ms, rotational delay =8ms. In addition, the time to read / write a page =0.5ms. Page size is 8K ( 8210 bytes). You have an available memory (i.e., RAM or buffer pool) of 40M(40220 bytes) for (a) (c). Answer the following questions (2+2+4+3 points): (a) What is the elapsed time for phase 1 (sort phase)? (b) How many merge passes are needed in phase 2 if you decide to merge as many SSLs as possible at a time? (c) What is the elapsed time for the merge phase? Make sure to allocate the pages to the various buffers so as to optimize random accesses. Show the allocation details for every pass. Develop your work carefully, showing the \# random accesses and \# sequential accesses, before converting to elapsed time. (d) What is the smallest buffer pool which will let you sort the above file while minimizing the \# passes in phase 2? Express your answer in \# pages and in \# bytes. Show your work
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started