Question: Suppose we have a sequential ordered file of 200,000 records, where each record is 200 bytes. Assume blocksize = 2048 bytes (10 records per block),

Suppose we have a sequential ordered file of 200,000 records, where each record is 200 bytes. Assume blocksize = 2048 bytes (10 records per block), average seek time = 10 ms, average rotational delay = 8.3 ms, and block transfer time = 0.8 ms. Suppose we want to make X independent random record reads from the file. This could be done in two different approaches.

a.read the entire file once and look for the X records of interest

b.use a binary search to find a particular record, and repeat this for all X records of interest.

The question is to decide when it would be more efficient to perform approach 1 versus approach 2. That is, what is the value for X when an exhaustive read of the file is more efficient than X binary searches? Develop this as a function of X. (A graph would be helpful.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!